mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 07:57:47 +03:00 
			
		
		
		
	Adding support for TiDB
This commit is contained in:
		
							parent
							
								
									447e5ec0ea
								
							
						
					
					
						commit
						3779531540
					
				|  | @ -385,7 +385,7 @@ class Agent(object): | |||
|             for _ in set(re.findall(r"\[RANDSTR(?:\d+)?\]", payload, re.I)): | ||||
|                 payload = payload.replace(_, randomStr()) | ||||
| 
 | ||||
|             if hashDBRetrieve(HASHDB_KEYS.DBMS_FORK) == FORK.MEMSQL: | ||||
|             if hashDBRetrieve(HASHDB_KEYS.DBMS_FORK) in (FORK.MEMSQL, FORK.TIDB): | ||||
|                 payload = re.sub(r"(?i)\bORD\(", "ASCII(", payload) | ||||
|                 payload = re.sub(r"(?i)\bMID\(", "SUBSTR(", payload) | ||||
|                 payload = re.sub(r"(?i)\bNCHAR\b", "CHAR", payload) | ||||
|  |  | |||
|  | @ -75,6 +75,7 @@ class FORK(object): | |||
|     MARIADB = "MariaDB" | ||||
|     MEMSQL = "MemSQL" | ||||
|     COCKROACHDB = "CockroachDB" | ||||
|     TIDB = "TiDB" | ||||
| 
 | ||||
| class CUSTOM_LOGGING(object): | ||||
|     PAYLOAD = 9 | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ from lib.core.enums import OS | |||
| from thirdparty.six import unichr as _unichr | ||||
| 
 | ||||
| # sqlmap version (<major>.<minor>.<month>.<monthly commit>) | ||||
| VERSION = "1.4.1.44" | ||||
| VERSION = "1.4.1.45" | ||||
| TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" | ||||
| TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} | ||||
| VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) | ||||
|  |  | |||
|  | @ -99,7 +99,13 @@ class Fingerprint(GenericFingerprint): | |||
|         fork = hashDBRetrieve(HASHDB_KEYS.DBMS_FORK) | ||||
| 
 | ||||
|         if fork is None: | ||||
|             fork = inject.checkBooleanExpression("VERSION() LIKE '%MariaDB%'") and FORK.MARIADB or "" | ||||
|             if inject.checkBooleanExpression("VERSION() LIKE '%MariaDB%'"): | ||||
|                 fork = FORK.MARIADB | ||||
|             elif inject.checkBooleanExpression("VERSION() LIKE '%TiDB%'"): | ||||
|                 fork = FORK.TIDB | ||||
|             else: | ||||
|                 fork = "" | ||||
| 
 | ||||
|             hashDBWrite(HASHDB_KEYS.DBMS_FORK, fork) | ||||
| 
 | ||||
|         value = "" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user