mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 18:07:46 +03:00 
			
		
		
		
	Refactoring
This commit is contained in:
		
							parent
							
								
									9b342a4c95
								
							
						
					
					
						commit
						a37f5e05b9
					
				| 
						 | 
				
			
			@ -155,7 +155,10 @@ def __goInferenceProxy(expression, fromUser=False, expected=None, batch=False, r
 | 
			
		|||
    # forge the SQL limiting the query output one entry per time
 | 
			
		||||
    # NOTE: I assume that only queries that get data from a table
 | 
			
		||||
    # can return multiple entries
 | 
			
		||||
    if fromUser and " FROM " in expression.upper() and ((Backend.getIdentifiedDbms() not in FROM_TABLE) or (Backend.getIdentifiedDbms() in FROM_TABLE and not expression.upper().endswith(FROM_TABLE[Backend.getIdentifiedDbms()]))):
 | 
			
		||||
    if fromUser and " FROM " in expression.upper() and ((Backend.getIdentifiedDbms() \
 | 
			
		||||
      not in FROM_TABLE) or (Backend.getIdentifiedDbms() in FROM_TABLE and not \
 | 
			
		||||
      expression.upper().endswith(FROM_TABLE[Backend.getIdentifiedDbms()]))):
 | 
			
		||||
 | 
			
		||||
        limitRegExp = re.search(queries[Backend.getIdentifiedDbms()].limitregexp.query, expression, re.I)
 | 
			
		||||
        topLimit = re.search("TOP\s+([\d]+)\s+", expression, re.I)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,7 +102,7 @@ def configUnion(char=None, columns=None):
 | 
			
		|||
    elif isinstance(columns, basestring):
 | 
			
		||||
        __configUnionCols(columns)
 | 
			
		||||
 | 
			
		||||
def unionUse(expression, direct=False, unescape=True, unpack=True, dump=False):
 | 
			
		||||
def unionUse(expression, unescape=True, unpack=True, dump=False):
 | 
			
		||||
    """
 | 
			
		||||
    This function tests for an inband SQL injection on the target
 | 
			
		||||
    url then call its subsidiary function to effectively perform an
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ class Filesystem(GenericFilesystem):
 | 
			
		|||
        logger.debug(debugMsg)
 | 
			
		||||
 | 
			
		||||
        sqlQuery = "%s INTO DUMPFILE '%s'" % (fcEncodedStr, dFile)
 | 
			
		||||
        unionUse(sqlQuery, direct=True, unescape=False)
 | 
			
		||||
        unionUse(sqlQuery, unescape=False)
 | 
			
		||||
 | 
			
		||||
        if confirm:
 | 
			
		||||
            self.askCheckWrittenFile(wFile, dFile, fileType)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user