From 15bbdbd9c23ba2f2bde23e17d7bd357c4bd176c3 Mon Sep 17 00:00:00 2001 From: edoardottt Date: Fri, 24 Dec 2021 11:53:56 +0100 Subject: [PATCH] Fix panic --- crawler/colly.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crawler/colly.go b/crawler/colly.go index f1326dc..365bf55 100644 --- a/crawler/colly.go +++ b/crawler/colly.go @@ -251,7 +251,10 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency // HERE SCAN FOR SECRETS if secrets && lengthOk { secretsSlice := huntSecrets(secretsFile, r.Request.URL.String(), string(r.Body)) - FinalSecrets = append(FinalSecrets, secretsSlice...) + //FinalSecrets = append(FinalSecrets, secretsSlice...) + for _, elem := range secretsSlice { + FinalSecrets = append(FinalSecrets, elem) + } } // HERE SCAN FOR ENDPOINTS if endpoints { @@ -272,7 +275,10 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency // HERE SCAN FOR ERRORS if errors { errorsSlice := huntErrors(r.Request.URL.String(), string(r.Body)) - FinalErrors = append(FinalErrors, errorsSlice...) + //FinalErrors = append(FinalErrors, errorsSlice...) + for _, elem := range errorsSlice { + FinalErrors = append(FinalErrors, elem) + } } } })