MCPcopy Create free account
hub / github.com/Hackmanit/Web-Cache-Vulnerability-Scanner / cbFoundDifference

Function cbFoundDifference

pkg/recon.go:16–30  ·  view source on GitHub ↗
(times []int64, identifier string)

Source from the content-addressed store, hash-verified

14)
15
16func cbFoundDifference(times []int64, identifier string) { // TODO: Remove this function as it is only used for statistics
17 if len(times)%2 == 0 {
18 for i := 0; i < len(times); i += 2 {
19 dif := times[i] - times[i+1]
20 if dif < int64(Config.HMDiff) {
21 msg := fmt.Sprintf("The time difference (%d) was smaller than the threshold (%d)\n", dif, Config.HMDiff)
22 PrintVerbose(msg, NoColor, 2)
23 return
24 }
25 }
26 } else {
27 msg := fmt.Sprintf("%s: len(times) mod 2 != 0\n", identifier)
28 Print(msg, Yellow)
29 }
30}
31
32func cbNotFoundDifference(times []int64, identifier string) {
33 if len(times)%2 == 0 {

Callers 4

cachebusterCookieFunction · 0.85
cachebusterHeaderFunction · 0.85
cachebusterParameterFunction · 0.85
cachebusterHTTPMethodFunction · 0.85

Calls 2

PrintVerboseFunction · 0.85
PrintFunction · 0.85

Tested by

no test coverage detected