mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Potential patch for an Issue #914
This commit is contained in:
parent
cdbfb17408
commit
dfa8e0456d
|
@ -1544,13 +1544,14 @@ def safeStringFormat(format_, params):
|
||||||
elif not isListLike(params):
|
elif not isListLike(params):
|
||||||
retVal = retVal.replace("%s", str(params), 1)
|
retVal = retVal.replace("%s", str(params), 1)
|
||||||
else:
|
else:
|
||||||
count, index = 0, 0
|
start, end = 0, len(retVal)
|
||||||
if retVal.count("%s") == len(params):
|
match = re.search(r"%s(.+)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER), retVal)
|
||||||
while index != -1:
|
if match and PAYLOAD_DELIMITER not in match.group(1):
|
||||||
index = retVal.find("%s")
|
start, end = match.start(), match.end()
|
||||||
if index != -1:
|
if retVal.count("%s", start, end) == len(params):
|
||||||
retVal = retVal[:index] + getUnicode(params[count]) + retVal[index + 2:]
|
for param in params:
|
||||||
count += 1
|
index = retVal.find("%s", start)
|
||||||
|
retVal = retVal[:index] + getUnicode(param) + retVal[index + 2:]
|
||||||
else:
|
else:
|
||||||
count = 0
|
count = 0
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user