From 79244e7df141a416c803b4f7d15819228ec610c5 Mon Sep 17 00:00:00 2001 From: Emile Date: Sun, 3 Nov 2019 18:07:28 +0100 Subject: verbose --- src/wordlist.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/wordlist.go') diff --git a/src/wordlist.go b/src/wordlist.go index 4125851..431b91b 100644 --- a/src/wordlist.go +++ b/src/wordlist.go @@ -10,7 +10,9 @@ import ( // (wordlistPath) into an array returning the array and an error, if an error // occurs func readWordlist(wordlistPath string) ([]string, error) { - log.Printf("%s Reading the wordlist", green("[i]")) + if verbose == true { + log.Printf("%s Reading the wordlist", green("[i]")) + } // open the given wordlist file file, err := os.Open(wordlistPath) @@ -30,7 +32,9 @@ func readWordlist(wordlistPath string) ([]string, error) { lines = append(lines, scanner.Text()) } - log.Printf("%s Done reading the wordlist", boldGreen("[+]")) + if verbose == true { + log.Printf("%s Done reading the wordlist", boldGreen("[+]")) + } // return the lines, the line count and no error return lines, nil @@ -38,12 +42,16 @@ func readWordlist(wordlistPath string) ([]string, error) { // writeWordlistToChannel writes the given wordlist (wordlist) into the given channel (wordlistChannel) func writeWordlistToChannel(channels channels, wordlist []string) { - log.Printf("%s Starting inserting the given wordlist into the channel", green("[i]")) + if verbose == true { + log.Printf("%s Starting inserting the given wordlist into the channel", green("[i]")) + } // write all the words from the wordlist into the wordlistChannel for _, line := range wordlist { channels.wordlistChannel <- line } - log.Printf("%s Done inserting the wordlist elements into the wordlist channel", green("[+]")) + if verbose == true { + log.Printf("%s Done inserting the wordlist elements into the wordlist channel", green("[+]")) + } } -- cgit 1.4.1