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

Function stopContinuation

pkg/requests.go:200–216  ·  view source on GitHub ↗

* Check if the second response makes sense or the continuation shall be stopped. Stop if body, status code and headers are equal to the default response */

(body []byte, statusCode int, headers map[string][]string)

Source from the content-addressed store, hash-verified

198
199/* Check if the second response makes sense or the continuation shall be stopped. Stop if body, status code and headers are equal to the default response */
200func stopContinuation(body []byte, statusCode int, headers map[string][]string) bool {
201 if string(body) != Config.Website.Body {
202 return false
203 } else if statusCode != Config.Website.StatusCode {
204 return false
205 } else if len(headers) != len(Config.Website.Headers) {
206 return false
207 }
208 for k, v := range headers {
209 v2 := Config.Website.Headers[k]
210
211 if !slices.Equal(v, v2) {
212 return false
213 }
214 }
215 return true
216}
217
218func addParameters(urlStr *string, parameters []string) {
219 for _, p := range parameters {

Callers 1

firstRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected