mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-13 12:33:15 +02:00
Replace insecure patterns that exposed the application to command injection, arbitrary code execution, and data interception attacks. - Replace os.popen/os.system with subprocess.run using argument lists - Migrate pickle config serialization to JSON format - Replace bare except: blocks with specific exception types - Fix insecure HTTP URLs to HTTPS (opreturnbot.com, ascii.live) - Replace shell curl commands with requests library calls - Add migrate_config.py script for pickle-to-JSON config migration - Convert existing SPV config files to JSON format Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
725 B
Python
25 lines
725 B
Python
#Developer: Curly60e
|
|
#PyBLOCK its a clock of the Bitcoin blockchain.
|
|
|
|
|
|
import os
|
|
import os.path
|
|
import subprocess
|
|
import time as t
|
|
|
|
|
|
def readFile():
|
|
try:
|
|
print ("\n\033[1;34;40mWaiting for new data...\n")
|
|
downloadsFolder = 'downloads/'
|
|
while True:
|
|
if not os.listdir(downloadsFolder):
|
|
continue
|
|
else:
|
|
print("\t\t\n\033[1;33;40mNew message from Space just arrived...\033[0;37;40m\n")
|
|
subprocess.run(["cat", "downloads/*"])
|
|
subprocess.run(["rm", "downloads/*"])
|
|
|
|
except Exception:
|
|
subprocess.run(["pkill", "-9", "-f", "api_data_reader.py"])
|
|
subprocess.run(["pkill", "-9", "-f", "demo-rx.py"])
|