Skip to content

feat: add follow-redirects option to direct scan #1

Open
moham96 wants to merge 2 commits into
FreeNetLabs:masterfrom
moham96:master
Open

feat: add follow-redirects option to direct scan #1
moham96 wants to merge 2 commits into
FreeNetLabs:masterfrom
moham96:master

Conversation

@moham96

@moham96 moham96 commented May 28, 2026

Copy link
Copy Markdown

this collects more domains from the redirects

moham96 and others added 2 commits May 28, 2026 13:28
Add an opt-in --follow-redirects flag that, on a 3xx response, follows
the Location header through the redirect chain and records the
status/server of each hop. Handles absolute and relative Location
values, dedupes by host:port within a chain, and caps at 10 hops with
loop detection. Disabled by default; the output file format is
unchanged.

Refactor the per-request logic into a directRequest helper so it can be
reused for each hop, and drop the Connection: close header (send
Accept: */* instead) which some WAF/load-balancer backends answered
with an EOF, causing reachable hosts to look unreachable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant