Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3130c1

Browse files
committed
Implements #1207
1 parent 7587528 commit e3130c1

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tamper/informationschemacomment.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env python
2+
3+
"""
4+
Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/)
5+
See the file 'doc/COPYING' for copying permission
6+
"""
7+
8+
import re
9+
10+
from lib.core.enums import PRIORITY
11+
12+
__priority__ = PRIORITY.LOW
13+
14+
def tamper(payload, **kwargs):
15+
"""
16+
Add a comment to the end of all occurrences of (blacklisted) "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)\.", "\g<1>/**/.", payload)
26+
27+
return retVal

0 commit comments

Comments
 (0)