mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-23 01:56:36 +03:00
fix for that @chunk bug
This commit is contained in:
parent
7dd5bd9d59
commit
decab6642d
|
@ -14,6 +14,7 @@ except:
|
|||
import sha
|
||||
|
||||
import pickle
|
||||
import re
|
||||
import sys
|
||||
import string
|
||||
import struct
|
||||
|
@ -97,6 +98,11 @@ def urlencode(value, safe="%&=", convall=False, limit=False):
|
|||
if convall or safe is None:
|
||||
safe = ""
|
||||
|
||||
# corner case when character % really needs to be
|
||||
# encoded (when not representing url encoded char)
|
||||
if all(map(lambda x: '%' in x, [safe, value])):
|
||||
value = re.sub("%(?![0-9a-fA-F]{2})", "%25", value, re.DOTALL | re.IGNORECASE)
|
||||
|
||||
while True:
|
||||
result = urllib.quote(utf8encode(value), safe)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user