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

Method analyze_domain_advanced

IntelOSINT.py:12370–12440  ·  view source on GitHub ↗
(self, target)

Source from the content-addressed store, hash-verified

12368 return out
12369
12370 def analyze_domain_advanced(self, target):
12371 domain = target.replace("https://", "").replace("http://", "").split('/')[0].strip()
12372 info = {"00. Dominio": domain, "Status": " Analisi Domain Intelligence"}
12373
12374 dns_tasks = {
12375 'A': '01. Indirizzi IPv4 (A)',
12376 'AAAA': '02. Indirizzi IPv6 (AAAA)',
12377 'MX': '03. Server di Posta (MX)',
12378 'NS': '04. Name Servers (NS)',
12379 'TXT': '05. Record TXT (SPF/Verify)',
12380 'CAA': '06. Cert Authority (CAA)'
12381 }
12382
12383 for record, label in dns_tasks.items():
12384 try:
12385 answers = dns.resolver.resolve(domain, record)
12386 if record == 'MX':
12387 info[label] = ", ".join([f"{r.exchange} (prio:{r.preference})" for r in answers])
12388 else:
12389 info[label] = ", ".join([str(r) for r in answers])
12390 except Exception:
12391 info[label] = "Record non trovato"
12392
12393 try:
12394 w = whois.whois(domain)
12395 if w.registrar:
12396 info["07. Registrar"] = str(w.registrar)
12397 if w.name_servers:
12398 info["08. Nameserver WHOIS"] = str(w.name_servers)
12399 if w.creation_date:
12400 c_date = w.creation_date[0] if isinstance(w.creation_date, list) else w.creation_date
12401 info["09. Registrato il"] = str(c_date)[:10]
12402 if w.expiration_date:
12403 e_date = w.expiration_date[0] if isinstance(w.expiration_date, list) else w.expiration_date
12404 info["10. Scadenza"] = str(e_date)[:10]
12405 if w.updated_date:
12406 u_date = w.updated_date[0] if isinstance(w.updated_date, list) else w.updated_date
12407 info["11. Aggiornato"] = str(u_date)[:10]
12408 if w.country:
12409 info["12. Country"] = str(w.country)
12410 except Exception:
12411 pass
12412
12413 headers_info, html = self._domain_headers_and_tls(domain)
12414 rdap_info = self._domain_rdap_lookup(domain)
12415 info.update(headers_info)
12416 info.update(rdap_info)
12417 if headers_info.get("HTTP Status", "").startswith("Err"):
12418 return info
12419
12420 info.update(self._find_sitemap_and_robots(domain))
12421 info.update(self._domain_tech_fingerprint(html, headers_info))
12422 info.update(self._wayback_summary(domain))
12423
12424 try:
12425 ssl_out = self._scan_tls_cert(domain)
12426 info.update(ssl_out)
12427 except Exception:

Callers 2

build_ip_graphMethod · 0.95
searchFunction · 0.80

Calls 9

_domain_rdap_lookupMethod · 0.95
_wayback_summaryMethod · 0.95
_scan_tls_certMethod · 0.95
_scan_tls_chainMethod · 0.95
_domain_dns_historyMethod · 0.95

Tested by

no test coverage detected