Return any subdomains that violate registrable-domain scope. Empty list = ok.
(
self,
scan_id: str,
subdomains: List[str],
force: bool = False,
)
| 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: |