init: CasSsoService CAS 5.3 overlay (cas.war via LFS)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import urllib.request, ssl, paramiko, json
|
||||
|
||||
BASE="http://sso.yunhaixingtong.com"
|
||||
ctx=ssl.create_default_context(); ctx.check_hostname=False; ctx.verify_mode=ssl.CERT_NONE
|
||||
|
||||
# 1) live RSA public key
|
||||
r=urllib.request.urlopen(urllib.request.Request(BASE+"/api/public-key"), timeout=20, context=ctx)
|
||||
pub=json.loads(r.read().decode())["data"]["publicKey"]
|
||||
print("PUBLIC_KEY_LEN:", len(pub))
|
||||
print("PUBLIC_KEY_HEAD:", pub[:40], "...")
|
||||
|
||||
# 2) sys_user schema + sample usernames (no passwords)
|
||||
ssh=paramiko.SSHClient(); ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect("192.168.10.157", port=22, username="yunhai", password="123456", timeout=20)
|
||||
def run(c):
|
||||
i,o,e=ssh.exec_command(c); return o.read().decode('utf-8','ignore')+("ERR:"+e.read().decode('utf-8','ignore') if e.read() else "")
|
||||
PWD="CVf^x$sW*b6CGHxh"
|
||||
print("\n=== DESCRIBE sys_user ===")
|
||||
print(run(f"docker exec mysql8 mysql -uroot -p'{PWD}' bsch_userbase -e 'DESCRIBE sys_user;' 2>&1 | head -40"))
|
||||
print("\n=== sample usernames (limit 10) ===")
|
||||
print(run(f"docker exec mysql8 mysql -uroot -p'{PWD}' bsch_userbase -e 'SELECT username, disabled, expired FROM sys_user LIMIT 10;' 2>&1 | head -20"))
|
||||
ssh.close()
|
||||
Reference in New Issue
Block a user