Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sqlmapproject
GitHub Repository: sqlmapproject/sqlmap
Path: blob/master/tamper/apostrophenullencode.py
2983 views
1
#!/usr/bin/env python
2
3
"""
4
Copyright (c) 2006-2025 sqlmap developers (https://sqlmap.org)
5
See the file 'LICENSE' for copying permission
6
"""
7
8
from lib.core.enums import PRIORITY
9
10
__priority__ = PRIORITY.LOWEST
11
12
def dependencies():
13
pass
14
15
def tamper(payload, **kwargs):
16
"""
17
Replaces single quotes (') with an illegal double Unicode encoding (e.g. ' -> %00%27)
18
19
>>> tamper("1 AND '1'='1")
20
'1 AND %00%271%00%27=%00%271'
21
"""
22
23
return payload.replace('\'', "%00%27") if payload else payload
24
25