File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ def adjustLateValues(self, payload):
385385 for _ in set (re .findall (r"\[RANDSTR(?:\d+)?\]" , payload , re .I )):
386386 payload = payload .replace (_ , randomStr ())
387387
388- if hashDBRetrieve (HASHDB_KEYS .DBMS_FORK ) == FORK .MEMSQL :
388+ if hashDBRetrieve (HASHDB_KEYS .DBMS_FORK ) in ( FORK .MEMSQL , FORK . TIDB ) :
389389 payload = re .sub (r"(?i)\bORD\(" , "ASCII(" , payload )
390390 payload = re .sub (r"(?i)\bMID\(" , "SUBSTR(" , payload )
391391 payload = re .sub (r"(?i)\bNCHAR\b" , "CHAR" , payload )
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ class FORK(object):
7575 MARIADB = "MariaDB"
7676 MEMSQL = "MemSQL"
7777 COCKROACHDB = "CockroachDB"
78+ TIDB = "TiDB"
7879
7980class CUSTOM_LOGGING (object ):
8081 PAYLOAD = 9
Original file line number Diff line number Diff line change 1818from thirdparty .six import unichr as _unichr
1919
2020# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21- VERSION = "1.4.1.44 "
21+ VERSION = "1.4.1.45 "
2222TYPE = "dev" if VERSION .count ('.' ) > 2 and VERSION .split ('.' )[- 1 ] != '0' else "stable"
2323TYPE_COLORS = {"dev" : 33 , "stable" : 90 , "pip" : 34 }
2424VERSION_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 @@ -99,7 +99,13 @@ def getFingerprint(self):
9999 fork = hashDBRetrieve (HASHDB_KEYS .DBMS_FORK )
100100
101101 if fork is None :
102- fork = inject .checkBooleanExpression ("VERSION() LIKE '%MariaDB%'" ) and FORK .MARIADB or ""
102+ if inject .checkBooleanExpression ("VERSION() LIKE '%MariaDB%'" ):
103+ fork = FORK .MARIADB
104+ elif inject .checkBooleanExpression ("VERSION() LIKE '%TiDB%'" ):
105+ fork = FORK .TIDB
106+ else :
107+ fork = ""
108+
103109 hashDBWrite (HASHDB_KEYS .DBMS_FORK , fork )
104110
105111 value = ""
You can’t perform that action at this time.
0 commit comments