mirror of
https://github.com/curly60e/pyblock.git
synced 2026-08-15 12:50:38 +02:00
Replace all dynamic .split() patterns in subprocess calls with safe alternatives: shlex.split(), explicit list args, and _run_btc/_run_ln helpers in PyBlock.py. Covers PyBlock, block_visualizer, clockscript, lastblockdetail, mempoolclock, nodeconnection, and ai/context. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
71 lines
2.1 KiB
Python
71 lines
2.1 KiB
Python
#Developer: Curly60e
|
|
#PyBLOCK its a clock of the Bitcoin blockchain.
|
|
|
|
import os
|
|
import json
|
|
from cfonts import render, say
|
|
|
|
def blogo():
|
|
|
|
if os.path.isfile('config/pyblocksettings.conf'):
|
|
with open("config/pyblocksettings.conf", "r") as f:
|
|
settingsv = json.load(f) # Load the file 'bclock.conf'
|
|
settings = settingsv # Copy the variable pathv to 'path'
|
|
else:
|
|
settings = {"gradient":"", "design":"block", "colorA":"green", "colorB":"yellow"}
|
|
with open("config/pyblocksettings.conf", "w") as f:
|
|
json.dump(settings, f, indent=2)
|
|
|
|
if settings["gradient"] == "grd":
|
|
output = render('PyBLOCK', gradient=[settings['colorA'], settings['colorB']], align='left', font=settings['design'])
|
|
else:
|
|
output = render('PyBLOCK', colors=[settings['colorA'], settings['colorB']], align='left', font=settings['design'])
|
|
|
|
print(output)
|
|
|
|
def tick():
|
|
print("""\033[1;32;40m
|
|
|
|
|
|
|
|
|
|
@
|
|
@
|
|
@
|
|
@@
|
|
@@
|
|
@@@
|
|
@@@ @@.
|
|
@@@@@@@
|
|
@@@@@@@@
|
|
@@@@
|
|
@@@@
|
|
@ @@@@
|
|
@@@@@@@@
|
|
@@@@@@@@
|
|
@@@
|
|
@@@
|
|
@@
|
|
@@
|
|
@
|
|
@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
\033[0;37;40m""")
|
|
|
|
def canceled():
|
|
print(r"""
|
|
) ( (
|
|
( ( ( /( ( )\ ) )\ )
|
|
)\ )\ )\()) )\ ( (()/( ( (()/(
|
|
(((_)((((_)( ((_)\ (((_) )\ /(_)) )\ /(_))
|
|
)\___ )\ _ )\ _((_) )\___ ((_) (_)) ((_)(_))_
|
|
((/ __|(_)_\(_)| \| |((/ __|| __|| | | __|| \
|
|
| (__ / _ \ | .` | | (__ | _| | |__ | _| | |) |
|
|
\___|/_/ \_\ |_|\_| \___||___||____||___||___/
|
|
|
|
""")
|