mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 07:57:47 +03:00 
			
		
		
		
	Proper displaying of debug messages (-v >= 2)
This commit is contained in:
		
							parent
							
								
									1a8beebc8c
								
							
						
					
					
						commit
						457d32c73e
					
				|  | @ -54,13 +54,12 @@ def __goInference(payload, expression, charsetType=None, firstChar=None, lastCha | |||
|     dataToSessionFile("[%s][%s][%s][%s][" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], expression)) | ||||
| 
 | ||||
|     count, value = bisection(payload, expression, length, charsetType, firstChar, lastChar) | ||||
|     duration = int(time.time() - start) | ||||
| 
 | ||||
|     if conf.eta and length: | ||||
|         infoMsg = "retrieved: %s" % value | ||||
|         logger.info(infoMsg) | ||||
| 
 | ||||
|     debugMsg = "performed %d queries in %d seconds" % (count, duration) | ||||
|     debugMsg = "performed %d queries in %d seconds" % (count, int(time.time() - start)) | ||||
|     logger.debug(debugMsg) | ||||
| 
 | ||||
|     return value | ||||
|  |  | |||
|  | @ -23,6 +23,7 @@ Franklin St, Fifth Floor, Boston, MA  02110-1301  USA | |||
| """ | ||||
| 
 | ||||
| import re | ||||
| import time | ||||
| 
 | ||||
| from lib.core.common import dataToSessionFile | ||||
| from lib.core.common import safeStringFormat | ||||
|  | @ -84,8 +85,12 @@ def queryOutputLength(expression, payload): | |||
| 
 | ||||
|     dataToSessionFile("[%s][%s][%s][%s][" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], lengthExpr)) | ||||
| 
 | ||||
|     start = time.time() | ||||
|     lengthExprUnescaped = unescaper.unescape(lengthExpr) | ||||
|     count, length       = bisection(payload, lengthExprUnescaped, charsetType=2) | ||||
|     count, length = bisection(payload, lengthExprUnescaped, charsetType=2) | ||||
| 
 | ||||
|     debugMsg = "performed %d queries in %d seconds" % (count, int(time.time() - start)) | ||||
|     logger.debug(debugMsg) | ||||
| 
 | ||||
|     if length == " ": | ||||
|         length = 0 | ||||
|  | @ -178,7 +183,11 @@ def resume(expression, payload): | |||
|         infoMsg += "output characters" | ||||
|         logger.info(infoMsg) | ||||
| 
 | ||||
|         _, finalValue = bisection(payload, newExpr, length=missingCharsLength) | ||||
|         start = time.time() | ||||
|         count, finalValue = bisection(payload, newExpr, length=missingCharsLength) | ||||
| 
 | ||||
|         debugMsg = "performed %d queries in %d seconds" % (count, int(time.time() - start)) | ||||
|         logger.debug(debugMsg) | ||||
| 
 | ||||
|         if len(finalValue) != ( int(length) - len(resumedValue) ): | ||||
|             warnMsg  = "the total length of the query is not " | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user