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()
for match in re.finditer(r'File "(.+?)", line', excMsg):
file = match.group(1).replace('\\', "/")
file = file[file.find("sqlmap"):].replace("sqlmap/", "", 1)
excMsg = excMsg.replace(match.group(1), file)
file_ = match.group(1).replace('\\', "/")
file_ = file_[file_.find("sqlmap"):] if "sqlmap" in file_ else file_
file_ = file_.replace("sqlmap/", "", 1)
excMsg = excMsg.replace(match.group(1), file_)
logger.critical(errMsg)
kb.stickyLevel = logging.CRITICAL