mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-24 10:33:47 +03:00
Minor update
This commit is contained in:
parent
3b3b8d4ef2
commit
725c3a6a95
|
@ -2855,16 +2855,15 @@ def createGithubIssue(errMsg, excMsg):
|
||||||
msg = "\ndo you want to automatically create a new (anonymized) issue "
|
msg = "\ndo you want to automatically create a new (anonymized) issue "
|
||||||
msg += "with the unhandled exception information at "
|
msg += "with the unhandled exception information at "
|
||||||
msg += "the official Github repository? [y/N] "
|
msg += "the official Github repository? [y/N] "
|
||||||
|
try:
|
||||||
test = readInput(msg, default="N")
|
test = readInput(msg, default="N")
|
||||||
if test[0] in ("y", "Y"):
|
except:
|
||||||
|
test = None
|
||||||
|
|
||||||
|
if test and test[0] in ("y", "Y"):
|
||||||
ex = None
|
ex = None
|
||||||
errMsg = errMsg[errMsg.find("\n"):]
|
errMsg = errMsg[errMsg.find("\n"):]
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
data = {"title": "Unhandled exception (#%s)" % hashlib.md5(excMsg).hexdigest()[:8], "body": "```%s\n```\n```\n%s```" % (errMsg, excMsg)}
|
data = {"title": "Unhandled exception (#%s)" % hashlib.md5(excMsg).hexdigest()[:8], "body": "```%s\n```\n```\n%s```" % (errMsg, excMsg)}
|
||||||
req = urllib2.Request(url="https://api.github.com/repos/sqlmapproject/sqlmap/issues", data=json.dumps(data), headers={"Authorization": "token %s" % GITHUB_REPORT_OAUTH_TOKEN})
|
req = urllib2.Request(url="https://api.github.com/repos/sqlmapproject/sqlmap/issues", data=json.dumps(data), headers={"Authorization": "token %s" % GITHUB_REPORT_OAUTH_TOKEN})
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import bdb
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
@ -129,6 +130,12 @@ def main():
|
||||||
print
|
print
|
||||||
errMsg = unhandledExceptionMessage()
|
errMsg = unhandledExceptionMessage()
|
||||||
excMsg = traceback.format_exc()
|
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)
|
||||||
|
|
||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
kb.stickyLevel = logging.CRITICAL
|
kb.stickyLevel = logging.CRITICAL
|
||||||
dataToStdout(excMsg)
|
dataToStdout(excMsg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user