mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-27 08:30:10 +03:00
Update sleepgetlock.py
This commit is contained in:
parent
8900993205
commit
102ba18109
|
@ -1,5 +1,10 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Copyright (c) 2006-2020 sqlmap developers (http://sqlmap.org/)
|
||||||
|
See the file 'LICENSE' for copying permission
|
||||||
|
"""
|
||||||
|
|
||||||
from lib.core.enums import PRIORITY
|
from lib.core.enums import PRIORITY
|
||||||
|
|
||||||
__priority__ = PRIORITY.HIGHEST
|
__priority__ = PRIORITY.HIGHEST
|
||||||
|
@ -9,7 +14,7 @@ def dependencies():
|
||||||
|
|
||||||
def tamper(payload, **kwargs):
|
def tamper(payload, **kwargs):
|
||||||
"""
|
"""
|
||||||
Replaces instances like 'SLEEP(A)' with "get_lock('do9gy',A)"
|
Replaces instances like 'SLEEP(x)' with "get_lock('sqlmap',x)"
|
||||||
|
|
||||||
Requirement:
|
Requirement:
|
||||||
* MySQL
|
* MySQL
|
||||||
|
@ -21,8 +26,10 @@ def tamper(payload, **kwargs):
|
||||||
* Useful to bypass very weak and bespoke web application firewalls
|
* Useful to bypass very weak and bespoke web application firewalls
|
||||||
that filter the SLEEP() and BENCHMARK() functions
|
that filter the SLEEP() and BENCHMARK() functions
|
||||||
|
|
||||||
|
* Reference: https://zhuanlan.zhihu.com/p/35245598
|
||||||
|
|
||||||
>>> tamper('SLEEP(2)')
|
>>> tamper('SLEEP(2)')
|
||||||
"get_lock('do9gy',2)"
|
"get_lock('sqlmap',2)"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if payload and payload.find("SLEEP") > -1:
|
if payload and payload.find("SLEEP") > -1:
|
||||||
|
@ -32,8 +39,7 @@ def tamper(payload, **kwargs):
|
||||||
|
|
||||||
num = payload[index+6]
|
num = payload[index+6]
|
||||||
|
|
||||||
|
newVal = "get_lock('sqlmap',%s)" % (num)
|
||||||
newVal = "get_lock('do9gy',%s)" % (num)
|
|
||||||
payload = payload[:index] + newVal + payload[index+8:]
|
payload = payload[:index] + newVal + payload[index+8:]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user