From 66136b48c0656f706d0fdc103a04f743f9e0d33c Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 17 Oct 2008 11:51:12 +0000 Subject: [PATCH] Minor fixes.. should work also for Cookie now the % parsing --- doc/README.sgml | 2 +- lib/request/connect.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/README.sgml b/doc/README.sgml index 9a9cecaa1..1a5e3c736 100644 --- a/doc/README.sgml +++ b/doc/README.sgml @@ -33,7 +33,7 @@ read specific files on the file system and much more. sqlmap is developed in , a dynamic object-oriented interpreted programming language. This makes the tool independent from the operating system since it only -requires the Python interpreter. +requires the Python interpreter version equal or above to 2.4. The interpreter is freely downloadable from its . To make it even easier, many GNU/Linux distributions come out of the box diff --git a/lib/request/connect.py b/lib/request/connect.py index 5b10a4598..4532edb50 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -74,7 +74,7 @@ class Connect: if direct: if "?" in url: url, params = url.split("?") - params = urlencode(params) + params = urlencode(params).replace("%%", "%") url = "%s?%s" % (url, params) requestMsg += "?%s" % params elif multipart: @@ -100,7 +100,7 @@ class Connect: try: # Perform HTTP request - headers = forgeHeaders(cookie, ua) + headers = forgeHeaders(urlencode(cookie).replace("%%", "%"), ua) req = urllib2.Request(url, post, headers) conn = urllib2.urlopen(req) @@ -113,7 +113,7 @@ class Connect: if not cookieStr: cookieStr = "Cookie: " - cookie = str(cookie).replace("%%", "%") + cookie = str(cookie) index = cookie.index(" for ") cookieStr += "%s; " % cookie[8:index]