v2: ID verification by state, 15 photos/5 albums, 20 quick replies, logo, mobile polish
This commit is contained in:
21
deploy/_read_pfsense_env.py
Normal file
21
deploy/_read_pfsense_env.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
import paramiko
|
||||
|
||||
PASS = "Bbt9115xty9176!"
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect("10.10.0.1", username="admin", password=PASS, timeout=15)
|
||||
_, o, e = c.exec_command("cat /usr/local/etc/wan-dns-failover.env", timeout=30)
|
||||
o.channel.recv_exit_status()
|
||||
text = (o.read() + e.read()).decode()
|
||||
c.close()
|
||||
for line in text.splitlines():
|
||||
if any(k in line.upper() for k in ["CLOUDFLARE", "CF_", "TUNNEL", "AUTH"]):
|
||||
if "SECRET" in line.upper() or "TOKEN" in line.upper() or "KEY" in line.upper() or "EMAIL" in line.upper():
|
||||
k, _, v = line.partition("=")
|
||||
v = v.strip()
|
||||
if len(v) > 12:
|
||||
v = v[:8] + "..." + v[-4:]
|
||||
print(f"{k}={v}")
|
||||
else:
|
||||
print(line)
|
||||
Reference in New Issue
Block a user