diff options
author | Emile <hanemile@protonmail.com> | 2019-11-03 18:07:28 +0100 |
---|---|---|
committer | Emile <hanemile@protonmail.com> | 2019-11-03 18:07:28 +0100 |
commit | 79244e7df141a416c803b4f7d15819228ec610c5 (patch) | |
tree | 077a66739155175db83c6fd0665800a3a9cee54a /src/wordlist.go | |
parent | d93cbbed938d318abdee405ef29f77a5fe9c3f4a (diff) |
verbose
Diffstat (limited to 'src/wordlist.go')
-rw-r--r-- | src/wordlist.go | 16 |
1 files changed, 12 insertions, 4 deletions
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("[+]")) + } } |