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

Function PrintVerbose

pkg/utils.go:58–79  ·  view source on GitHub ↗
(msg string, c int, threshold int)

Source from the content-addressed store, hash-verified

56}
57
58func PrintVerbose(msg string, c int, threshold int) {
59 switch c {
60 case Red:
61 PrintLog("[ERR] " + msg)
62 msg = color.RedString("[ERR] ") + msg
63 case Yellow:
64 PrintLog("[!] " + msg)
65 msg = color.YellowString("[!] ") + msg
66 case Green:
67 PrintLog("[+] " + msg)
68 msg = color.GreenString("[+] ") + msg
69 case Cyan:
70 PrintLog("[*] " + msg)
71 msg = color.CyanString("[*] ") + msg
72 default:
73 PrintLog(msg)
74 }
75
76 if Config.Verbosity >= threshold || !Config.Intitialized {
77 fmt.Print(msg)
78 }
79}
80
81func Print(msg string, c int) {
82 PrintVerbose(msg, c, 0)

Callers 15

mainFunction · 0.92
runTestsFunction · 0.92
createCompletedURLsFunction · 0.92
httpRequestSmugglingFunction · 0.85
PrintFunction · 0.85
analyzeCacheIndicatorFunction · 0.85
cbFoundDifferenceFunction · 0.85
CheckCacheFunction · 0.85
cachebusterCookieFunction · 0.85
cachebusterHeaderFunction · 0.85
cachebusterParameterFunction · 0.85
cachebusterHTTPMethodFunction · 0.85

Calls 1

PrintLogFunction · 0.85

Tested by 1

TestWebCacheDeceptionFunction · 0.68