mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-22 14:09:45 +03:00
Merge dcc9d3c62a
into 2ffaaca3d0
This commit is contained in:
commit
17e4c9e694
28
tamper/or2logicaloroperator.py
Normal file
28
tamper/or2logicaloroperator.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Tamper script to replace logical OR with double pipe (||)
|
||||
Useful for evading weak filters that blacklist 'OR'
|
||||
|
||||
Author: relunsec
|
||||
|
||||
"""
|
||||
|
||||
from lib.core.enums import PRIORITY
|
||||
|
||||
__priority__ = PRIORITY.LOW
|
||||
|
||||
def tamper(payload, **kwargs):
|
||||
"""
|
||||
Replaces instances of logical OR with || operator
|
||||
|
||||
Example:
|
||||
Input: 1 OR 1=1
|
||||
Output: 1 || 1=1
|
||||
Requirement:
|
||||
* MySQL
|
||||
>>> tamper("0' OR SLEEP(5)")
|
||||
"0' || SLEEP(5)"
|
||||
"""
|
||||
if payload:
|
||||
# Replace only ' OR ' (with spaces) to avoid breaking string literals
|
||||
return payload.replace(" OR ", " || ")
|
Loading…
Reference in New Issue
Block a user