22 lines
885 B
Python
22 lines
885 B
Python
import base64
|
|
import json
|
|
import os
|
|
|
|
filepath = r"d:\file\kefu\新建 文本文档.txt"
|
|
if os.path.exists(filepath):
|
|
with open(filepath, "r", encoding="utf-8") as f:
|
|
content = f.read().strip()
|
|
if content.startswith("DYCRED1."):
|
|
encoded = content.split(".", 1)[1]
|
|
decoded = base64.b64decode(encoded).decode("utf-8")
|
|
data = json.loads(decoded)
|
|
print("Keys:", list(data.keys()))
|
|
print("Cookie preview:", data.get("cookie")[:100] if data.get("cookie") else None)
|
|
print("Has sessionid in cookie:", "sessionid" in data.get("cookie", ""))
|
|
print("Web protect keys:", list(data.get("web_protect", {}).keys()) if isinstance(data.get("web_protect"), dict) else None)
|
|
print("Web protect type:", type(data.get("web_protect")))
|
|
else:
|
|
print("Does not start with DYCRED1.")
|
|
else:
|
|
print("File not found.")
|