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

Method assert_handoff_scope

recon_engine.py:499–518  ·  view source on GitHub ↗

Return any subdomains that violate registrable-domain scope. Empty list = ok.

(
        self,
        scan_id: str,
        subdomains: List[str],
        force: bool = False,
    )

Source from the content-addressed store, hash-verified

497 return result
498
499 def assert_handoff_scope(
500 self,
501 scan_id: str,
502 subdomains: List[str],
503 force: bool = False,
504 ) -> List[str]:
505 """Return any subdomains that violate registrable-domain scope. Empty list = ok."""
506 state = self.get_scan_state(scan_id)
507 if not state:
508 return list(subdomains)
509 target_host, _ = _split_host_port(state.target, default_port=443)
510 target_domain = _registrable_domain(target_host)
511 if not target_domain or force:
512 return []
513 violations = []
514 for sub in subdomains:
515 sub_domain = _registrable_domain(sub)
516 if sub_domain != target_domain:
517 violations.append(sub)
518 return violations
519
520 def _reaper_loop(self) -> None:
521 while True:

Calls 4

get_scan_stateMethod · 0.95
_split_host_portFunction · 0.85
_registrable_domainFunction · 0.85
appendMethod · 0.80