Skip to content

Commit 99e5c5d

Browse files
author
Maximilian Hildebrand
committed
fixed deadlock, fixed JSON bug, improved prints
1 parent 5ab5e19 commit 99e5c5d

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

pkg/flags.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ func ParseFlags(vers string) {
133133

134134
// Wordlist Options
135135
appendString(&wordlistOptions, &Config.HeaderWordlist,
136-
"headerwordlist", "hw", "wordlists/top-headers", "Wordlist for headers to test. Default path is 'wordlists/top-headers'")
136+
"headerwordlist", "hw", "wordlists/headers", "Wordlist for headers to test. Default path is 'wordlists/top-headers'")
137137
appendString(&wordlistOptions, &Config.QueryWordlist,
138-
"parameterwordlist", "pw", "wordlists/top-parameters", "Wordlist for query parameters to test. Default path is 'wordlists/top-parameters'")
138+
"parameterwordlist", "pw", "wordlists/parameters", "Wordlist for query parameters to test. Default path is 'wordlists/top-parameters'")
139139

140140
flag.CommandLine.Usage = help
141141

pkg/recon.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ func cbFoundDifference(times []int64, identifier string) {
7171
for i := 0; i < len(times); i += 2 {
7272
dif := times[i] - times[i+1]
7373
if dif < int64(Config.HMDiff) {
74-
msg := fmt.Sprintf("The time difference (%d) was smaller than the threshold (%d)", dif, Config.HMDiff)
75-
Print(msg, Yellow)
74+
msg := fmt.Sprintf("The time difference (%d) was smaller than the threshold (%d)\n", dif, Config.HMDiff)
75+
PrintVerbose(msg, White, 2)
7676
timeFalseNeg = append(timeFalseNeg, dif)
7777
addFalseNeg()
7878
return
7979
}
8080
}
8181
} else {
82-
msg := fmt.Sprintf("%s: len(times) mod 2 != 0", identifier)
82+
msg := fmt.Sprintf("%s: len(times) mod 2 != 0\n", identifier)
8383
Print(msg, Yellow)
8484
}
8585
}

pkg/report.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func GenerateReport(report Report, currentDate string) {
6464
var file *os.File
6565
defer file.Close()
6666

67-
file, err := os.OpenFile(reportPath, os.O_WRONLY|os.O_CREATE, 0666)
67+
file, err := os.OpenFile(reportPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
6868
if err != nil {
6969
msg := "Report: " + err.Error() + "\n"
7070
PrintFatal(msg)

pkg/request_smuggling.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ func httpRequestSmuggling(req string, result *reportResult, proxyUrl *url.URL) {
296296
Print(msg, Green)
297297
} else {
298298
msg = "Response:" + resp + "Request didn't time out and therefore *likely* isn't vulnerable to this Request Smuggling technique.\n"
299-
Print(msg, Yellow)
299+
PrintVerbose(msg, White, 2)
300300
}
301301
return
302302
}

pkg/requests.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ func checkPoisoningIndicators(repResult *reportResult, request reportRequest, su
7272

7373
if request.Reason == "" {
7474
// To prevent false positives and too many requests
75-
m2.Lock()
76-
defer m2.Unlock()
75+
if !recursive {
76+
m2.Lock()
77+
defer m2.Unlock()
78+
}
7779

7880
if poison != "" && strings.Contains(body, poison) {
7981
request.Reason = "Response Body contained " + poison

wordlists/headers

+1-1
Original file line numberDiff line numberDiff line change
@@ -1115,4 +1115,4 @@ xxx-real-ip
11151115
xxxxxxxxxxxxxxx
11161116
y
11171117
zotero-api-version
1118-
zotero-write-token
1118+
zotero-write-token

0 commit comments

Comments
 (0)