mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Update for an Issue #12
This commit is contained in:
parent
79fca8e9d5
commit
42a8234c6f
|
@ -835,7 +835,7 @@ def __setTamperingFunctions():
|
||||||
priority = PRIORITY.NORMAL if not hasattr(module, '__priority__') else module.__priority__
|
priority = PRIORITY.NORMAL if not hasattr(module, '__priority__') else module.__priority__
|
||||||
|
|
||||||
for name, function in inspect.getmembers(module, inspect.isfunction):
|
for name, function in inspect.getmembers(module, inspect.isfunction):
|
||||||
if name == "tamper" and function.func_code.co_argcount == 2:
|
if name == "tamper":
|
||||||
found = True
|
found = True
|
||||||
kb.tamperFunctions.append(function)
|
kb.tamperFunctions.append(function)
|
||||||
function.func_name = module.__name__
|
function.func_name = module.__name__
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOWEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces apostrophe character with its UTF-8 full width counterpart
|
Replaces apostrophe character with its UTF-8 full width counterpart
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOWEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces apostrophe character with its illegal double unicode counterpart
|
Replaces apostrophe character with its illegal double unicode counterpart
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOWEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Appends encoded NULL byte character at the end of payload
|
Appends encoded NULL byte character at the end of payload
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOWEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Base64 all characters in a given payload
|
Base64 all characters in a given payload
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.HIGHEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces greater than operator ('>') with 'NOT BETWEEN 0 AND #'
|
Replaces greater than operator ('>') with 'NOT BETWEEN 0 AND #'
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ __priority__ = PRIORITY.NORMAL
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character after SQL statement with a valid random blank character.
|
Replaces space character after SQL statement with a valid random blank character.
|
||||||
Afterwards replace character = with LIKE operator
|
Afterwards replace character = with LIKE operator
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Double url-encodes all characters in a given payload (not processing
|
Double url-encodes all characters in a given payload (not processing
|
||||||
already encoded)
|
already encoded)
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOWEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Url-encodes all characters in a given payload (not processing already
|
Url-encodes all characters in a given payload (not processing already
|
||||||
encoded)
|
encoded)
|
||||||
|
|
|
@ -16,7 +16,7 @@ __priority__ = PRIORITY.LOWEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against ASP or ASP.NET web applications" % os.path.basename(__file__).split(".")[0])
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against ASP or ASP.NET web applications" % os.path.basename(__file__).split(".")[0])
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Unicode-url-encodes non-encoded characters in a given payload (not
|
Unicode-url-encodes non-encoded characters in a given payload (not
|
||||||
processing already encoded)
|
processing already encoded)
|
||||||
|
|
|
@ -17,7 +17,7 @@ __priority__ = PRIORITY.HIGHEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is unlikely to work against %s" % (os.path.basename(__file__).split(".")[0], DBMS.PGSQL))
|
singleTimeWarnMessage("tamper script '%s' is unlikely to work against %s" % (os.path.basename(__file__).split(".")[0], DBMS.PGSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces all occurances of operator equal ('=') with operator 'LIKE'
|
Replaces all occurances of operator equal ('=') with operator 'LIKE'
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ __priority__ = PRIORITY.HIGHER
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s < 5.1" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s < 5.1" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Adds versioned MySQL comment before each keyword
|
Adds versioned MySQL comment before each keyword
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.HIGHEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces instances like 'IFNULL(A, B)' with 'IF(ISNULL(A), B, A)'
|
Replaces instances like 'IFNULL(A, B)' with 'IF(ISNULL(A), B, A)'
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ __priority__ = PRIORITY.HIGHER
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Embraces complete query with versioned comment
|
Embraces complete query with versioned comment
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.HIGHER
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Embraces complete query with zero-versioned comment
|
Embraces complete query with zero-versioned comment
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ __priority__ = PRIORITY.NORMAL
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Adds multiple spaces around SQL keywords
|
Adds multiple spaces around SQL keywords
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
__priority__ = PRIORITY.NORMAL
|
__priority__ = PRIORITY.NORMAL
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces predefined SQL keywords with representations
|
Replaces predefined SQL keywords with representations
|
||||||
suitable for replacement (e.g. .replace("SELECT", "")) filters
|
suitable for replacement (e.g. .replace("SELECT", "")) filters
|
||||||
|
|
|
@ -16,7 +16,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against ASP web applications" % os.path.basename(__file__).split(".")[0])
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against ASP web applications" % os.path.basename(__file__).split(".")[0])
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Adds a percentage sign ('%') infront of each character
|
Adds a percentage sign ('%') infront of each character
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ __priority__ = PRIORITY.NORMAL
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces each keyword character with random case value
|
Replaces each keyword character with random case value
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
__priority__ = PRIORITY.LOW
|
__priority__ = PRIORITY.LOW
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Add random comments to SQL keywords
|
Add random comments to SQL keywords
|
||||||
Example: 'INSERT' becomes 'IN/**/S/**/ERT'
|
Example: 'INSERT' becomes 'IN/**/S/**/ERT'
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.NORMAL
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Appends special crafted string
|
Appends special crafted string
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
__priority__ = PRIORITY.HIGH
|
__priority__ = PRIORITY.HIGH
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Appends 'sp_password' to the end of the payload for automatic obfuscation from DBMS logs
|
Appends 'sp_password' to the end of the payload for automatic obfuscation from DBMS logs
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with comments '/**/'
|
Replaces space character (' ') with comments '/**/'
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
__priority__ = PRIORITY.LOW
|
__priority__ = PRIORITY.LOW
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a dash comment ('--') followed by
|
Replaces space character (' ') with a dash comment ('--') followed by
|
||||||
a random string and a new line ('\n')
|
a random string and a new line ('\n')
|
||||||
|
|
|
@ -18,7 +18,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a pound character ('#') followed by
|
Replaces space character (' ') with a pound character ('#') followed by
|
||||||
a random string and a new line ('\n')
|
a random string and a new line ('\n')
|
||||||
|
|
|
@ -21,7 +21,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s > 5.1.13" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s > 5.1.13" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a pound character ('#') followed by
|
Replaces space character (' ') with a pound character ('#') followed by
|
||||||
a random string and a new line ('\n')
|
a random string and a new line ('\n')
|
||||||
|
|
|
@ -17,7 +17,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MSSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MSSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a random blank character from a
|
Replaces space character (' ') with a random blank character from a
|
||||||
valid set of alternate characters
|
valid set of alternate characters
|
||||||
|
|
|
@ -9,7 +9,7 @@ from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
__priority__ = PRIORITY.LOW
|
__priority__ = PRIORITY.LOW
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a pound character ('#') followed by
|
Replaces space character (' ') with a pound character ('#') followed by
|
||||||
a new line ('\n')
|
a new line ('\n')
|
||||||
|
|
|
@ -17,7 +17,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a random blank character from a
|
Replaces space character (' ') with a random blank character from a
|
||||||
valid set of alternate characters
|
valid set of alternate characters
|
||||||
|
|
|
@ -16,7 +16,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a dash comment ('--') followed by
|
Replaces space character (' ') with a dash comment ('--') followed by
|
||||||
a new line ('\n')
|
a new line ('\n')
|
||||||
|
|
|
@ -12,7 +12,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with plus ('+')
|
Replaces space character (' ') with plus ('+')
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.LOW
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces space character (' ') with a random blank character from a
|
Replaces space character (' ') with a random blank character from a
|
||||||
valid set of alternate characters
|
valid set of alternate characters
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.HIGHEST
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces UNION ALL SELECT with UNION SELECT
|
Replaces UNION ALL SELECT with UNION SELECT
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ __priority__ = PRIORITY.NORMAL
|
||||||
def dependencies():
|
def dependencies():
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces quote character (') with a multi-byte combo %bf%27 together with
|
Replaces quote character (') with a multi-byte combo %bf%27 together with
|
||||||
generic comment at the end (to make it work)
|
generic comment at the end (to make it work)
|
||||||
|
|
|
@ -18,7 +18,7 @@ __priority__ = PRIORITY.HIGHER
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Encloses each non-function keyword with versioned MySQL comment
|
Encloses each non-function keyword with versioned MySQL comment
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ __priority__ = PRIORITY.HIGHER
|
||||||
def dependencies():
|
def dependencies():
|
||||||
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s >= 5.1.13" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
singleTimeWarnMessage("tamper script '%s' is only meant to be run against %s >= 5.1.13" % (os.path.basename(__file__).split(".")[0], DBMS.MYSQL))
|
||||||
|
|
||||||
def tamper(payload, headers=None):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Encloses each keyword with versioned MySQL comment
|
Encloses each keyword with versioned MySQL comment
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user