MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _registrable_domain

Function _registrable_domain

recon_engine.py:557–570  ·  view source on GitHub ↗
(host: str)

Source from the content-addressed store, hash-verified

555
556
557def _registrable_domain(host: str) -> Optional[str]:
558 if not host:
559 return None
560 try:
561 import tldextract
562 ext = tldextract.extract(host)
563 if ext.domain and ext.suffix:
564 return f"{ext.domain}.{ext.suffix}"
565 return None
566 except ImportError:
567 parts = host.rsplit(".", 2)
568 if len(parts) >= 2:
569 return ".".join(parts[-2:])
570 return host
571
572
573def _query_crtsh(domain: str) -> List[str]:

Calls

no outgoing calls