We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 258a700 commit 9af6d49Copy full SHA for 9af6d49
sqlmap.py
@@ -132,9 +132,10 @@ def main():
132
excMsg = traceback.format_exc()
133
134
for match in re.finditer(r'File "(.+?)", line', excMsg):
135
- file = match.group(1).replace('\\', "/")
136
- file = file[file.find("sqlmap"):].replace("sqlmap/", "", 1)
137
- 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)
138
+ excMsg = excMsg.replace(match.group(1), file_)
139
140
logger.critical(errMsg)
141
kb.stickyLevel = logging.CRITICAL
0 commit comments