pyblock/pybitblock/clone.py
GaltRanch 0224cfe230 Fix critical security vulnerabilities across the codebase
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>
2026-04-01 10:24:47 -03:00

31 lines
991 B
Python

#Developer: Curly60e
#PyBLOCK its a clock of the Bitcoin blockchain.
import os
import os.path
import subprocess
import time as t
def gitclone():
url = "https://github.com/curly60e/satellite"
subprocess.run(["git", "clone", url])
subprocess.run(["mkdir", "satellite/api/examples/.gnupg"])
subprocess.run(["gpg", "--full-generate-key", "--homedir", "satellite/api/examples/.gnupg"])
def satnode():
try:
subprocess.run(["python3", "satellite/api/examples/demo-rx.py"])
t.sleep(5)
subprocess.run(["python3", "satellite/api/examples/api_data_reader.py", "--demo", "--plaintext"])
except Exception:
subprocess.run(["pkill", "-9", "-f", "api_data_reader.py"])
subprocess.run(["pkill", "-9", "-f", "demo-rx.py"])
def matrixsc():
if os.path.isdir('$HOME/pyblock/terminal_matrix'):
print("OK Pass")
else:
url = "https://github.com/curly60e/terminal_matrix.git"
subprocess.run(["git", "clone", url])