loganhasson / r-u-dead-yet

Automatically exported from code.google.com/p/r-u-dead-yet
33 stars 20 forks source link

CRLF missing in POST method #14

Open davidhcefx opened 3 years ago

davidhcefx commented 3 years ago

Expected

POST /index.php HTTP/1.1\r\n
Host: 127.0.0.1\r\n
Connection: keep-alive\r\n
Content-Length: 100000000\r\n
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n
Cookie: flag=123\r\n
\r\n
name=A

Observed

POST /index.php HTTP/1.1\n
Host: 127.0.0.1\n
Connection: keep-alive\n
Content-Length: 100000000\n
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\n
Cookie: flag=123\r\n
\n
name=A

Suggestion

271c271
<         if "Set-Cookie" in header: cookies += "Cookie: "+header[header.find("""Set-Cookie: """)+12:]+"\n"
---
>         if "Set-Cookie" in header: cookies += "Cookie: "+header[header.find("""Set-Cookie: """)+12:].strip("\r")
274,279c274,280
< POST %(path)s HTTP/1.1
< Host: %(host)s
< Connection: keep-alive
< Content-Length: 100000000
< User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
< %(cookies)s
---
> POST %(path)s HTTP/1.1\r
> Host: %(host)s\r
> Connection: keep-alive\r
> Content-Length: 100000000\r
> User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r
> %(cookies)s\r
> \r
283,288c284,289
< POST %(path)s HTTP/1.1
< Host: %(host)s
< Connection: keep-alive
< Content-Length: 100000000
< User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
<
---
> POST %(path)s HTTP/1.1\r
> Host: %(host)s\r
> Connection: keep-alive\r
> Content-Length: 100000000\r
> User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r
> \r