| 186 | } |
| 187 | |
| 188 | func setRequestCookies(req *fasthttp.Request, cb string, cookie map[string]string) { |
| 189 | cache := Config.Website.Cache |
| 190 | |
| 191 | for k, v := range Config.Website.Cookies { |
| 192 | if cb != "" && cache.CBisCookie && k == cache.CBName { |
| 193 | if k == cookie["key"] { |
| 194 | msg := "Can't test cookie " + k + " for Web Cache Poisoning, as it is used as Cachebuster\n" |
| 195 | Print(msg, Yellow) |
| 196 | continue |
| 197 | } |
| 198 | k = cb |
| 199 | } else if k == cookie["key"] { |
| 200 | v = cookie["value"] |
| 201 | } |
| 202 | req.Header.SetCookie(k, v) |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | func addCachebusterParameter(strUrl string, cbvalue string, cb string, prepend bool) (string, string) { |
| 207 | if cbvalue == "" { |