From c9bed90f21b97e0e8a50bbde4bd485857dacfc0a Mon Sep 17 00:00:00 2001 From: edoardottt Date: Sat, 3 Sep 2022 12:57:14 +0200 Subject: [PATCH] linter (whitespace) --- crawler/colly.go | 4 ---- input/check.go | 1 - input/flags.go | 1 - input/input.go | 1 - output/output.go | 3 --- 5 files changed, 10 deletions(-) diff --git a/crawler/colly.go b/crawler/colly.go index ef8c618..bd45f04 100644 --- a/crawler/colly.go +++ b/crawler/colly.go @@ -52,7 +52,6 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency endpointsFile []string, fileType int, headers map[string]string, errors bool, info bool, debug bool, userAgent string) ([]string, []scanner.SecretMatched, []scanner.EndpointMatched, []scanner.FileTypeMatched, []scanner.ErrorMatched, []scanner.InfoMatched) { - // This is to avoid to insert into the crawler target regular // expression directories passed as input. var targetTemp, protocolTemp string @@ -287,7 +286,6 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency } c.OnResponse(func(r *colly.Response) { - fmt.Println(r.Request.URL.String()) lengthOk := len(string(r.Body)) > 10 @@ -373,7 +371,6 @@ func Crawler(target string, txt string, html string, delayTime int, concurrency //a new Colly Collector object and it returns this object. func CreateColly(delayTime int, concurrency int, cache bool, timeout int, intensive bool, rua bool, proxy string, insecure bool, userAgent string, target string) *colly.Collector { - c := colly.NewCollector( colly.Async(true), ) @@ -500,7 +497,6 @@ func EndpointsMatch(target string, endpointsFile []string) []scanner.EndpointMat } } } else { - for _, parameter := range endpointsFile { for _, param := range parameters { if param == parameter { diff --git a/input/check.go b/input/check.go index 461ec0f..d9dfade 100644 --- a/input/check.go +++ b/input/check.go @@ -38,7 +38,6 @@ import ( //if it's correctly formatted to be represented as post data //TODO - for now cariddi sends only GET requests func CheckDataPost(input string) (map[string]string, error) { - // ===== TODO ======= return map[string]string{}, nil } diff --git a/input/flags.go b/input/flags.go index a7f4995..72ce13c 100644 --- a/input/flags.go +++ b/input/flags.go @@ -66,7 +66,6 @@ type Input struct { //as input and scan them, then it returns //an Input struct. func ScanFlag() Input { - versionPtr := flag.Bool("version", false, "Print the version.") delayPtr := flag.Int("d", 0, "Delay between a page crawled and another.") concurrencyPtr := flag.Int("c", 20, "Concurrency level.") diff --git a/input/input.go b/input/input.go index f8e283e..11a6e1f 100644 --- a/input/input.go +++ b/input/input.go @@ -38,7 +38,6 @@ import ( //ScanTargets return the array of elements //taken as input on stdin. func ScanTargets() []string { - var result []string // accept domains on stdin diff --git a/output/output.go b/output/output.go index 6f60928..cbb5d48 100644 --- a/output/output.go +++ b/output/output.go @@ -48,7 +48,6 @@ func PrintSimpleOutput(out []string) { func TxtOutput(flags input.Input, finalResults []string, finalSecret []scanner.SecretMatched, finalEndpoints []scanner.EndpointMatched, finalExtensions []scanner.FileTypeMatched, finalErrors []scanner.ErrorMatched, finalInfos []scanner.InfoMatched) { - exists, err := utils.ElementExists("output-cariddi") if err != nil { fmt.Println("Error while creating the output directory.") @@ -78,7 +77,6 @@ func TxtOutput(flags input.Input, finalResults []string, finalSecret []scanner.S for _, elem := range finalEndpoints { for _, parameter := range elem.Parameters { - finalString := "" + parameter.Parameter if len(parameter.Attacks) != 0 { finalString += " -" @@ -158,7 +156,6 @@ func HtmlOutput(flags input.Input, ResultFilename string, finalResults []string, for _, elem := range finalEndpoints { for _, parameter := range elem.Parameters { - finalString := "" + parameter.Parameter if len(parameter.Attacks) != 0 { finalString += " -"