mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 16:07:55 +03:00 
			
		
		
		
	Minor bug fix
This commit is contained in:
		
							parent
							
								
									f01610b397
								
							
						
					
					
						commit
						6e06df3d39
					
				|  | @ -901,7 +901,7 @@ class Databases(object): | |||
|             self.getTables() | ||||
| 
 | ||||
|             infoMsg = "fetched tables: " | ||||
|             infoMsg += ", ".join(["%s" % ", ".join("%s%s%s" % (unsafeSQLIdentificatorNaming(db), ".." if Backend.isDbms(DBMS.MSSQL) or Backend.isDbms(DBMS.SYBASE) else '.', unsafeSQLIdentificatorNaming(_)) for _ in tbl) for db, tbl in kb.data.cachedTables.items()]) | ||||
|             infoMsg += ", ".join(["%s" % ", ".join("'%s%s%s'" % (unsafeSQLIdentificatorNaming(db), ".." if Backend.isDbms(DBMS.MSSQL) or Backend.isDbms(DBMS.SYBASE) else '.', unsafeSQLIdentificatorNaming(_)) for _ in tbl) for db, tbl in kb.data.cachedTables.items()]) | ||||
|             logger.info(infoMsg) | ||||
| 
 | ||||
|             for db, tables in kb.data.cachedTables.items(): | ||||
|  |  | |||
|  | @ -28,13 +28,16 @@ class Syntax(object): | |||
|         if quote: | ||||
|             for item in re.findall(r"'[^']*'+", expression): | ||||
|                 original = item[1:-1] | ||||
|                 if original and re.search(r"\[(SLEEPTIME|RAND)", original) is None:  # e.g. '[SLEEPTIME]' marker | ||||
|                     replacement = escaper(original) if not conf.noEscape else original | ||||
|                 if original: | ||||
|                     if Backend.isDbms(DBMS.SQLITE) and "X%s" % item in expression: | ||||
|                         continue | ||||
|                     if re.search(r"\[(SLEEPTIME|RAND)", original) is None:  # e.g. '[SLEEPTIME]' marker | ||||
|                         replacement = escaper(original) if not conf.noEscape else original | ||||
| 
 | ||||
|                     if replacement != original: | ||||
|                         retVal = retVal.replace(item, replacement) | ||||
|                     elif len(original) != len(getBytes(original)) and "n'%s'" % original not in retVal and Backend.getDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.ORACLE, DBMS.MSSQL): | ||||
|                         retVal = retVal.replace("'%s'" % original, "n'%s'" % original) | ||||
|                         if replacement != original: | ||||
|                             retVal = retVal.replace(item, replacement) | ||||
|                         elif len(original) != len(getBytes(original)) and "n'%s'" % original not in retVal and Backend.getDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.ORACLE, DBMS.MSSQL): | ||||
|                             retVal = retVal.replace("'%s'" % original, "n'%s'" % original) | ||||
|         else: | ||||
|             retVal = escaper(expression) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user