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

Function responseCookiesToMap

pkg/utils.go:138–151  ·  view source on GitHub ↗
(resp *fasthttp.Response, cookieMap map[string]string)

Source from the content-addressed store, hash-verified

136}
137
138func responseCookiesToMap(resp *fasthttp.Response, cookieMap map[string]string) map[string]string {
139 resp.Header.VisitAllCookie(func(key, value []byte) {
140 c := &fasthttp.Cookie{}
141 c.ParseBytes(value)
142 if err := c.ParseBytes(value); err == nil {
143 cookieMap[string(key)] = string(c.Value())
144 } else {
145 msg := fmt.Sprintf("Error parsing cookie %s: %s\n", string(value), err.Error())
146 Print(msg, Red)
147 }
148 })
149
150 return cookieMap
151}
152
153func urlEncodeAll(input string) string {
154 encoded := ""

Callers 1

GetWebsiteFunction · 0.85

Calls 1

PrintFunction · 0.85

Tested by

no test coverage detected