mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
update of tampering modules
This commit is contained in:
@@ -4,7 +4,7 @@ from lib.core.convert import urldecode
|
||||
from lib.core.convert import urlencode
|
||||
|
||||
"""
|
||||
Tampering IFNULL(A,B) -> IF(ISNULL(A),B,A)
|
||||
IFNULL(A,B) -> IF(ISNULL(A),B,A)
|
||||
"""
|
||||
def tamper(place, value):
|
||||
if value and value.find("IFNULL") > -1:
|
||||
@@ -25,10 +25,13 @@ def tamper(place, value):
|
||||
deepness += 1
|
||||
elif value[i] == ')':
|
||||
deepness -= 1
|
||||
A = value[index + len("IFNULL("):comma]
|
||||
B = value[comma + 1:end]
|
||||
newVal = "IF(ISNULL(%s),%s,%s)" % (A, B, A)
|
||||
value = value[:index] + newVal + value[end+1:]
|
||||
if comma and end:
|
||||
A = value[index + len("IFNULL("):comma]
|
||||
B = value[comma + 1:end]
|
||||
newVal = "IF(ISNULL(%s),%s,%s)" % (A, B, A)
|
||||
value = value[:index] + newVal + value[end+1:]
|
||||
else:
|
||||
break
|
||||
if place != "URI":
|
||||
value = urlencode(value)
|
||||
return value
|
||||
|
||||
Reference in New Issue
Block a user