mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
minor refactoring
This commit is contained in:
parent
965c1511a6
commit
ccd6fb70a8
|
@ -29,9 +29,4 @@ def tamper(payload):
|
||||||
* http://lukasz.pilorz.net/testy/full_width_utf/index.phps
|
* http://lukasz.pilorz.net/testy/full_width_utf/index.phps
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = payload
|
return payload.replace('\'', '%EF%BC%87') if payload else payload
|
||||||
|
|
||||||
if payload:
|
|
||||||
retVal = payload.replace('\'', '%EF%BC%87')
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
|
@ -23,9 +23,4 @@ def tamper(payload):
|
||||||
* Output: AND %00%271%00%27=%00%271%00%27
|
* Output: AND %00%271%00%27=%00%271%00%27
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = payload
|
return payload.replace('\'', '%00%27') if payload else payload
|
||||||
|
|
||||||
if payload:
|
|
||||||
retVal = payload.replace('\'', '%00%27')
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
|
@ -33,9 +33,4 @@ def tamper(payload):
|
||||||
Reference: http://projects.webappsec.org/w/page/13246949/Null-Byte-Injection
|
Reference: http://projects.webappsec.org/w/page/13246949/Null-Byte-Injection
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = payload
|
return "%s%%00" % payload if payload else payload
|
||||||
|
|
||||||
if payload:
|
|
||||||
retVal = "%s%%00" % payload
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
|
@ -25,9 +25,4 @@ def tamper(payload):
|
||||||
* Output: MScgQU5EIFNMRUVQKDUpIw==
|
* Output: MScgQU5EIFNMRUVQKDUpIw==
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = payload
|
return base64.b64encode(payload) if payload else payload
|
||||||
|
|
||||||
if payload:
|
|
||||||
retVal = base64.b64encode(payload)
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
|
@ -29,9 +29,4 @@ def tamper(payload):
|
||||||
* Reference: http://seclists.org/fulldisclosure/2011/May/163
|
* Reference: http://seclists.org/fulldisclosure/2011/May/163
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retVal = payload
|
return payload + " and '0having'='0having'" if payload else payload
|
||||||
|
|
||||||
if payload:
|
|
||||||
retVal += " and '0having'='0having'"
|
|
||||||
|
|
||||||
return retVal
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ def tamper(payload):
|
||||||
# LF 0A new line
|
# LF 0A new line
|
||||||
# FF 0C new page
|
# FF 0C new page
|
||||||
# CR 0D carriage return
|
# CR 0D carriage return
|
||||||
blanks = ['%09', '%0A', '%0C', '%0D']
|
blanks = ("%09", "%0A", "%0C", "%0D")
|
||||||
retVal = payload
|
retVal = payload
|
||||||
|
|
||||||
if payload:
|
if payload:
|
||||||
|
@ -60,7 +60,7 @@ def tamper(payload):
|
||||||
elif payload[i] == '"':
|
elif payload[i] == '"':
|
||||||
doublequote = not doublequote
|
doublequote = not doublequote
|
||||||
|
|
||||||
elif payload[i] == " " and not doublequote and not quote:
|
elif payload[i] == ' ' and not doublequote and not quote:
|
||||||
retVal += random.choice(blanks)
|
retVal += random.choice(blanks)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user