mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-11-04 01:47:37 +03:00 
			
		
		
		
	restored kb.currentMessage - needed in cases where we send to dataToStdout() strings like "." (e.g. "creation in progres ..... done")
This commit is contained in:
		
							parent
							
								
									2b3ea3e3b7
								
							
						
					
					
						commit
						247f95e051
					
				| 
						 | 
					@ -697,10 +697,13 @@ def singleTimeLogMessage(message, level=logging.INFO, flag=None):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def setColor(message, bold=False):
 | 
					def setColor(message, bold=False):
 | 
				
			||||||
    retVal = message
 | 
					    retVal = message
 | 
				
			||||||
    level = extractRegexResult(r"\A\s*\[(?P<result>[A-Z ]+)\]", message)
 | 
					    level = extractRegexResult(r"\[(?P<result>[A-Z ]+)\]", message)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if hasattr(LOGGER_HANDLER, "level_map"):
 | 
					    if level:
 | 
				
			||||||
        _ = LOGGER_HANDLER.level_map.get(logging.getLevelName(level))
 | 
					        kb.currentMessage = level
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if hasattr(LOGGER_HANDLER, "level_map") and hasattr(kb, "currentMessage") and kb.currentMessage:
 | 
				
			||||||
 | 
					        _ = LOGGER_HANDLER.level_map.get(logging.getLevelName(kb.currentMessage))
 | 
				
			||||||
        if _:
 | 
					        if _:
 | 
				
			||||||
            background, foreground, bold = _
 | 
					            background, foreground, bold = _
 | 
				
			||||||
            retVal = colored(message, color=foreground, on_color="on_%s" % background if background else None, attrs=("bold",) if bold else None)
 | 
					            retVal = colored(message, color=foreground, on_color="on_%s" % background if background else None, attrs=("bold",) if bold else None)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1436,6 +1436,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    kb.commonOutputs = None
 | 
					    kb.commonOutputs = None
 | 
				
			||||||
    kb.counters = {}
 | 
					    kb.counters = {}
 | 
				
			||||||
 | 
					    kb.currentMessage = None
 | 
				
			||||||
    kb.data = AttribDict()
 | 
					    kb.data = AttribDict()
 | 
				
			||||||
    kb.dataOutputFlag = False
 | 
					    kb.dataOutputFlag = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user