about summary refs log tree commit diff
path: root/src/wordlist.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/wordlist.go')
-rw-r--r--src/wordlist.go16
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("[+]"))
+	}
 }