a
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import sys
|
||||
import tarfile
|
||||
|
||||
path = sys.argv[1]
|
||||
with tarfile.open(path) as t:
|
||||
install = t.extractfile("./device-install.sh").read().decode()
|
||||
cfg = json.loads(t.extractfile("./config/config.json").read().decode())
|
||||
print("reset_support:", "BUTTONTASK_RESET_CONFIG" in install)
|
||||
print("password:", cfg.get("settings", {}).get("password"))
|
||||
print("buttons:", len(cfg.get("buttons", [])))
|
||||
for b in cfg.get("buttons", []):
|
||||
print(" -", b.get("id"), b.get("label"), (b.get("action") or {}).get("url", "")[:50])
|
||||
Reference in New Issue
Block a user