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

Function cbNotFoundDifference

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

Source from the content-addressed store, hash-verified

30}
31
32func cbNotFoundDifference(times []int64, identifier string) {
33 if len(times)%2 == 0 {
34 for i := 0; i < len(times); i += 2 {
35 dif := times[i] - times[i+1]
36 if dif >= int64(Config.HMDiff) {
37 msg := fmt.Sprintf("The time difference (%d) was equal or higher than the threshold (%d)", dif, Config.HMDiff)
38 Print(msg, Yellow)
39 return
40 }
41 }
42 } else {
43 msg := fmt.Sprintf("%s: len(times) mod 2 != 0", identifier)
44 Print(msg, Yellow)
45 }
46}
47
48/* Check if the parameter "cb" (or any other defined by flag -cb), the headers "accept-encoding, accept, cookie, origin" or any cookie can be used as cachebuster */
49func CheckCache(parameterList []string, headerList []string) (CacheStruct, bool, []error) {

Callers 4

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

Calls 1

PrintFunction · 0.85

Tested by

no test coverage detected