Skip to content

Commit 66136b4

Browse files
committed
Minor fixes.. should work also for Cookie now the % parsing
1 parent e2fedd3 commit 66136b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/README.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ read specific files on the file system and much more.
3333
sqlmap is developed in <htmlurl url="http://www.python.org" name="Python">,
3434
a dynamic object-oriented interpreted programming language.
3535
This makes the tool independent from the operating system since it only
36-
requires the Python interpreter.
36+
requires the Python interpreter version equal or above to 2.4.
3737
The interpreter is freely downloadable from its
3838
<htmlurl url="http://python.org/download/" name="official site">.
3939
To make it even easier, many GNU/Linux distributions come out of the box

lib/request/connect.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def getPage(**kwargs):
7474
if direct:
7575
if "?" in url:
7676
url, params = url.split("?")
77-
params = urlencode(params)
77+
params = urlencode(params).replace("%%", "%")
7878
url = "%s?%s" % (url, params)
7979
requestMsg += "?%s" % params
8080
elif multipart:
@@ -100,7 +100,7 @@ def getPage(**kwargs):
100100

101101
try:
102102
# Perform HTTP request
103-
headers = forgeHeaders(cookie, ua)
103+
headers = forgeHeaders(urlencode(cookie).replace("%%", "%"), ua)
104104
req = urllib2.Request(url, post, headers)
105105
conn = urllib2.urlopen(req)
106106

@@ -113,7 +113,7 @@ def getPage(**kwargs):
113113
if not cookieStr:
114114
cookieStr = "Cookie: "
115115

116-
cookie = str(cookie).replace("%%", "%")
116+
cookie = str(cookie)
117117
index = cookie.index(" for ")
118118

119119
cookieStr += "%s; " % cookie[8:index]

0 commit comments

Comments
 (0)