Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sqlmapproject
GitHub Repository: sqlmapproject/sqlmap
Path: blob/master/tamper/informationschemacomment.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
import re
9
10
from lib.core.enums import PRIORITY
11
12
__priority__ = PRIORITY.NORMAL
13
14
def tamper(payload, **kwargs):
15
"""
16
Add an inline comment (/**/) to the end of all occurrences of (MySQL) "information_schema" identifier
17
18
>>> tamper('SELECT table_name FROM INFORMATION_SCHEMA.TABLES')
19
'SELECT table_name FROM INFORMATION_SCHEMA/**/.TABLES'
20
"""
21
22
retVal = payload
23
24
if payload:
25
retVal = re.sub(r"(?i)(information_schema)\.", r"\g<1>/**/.", payload)
26
27
return retVal
28
29