Skip to content

Commit

Permalink
fix subdomains
Browse files Browse the repository at this point in the history
  • Loading branch information
CybearTony committed Jun 17, 2021
1 parent 4617203 commit 680a7d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ func NewCrawler(site *url.URL, cmd *cobra.Command) *Crawler {
}
}


func (crawler *Crawler) feedLinkfinder(jsFileUrl string, OutputType string, source string, ) {

if !crawler.jsSet.Duplicate(jsFileUrl) {
Expand Down Expand Up @@ -543,7 +544,7 @@ func (crawler *Crawler) Start(linkfinder bool) {

// Find subdomains from response
func (crawler *Crawler) findSubdomains(resp string) {
subs := GetSubdomains(resp, crawler.Input)
subs := GetSubdomains(resp, crawler.domain)
for _, sub := range subs {
if !crawler.subSet.Duplicate(sub) {
outputFormat := fmt.Sprintf("[subdomains] - %s", sub)
Expand All @@ -560,9 +561,9 @@ func (crawler *Crawler) findSubdomains(resp string) {
}
fmt.Println(outputFormat)
} else if !crawler.Quiet {
outputFormat = fmt.Sprintf("http://%s", sub)
outputFormat = fmt.Sprintf("[subdomains] - http://%s", sub)
fmt.Println(outputFormat)
outputFormat = fmt.Sprintf("https://%s", sub)
outputFormat = fmt.Sprintf("[subdomains] - https://%s", sub)
fmt.Println(outputFormat)
}
if crawler.Output != nil {
Expand Down

0 comments on commit 680a7d5

Please sign in to comment.