Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove * and/or . (prefix) from target #452

Merged
merged 3 commits into from
Dec 8, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,9 @@ func (r *Runner) targets(hp *httpx.HTTPX, target string) chan string {
// A valid target does not contain:
// *
// spaces
if strings.ContainsAny(target, " *") {
return
if strings.ContainsAny(target, "*") || strings.HasPrefix(target, ".") {
// trim * and/or . (prefix) from the target to return the domain instead of wildard
target = strings.TrimPrefix(strings.Trim(target, "*"), ".")
}

// test if the target is a cidr
Expand Down