mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-06 06:03:22 +03:00
this was bothering me for some time (POST and/or GET payloads needs to be urlencoded throughly)
This commit is contained in:
parent
d8a76ebe34
commit
5eae525010
|
@ -87,15 +87,15 @@ def urlencode(value, safe="%&=", convall=False, limit=False):
|
||||||
if conf.direct or "POSTxml" in conf.paramDict:
|
if conf.direct or "POSTxml" in conf.paramDict:
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
count = 0
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
if value is None:
|
if value is None:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if convall:
|
if convall or safe is None:
|
||||||
result = urllib.quote(utf8encode(value)) # Reference: http://old.nabble.com/Re:-Problem:-neither-urllib2.quote-nor-urllib.quote-encode-the--unicode-strings-arguments-p19823144.html
|
safe = ""
|
||||||
else:
|
|
||||||
count = 0
|
|
||||||
while True:
|
while True:
|
||||||
result = urllib.quote(utf8encode(value), safe)
|
result = urllib.quote(utf8encode(value), safe)
|
||||||
|
|
||||||
|
|
|
@ -414,7 +414,12 @@ class Connect:
|
||||||
if place == PLACE.COOKIE and conf.cookieUrlencode:
|
if place == PLACE.COOKIE and conf.cookieUrlencode:
|
||||||
value = agent.removePayloadDelimiters(value)
|
value = agent.removePayloadDelimiters(value)
|
||||||
value = urlEncodeCookieValues(value)
|
value = urlEncodeCookieValues(value)
|
||||||
|
|
||||||
elif place:
|
elif place:
|
||||||
|
if place in (PLACE.GET, PLACE.POST):
|
||||||
|
payload = urlencode(payload, None, True, True)
|
||||||
|
value = agent.replacePayload(value, payload)
|
||||||
|
|
||||||
value = agent.removePayloadDelimiters(value)
|
value = agent.removePayloadDelimiters(value)
|
||||||
|
|
||||||
if conf.checkPayload:
|
if conf.checkPayload:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user