MCPcopy Create free account
hub / github.com/CScorza/IntelOSINT / ghunt_login_status

Method ghunt_login_status

IntelOSINT.py:13600–13617  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

13598 }
13599
13600 def ghunt_login_status(self):
13601 try:
13602 creds_path = Path.home() / ".malfrats" / "ghunt" / "creds.m"
13603 if not creds_path.exists():
13604 return {"status": "not_authenticated", "message": "Sessione GHunt non trovata. Esegui GHunt login."}
13605
13606 raw = creds_path.read_text(encoding="utf-8", errors="ignore")
13607 data = json.loads(base64.b64decode(raw).decode("utf-8", errors="ignore"))
13608 cookies = data.get("cookies", {}) if isinstance(data, dict) else {}
13609 osids = data.get("osids", {}) if isinstance(data, dict) else {}
13610 android = data.get("android", {}) if isinstance(data, dict) else {}
13611 master_token = android.get("master_token", "") if isinstance(android, dict) else ""
13612
13613 if cookies and osids and master_token:
13614 return {"status": "authenticated", "message": "Autenticato. Puoi avviare la ricerca Gmail/GAIA."}
13615 return {"status": "partial", "message": "Sessione GHunt incompleta. Ripeti il login GHunt."}
13616 except Exception:
13617 return {"status": "error", "message": "Impossibile leggere la sessione GHunt. Ripeti il login."}
13618
13619 def ghunt_login_method2(self, cookie_code):
13620 code = (cookie_code or "").strip()

Callers 4

ghunt_email_scanMethod · 0.95
ghunt_login_method2Method · 0.95
ghunt_statusFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected