mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Revert r2209 and minor code refactoring
This commit is contained in:
parent
3eda4510e2
commit
9d08cb3a6f
|
@ -626,7 +626,12 @@ class Agent:
|
||||||
retVal = retVal.replace(PAYLOAD_DELIMITER, '')
|
retVal = retVal.replace(PAYLOAD_DELIMITER, '')
|
||||||
|
|
||||||
if urlencode_:
|
if urlencode_:
|
||||||
retVal = urlencode(retVal)
|
regObj = getCompiledRegex("%s(?P<result>.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER))
|
||||||
|
|
||||||
|
for match in regObj.finditer(inpStr):
|
||||||
|
retVal = retVal.replace(match.group("result"), urlencode(match.group("result"), convall=True))
|
||||||
|
else:
|
||||||
|
retVal = retVal.replace(PAYLOAD_DELIMITER, '')
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
@ -652,8 +657,8 @@ class Agent:
|
||||||
retVal = inpStr
|
retVal = inpStr
|
||||||
|
|
||||||
if inpStr:
|
if inpStr:
|
||||||
regObj = getCompiledRegex("(?P<result>%s.*?%s)" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER))
|
regObj = getCompiledRegex("%s(.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER))
|
||||||
retVal = regObj.sub("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER), inpStr)
|
retVal = regObj.sub(payload, inpStr)
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user