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

Method ghunt_email_scan

IntelOSINT.py:13312–13493  ·  view source on GitHub ↗
(self, email)

Source from the content-addressed store, hash-verified

13310 self._ghunt_deps_ready = True
13311
13312 def ghunt_email_scan(self, email):
13313
13314 email = (email or "").strip()
13315 if "@" not in email:
13316 return {
13317 "username": email,
13318 "type": "GHunt",
13319 "info": {"Status": "Email non valida"},
13320 "main_img": "https://cdn-icons-png.flaticon.com/512/281/281764.png",
13321 "status_code": 400,
13322 "url": ""
13323 }
13324
13325 base_img = "https://cdn-icons-png.flaticon.com/512/281/281764.png"
13326 info = {}
13327 status_code = 200
13328
13329 try:
13330 self._ensure_ghunt_deps()
13331 if getattr(self, "_ghunt_missing_deps", []):
13332 return {
13333 "username": email,
13334 "type": "GHunt",
13335 "info": {
13336 "Status": "Dipendenze GHunt mancanti",
13337 "Mancanti": ", ".join(self._ghunt_missing_deps),
13338 "Setup": "Installa i pacchetti mancanti oppure avvia con INTELOSINT_AUTO_INSTALL_GHUNT_DEPS=1."
13339 },
13340 "main_img": base_img,
13341 "status_code": 503,
13342 "url": ""
13343 }
13344 st = self.ghunt_login_status()
13345 if st.get("status") != "authenticated":
13346 return {
13347 "username": email,
13348 "type": "GHunt",
13349 "info": {
13350 "Status": "GHunt non autenticato",
13351 "Setup": "Usa 'Accredita Google' nella prima schermata e completa il Metodo 2."
13352 },
13353 "main_img": base_img,
13354 "status_code": 401,
13355 "url": ""
13356 }
13357
13358 script_dir = Path(__file__).resolve().parent
13359 ghunt_dir = script_dir / "GHunt"
13360 json_out = script_dir / f"_ghunt_{uuid.uuid4().hex}.json"
13361 ghunt_cmd, ghunt_cwd = self._resolve_ghunt_command()
13362 cmd = None
13363
13364 if ghunt_cmd:
13365 cmd = ghunt_cmd + ["email", email, "--json", str(json_out)]
13366 else:
13367 local_py = ghunt_dir / "main.py"
13368 if local_py.exists():
13369 cmd = [str(sys.executable), str(local_py), "email", email, "--json", str(json_out)]

Callers 1

Calls 4

_ensure_ghunt_depsMethod · 0.95
ghunt_login_statusMethod · 0.95

Tested by

no test coverage detected