Minor bug fix

This commit is contained in:
Miroslav Stampar 2014-10-28 15:22:54 +01:00
parent 258a700b2e
commit 9af6d497dc

View File

@ -132,9 +132,10 @@ def main():
excMsg = traceback.format_exc() excMsg = traceback.format_exc()
for match in re.finditer(r'File "(.+?)", line', excMsg): for match in re.finditer(r'File "(.+?)", line', excMsg):
file = match.group(1).replace('\\', "/") file_ = match.group(1).replace('\\', "/")
file = file[file.find("sqlmap"):].replace("sqlmap/", "", 1) file_ = file_[file_.find("sqlmap"):] if "sqlmap" in file_ else file_
excMsg = excMsg.replace(match.group(1), file) file_ = file_.replace("sqlmap/", "", 1)
excMsg = excMsg.replace(match.group(1), file_)
logger.critical(errMsg) logger.critical(errMsg)
kb.stickyLevel = logging.CRITICAL kb.stickyLevel = logging.CRITICAL