Minor fixes.. should work also for Cookie now the % parsing

This commit is contained in:
Bernardo Damele 2008-10-17 11:51:12 +00:00
parent e2fedd3b46
commit 66136b48c0
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ read specific files on the file system and much more.
sqlmap is developed in <htmlurl url="http://www.python.org" name="Python">, sqlmap is developed in <htmlurl url="http://www.python.org" name="Python">,
a dynamic object-oriented interpreted programming language. a dynamic object-oriented interpreted programming language.
This makes the tool independent from the operating system since it only 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 The interpreter is freely downloadable from its
<htmlurl url="http://python.org/download/" name="official site">. <htmlurl url="http://python.org/download/" name="official site">.
To make it even easier, many GNU/Linux distributions come out of the box To make it even easier, many GNU/Linux distributions come out of the box

View File

@ -74,7 +74,7 @@ class Connect:
if direct: if direct:
if "?" in url: if "?" in url:
url, params = url.split("?") url, params = url.split("?")
params = urlencode(params) params = urlencode(params).replace("%%", "%")
url = "%s?%s" % (url, params) url = "%s?%s" % (url, params)
requestMsg += "?%s" % params requestMsg += "?%s" % params
elif multipart: elif multipart:
@ -100,7 +100,7 @@ class Connect:
try: try:
# Perform HTTP request # Perform HTTP request
headers = forgeHeaders(cookie, ua) headers = forgeHeaders(urlencode(cookie).replace("%%", "%"), ua)
req = urllib2.Request(url, post, headers) req = urllib2.Request(url, post, headers)
conn = urllib2.urlopen(req) conn = urllib2.urlopen(req)
@ -113,7 +113,7 @@ class Connect:
if not cookieStr: if not cookieStr:
cookieStr = "Cookie: " cookieStr = "Cookie: "
cookie = str(cookie).replace("%%", "%") cookie = str(cookie)
index = cookie.index(" for ") index = cookie.index(" for ")
cookieStr += "%s; " % cookie[8:index] cookieStr += "%s; " % cookie[8:index]