From f810c9c4e96807171ddc2cae5a24a5957902808a Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 2 Nov 2019 16:48:31 +0100 Subject: added a done channel --- src/http.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/http.go') 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 + } } -- cgit 1.4.1