Hello everyone,
I would like to report a bug related to cookie sending with Dirbuster.
It seems to affect both stable and dev releases.
Indeed for authenticated tests I often set a custom HTTP header, named "Cookie" with the appropriate and current value.
The thing is, when DirBuster sees a "Set-Cookie:" in one of the response, it automatically adds the seen cookie information (stored in the jar) to the next requests.
As a consequence, my next requests have 2 "Cookie" headers and can confuse a web server.
Long story short, here's a quick example on how to reproduce the bug:
The idea to correct this side-effect would be :
As I quickly dug into the code, I saw that the lines 88-94 of the DirBuster/FilterResponce.java tries to do the second solution. So I don't know why I'm still experiencing that bug.
//Remove cookie header
p = Pattern.compile("Set-Cookie:.*?\r\n", Pattern.CASE_INSENSITIVE);
m = p.matcher(toclean);
if(m.find())
{
//System.out.println("Found Date value = '" + m.group(0) + "'");
toclean = toclean.replaceAll(m.group(0), "SET-COOKIE LINE REMOVED\r\n");
}
Best regards.
Thomas.