-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add `-f, --filter` option to filter URLs using a Regex currently on the URL path.
- Loading branch information
1 parent
70fdf45
commit bbf0771
Showing
11 changed files
with
132 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package passive | ||
|
||
import ( | ||
"regexp" | ||
"sync" | ||
|
||
"github.com/signedsecurity/sigurlfind3r/pkg/sigurlfind3r/scraping" | ||
"github.com/signedsecurity/sigurlfind3r/pkg/sigurlfind3r/session" | ||
) | ||
|
||
// Run collects all the known urls for a given domain | ||
func (agent *Agent) Run(domain string, filterRegex *regexp.Regexp, includeSubdomains bool, keys *session.Keys) (URLs chan scraping.URL) { | ||
URLs = make(chan scraping.URL) | ||
|
||
go func() { | ||
defer close(URLs) | ||
|
||
ses, err := session.New(domain, filterRegex, includeSubdomains, 10, keys) | ||
if err != nil { | ||
return | ||
} | ||
|
||
wg := &sync.WaitGroup{} | ||
|
||
// Run each source in parallel on the target domain | ||
for name, source := range agent.sources { | ||
wg.Add(1) | ||
|
||
go func(name string, source scraping.Source) { | ||
for res := range source.Run(domain, ses, includeSubdomains) { | ||
URLs <- res | ||
} | ||
|
||
wg.Done() | ||
}(name, source) | ||
} | ||
|
||
wg.Wait() | ||
|
||
}() | ||
|
||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Package passive provides capability for doing passive subdomain | ||
// enumeration on targets. | ||
package passive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.