File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919from lib .core .enums import OS
2020
2121# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22- VERSION = "1.2.5.23 "
22+ VERSION = "1.2.5.24 "
2323TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2424TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2525VERSION_STRING = "sqlmap/%s#%s" % ('.' .join (VERSION .split ('.' )[:- 1 ]) if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] == '0' else VERSION , TYPE )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ """
4+ Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
5+ See the file 'LICENSE' for copying permission
6+ """
7+
8+ import re
9+
10+ from lib .core .data import kb
11+ from lib .core .enums import PRIORITY
12+
13+ __priority__ = PRIORITY .NORMAL
14+
15+ def dependencies ():
16+ pass
17+
18+ def tamper (payload , ** kwargs ):
19+ """
20+ Replaces each (MySQL) 0x<hex> encoded string with equivalent CONCAT(CHAR(),...) counterpart
21+
22+ Tested against:
23+ * MySQL 4, 5.0 and 5.5
24+
25+ Notes:
26+ * Useful in cases when web application does the upper casing
27+
28+ >>> tamper('SELECT 0xdeadbeef')
29+ 'SELECT CONCAT(CHAR(222),CHAR(173),CHAR(190),CHAR(239))'
30+ """
31+
32+ retVal = payload
33+
34+ if payload :
35+ for match in re .finditer (r"\b0x([0-9a-f]+)\b" , retVal ):
36+ if len (match .group (1 )) > 2 :
37+ result = "CONCAT(%s)" % ',' .join ("CHAR(%d)" % ord (_ ) for _ in match .group (1 ).decode ("hex" ))
38+ else :
39+ result = "CHAR(%d)" % ord (match .group (1 ).decode ("hex" ))
40+ retVal = retVal .replace (match .group (0 ), result )
41+
42+ return retVal
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py
47470c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4848a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
4949fcb74fcc9577523524659ec49e2e964b lib/core/session.py
50- dbf72e4b82773ade88cc34a53f80abcb lib/core/settings.py
50+ dcdc0a7179010067fdbf8ad1fa9ab09e lib/core/settings.py
51510dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py
5252a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
53536306284edcccc185b2df085438572b0d lib/core/target.py
@@ -226,6 +226,7 @@ ec2ba8c757ac96425dcd2b97970edd3a shell/stagers/stager.asp_
2262262f9e459a4cf6a58680978cdce5ff7971 shell/stagers/stager.php_
2272274eaeef94314956e4517e5310a28d579a sqlmapapi.py
2282285c8583dd47f92935ceb41210a10eeebf sqlmap.py
229+ b2c2cc55ba4e31bea94494dcafe5d8cc tamper/0x2char.py
2292304c3b8a7daa4bff52e01d4168be0eedbe tamper/apostrophemask.py
2302314115a55b8aba464723d645b7d3156b6e tamper/apostrophenullencode.py
231232d7e9a979eff4d7315d804a181e66fc93 tamper/appendnullbyte.py
You can’t perform that action at this time.
0 commit comments