about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-11-02 16:48:31 +0100
committerEmile <hanemile@protonmail.com>2019-11-02 16:48:31 +0100
commitf810c9c4e96807171ddc2cae5a24a5957902808a (patch)
treec775692c7367fead7586a04660854e158599ad43
parent9e4266453063cdf53c3668438712ecb19b2d6190 (diff)
added a done channel
-rw-r--r--src/http.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/http.go b/src/http.go
index 6164976..12a8a6d 100644
--- a/src/http.go
+++ b/src/http.go
@@ -6,8 +6,7 @@ import (
 	"strings"
 )
 
-func httpRequest(wordlistChannel chan string, printChannel chan Response) {
-	log.Println("http request")
+func httpRequest(wordlistChannel chan string, printChannel chan Response, doneChannel chan int, threadNr int) {
 	for {
 		// replace the first instance of "FUZZ" in the given url by the next
 		// value from the wordlistChannel
@@ -29,4 +28,8 @@ func httpRequest(wordlistChannel chan string, printChannel chan Response) {
 		// insert the response into the print channel for further printing
 		printChannel <- response
 	}
+
+	if doneChannel != nil {
+		doneChannel <- threadNr
+	}
 }