mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-10-20 07:11:28 +02:00
urllib.parse.SplitResult.port raises ValueError when the authority carries a non-numeric port; nine call sites read it unguarded, so one malformed URL (a stray quote, a client typo) turned into an unhandled exception in the middle of a scan, a report, an interest rule or a proxy dial. shared/utils/net.py:url_port makes the read itself the failure boundary; unreadable_port names the bogus text so the naabu and banner proxy paths can report what they refused rather than retrying against a host string that dropped its port silently. shared/definitions/ports.py:SCHEME_PORTS replaces four private copies of the same http/https default-port map (endpoints.py, endpoint_judge, scan_surface/normalize, nuclei's parser, dalfox's parser). Also renames live_hosts to answered_hosts in the report source and the interest context, and lifts the asset query's inline is:web predicate into predicates.answered() — the existing distinction between is:live (2xx) and is:web (answered at all) was already the rule; live_hosts was the one name still claiming the stronger one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VckaDx6mBB4TsG76u61gvv