mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Minor update for an Issue #203
This commit is contained in:
parent
ebe3f4c34c
commit
8b57e1fce6
|
@ -1962,7 +1962,7 @@ def extractErrorMessage(page):
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def urldecode(value, encoding=None, convall=False):
|
def urldecode(value, encoding=None, unsafe="%&=", convall=False):
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
if value:
|
if value:
|
||||||
|
@ -1976,7 +1976,7 @@ def urldecode(value, encoding=None, convall=False):
|
||||||
result = urllib.unquote_plus(value)
|
result = urllib.unquote_plus(value)
|
||||||
else:
|
else:
|
||||||
def _(match):
|
def _(match):
|
||||||
charset = string.printable.replace("&", "")
|
charset = reduce(lambda x, y: x.replace(y, ""), unsafe, string.printable)
|
||||||
char = chr(ord(match.group(1).decode("hex")))
|
char = chr(ord(match.group(1).decode("hex")))
|
||||||
return char if char in charset else match.group(0)
|
return char if char in charset else match.group(0)
|
||||||
result = re.sub("%([0-9a-fA-F]{2})", _, value)
|
result = re.sub("%([0-9a-fA-F]{2})", _, value)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user