mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 09:57:38 +03:00 
			
		
		
		
	Error chunk length bug fix (reported privately)
This commit is contained in:
		
							parent
							
								
									b43c1747e0
								
							
						
					
					
						commit
						6f3511dcc3
					
				| 
						 | 
					@ -74,12 +74,15 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
 | 
				
			||||||
            testChar = str(current % 10)
 | 
					            testChar = str(current % 10)
 | 
				
			||||||
            testQuery = "SELECT %s('%s',%d)" % ("REPEAT" if Backend.isDbms(DBMS.MYSQL) else "REPLICATE", testChar, current)
 | 
					            testQuery = "SELECT %s('%s',%d)" % ("REPEAT" if Backend.isDbms(DBMS.MYSQL) else "REPLICATE", testChar, current)
 | 
				
			||||||
            result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
 | 
					            result = unArrayizeValue(_oneShotErrorUse(testQuery, chunkTest=True))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if result and testChar in result:
 | 
					            if result and testChar in result:
 | 
				
			||||||
                if result == testChar * current:
 | 
					                if result == testChar * current:
 | 
				
			||||||
                    kb.errorChunkLength = current
 | 
					                    kb.errorChunkLength = current
 | 
				
			||||||
                    break
 | 
					                    break
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    current = len(result) - len(kb.chars.stop)
 | 
					                    result = re.search(r"\A\w+", result).group(0)
 | 
				
			||||||
 | 
					                    candidate = len(result) - len(kb.chars.stop)
 | 
				
			||||||
 | 
					                    current = candidate if candidate != current else current - 1
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                current = current / 2
 | 
					                current = current / 2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user