TorbatYar/scripts/check_theme_api.py
Mortezakoohjani 12c8615615 Ship enterprise Accounting FE/API with CRUD parity and production wiring.
Adds accounting-service PATCH/archive, fiscal helpers, COA templates and setup status, plus SuperApp Accounting UI (DS, scoreboard, masters, vouchers, ledger, ops modules) with session refresh and HTTPS public API URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:26:43 +03:30

27 lines
1.0 KiB
Python

#!/usr/bin/env python3
import sys
import time
import paramiko
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
time.sleep(20)
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("192.168.10.156", username="torbatyaruser", password="Moli@5404", timeout=30, allow_agent=False, look_for_keys=False)
url = (
"https://auth.torbatyar.ir/realms/superapp/protocol/openid-connect/auth"
"?client_id=superapp-frontend"
"&redirect_uri=https%3A%2F%2Ftorbatyar.ir%2Fauth%2Fcallback"
"&response_type=code&scope=openid"
)
cmd = (
"curl -sk -m 25 --resolve auth.torbatyar.ir:443:192.168.10.156 "
f"'{url}' | tr -d '\\r' | grep -oE 'data-identity-api=\"[^\"]+\"' | head -n 5; "
"echo ---; "
"curl -sk -m 10 -o /dev/null -w auth=%{http_code} --resolve auth.torbatyar.ir:443:192.168.10.156 https://auth.torbatyar.ir/"
)
_, stdout, stderr = c.exec_command(cmd, timeout=60, get_pty=True)
print((stdout.read() + stderr.read()).decode("utf-8", "replace"))
c.close()