File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020from lib .core .revision import getRevisionNumber
2121
2222# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23- VERSION = "1.0.3.7 "
23+ VERSION = "1.0.3.8 "
2424REVISION = getRevisionNumber ()
2525STABLE = VERSION .count ('.' ) <= 2
2626VERSION_STRING = "sqlmap/%s#%s" % (VERSION , "stable" if STABLE else "dev" )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
5+ See the file 'doc/COPYING' for copying permission
6+ """
7+
8+ import os
9+ import re
10+
11+ from lib .core .common import singleTimeWarnMessage
12+ from lib .core .enums import PRIORITY
13+
14+ __priority__ = PRIORITY .HIGH
15+
16+ def dependencies ():
17+ pass
18+
19+ def tamper (payload , ** kwargs ):
20+ """
21+ Replaces instances like 'LIMIT M, N' with 'LIMIT N OFFSET M'
22+
23+ Requirement:
24+ * MySQL
25+
26+ Tested against:
27+ * MySQL 5.0 and 5.5
28+
29+ >>> tamper('LIMIT 2, 3')
30+ 'LIMIT 3 OFFSET 2'
31+ """
32+
33+ retVal = payload
34+
35+ match = re .search (r"(?i)LIMIT\s*(\d+),\s*(\d+)" , payload or "" )
36+ if match :
37+ retVal = retVal .replace (match .group (0 ), "LIMIT %s OFFSET %s" % (match .group (2 ), match .group (1 )))
38+
39+ return retVal
You can’t perform that action at this time.
0 commit comments