From 2a8697d1d2e1c5e67c64ff3ec9ce11d39bb2f4de Mon Sep 17 00:00:00 2001 From: edoardottt Date: Thu, 2 Sep 2021 09:52:01 +0200 Subject: [PATCH] Update final results output --- crawler/colly.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crawler/colly.go b/crawler/colly.go index e32cb23..558f95f 100644 --- a/crawler/colly.go +++ b/crawler/colly.go @@ -125,6 +125,8 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency c.Visit(e.Request.AbsoluteURL(link)) } } else { + FinalResults = append(FinalResults, + utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) c.Visit(utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) } } @@ -141,6 +143,8 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency c.Visit(e.Request.AbsoluteURL(link)) } } else { + FinalResults = append(FinalResults, + utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) c.Visit(utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) } } @@ -157,6 +161,8 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency c.Visit(e.Request.AbsoluteURL(link)) } } else { + FinalResults = append(FinalResults, + utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) c.Visit(utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) } } @@ -173,6 +179,8 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency c.Visit(e.Request.AbsoluteURL(link)) } } else { + FinalResults = append(FinalResults, + utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) c.Visit(utils.AbsoluteURL(protocolTemp, targetTemp, e.Request.AbsoluteURL(link))) } } @@ -184,8 +192,6 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency lengthOk := len(string(r.Body)) > 10 - FinalResults = append(FinalResults, r.Request.URL.String()) - //if endpoints or secrets or filetype: scan if endpoints || secrets || (1 <= fileType && fileType <= 7) { // HERE SCAN FOR SECRETS