mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Implements #2220
This commit is contained in:
parent
7eab1bcbf9
commit
c92fde120d
|
@ -3178,13 +3178,28 @@ def createGithubIssue(errMsg, excMsg):
|
|||
ex = None
|
||||
errMsg = errMsg[errMsg.find("\n"):]
|
||||
|
||||
req = urllib2.Request(url="https://api.github.com/search/issues?q=%s" % urllib.quote("repo:sqlmapproject/sqlmap Unhandled exception (#%s)" % key))
|
||||
|
||||
try:
|
||||
content = urllib2.urlopen(req).read()
|
||||
_ = json.loads(content)
|
||||
duplicate = _["total_count"] > 0
|
||||
closed = duplicate and _["items"][0]["state"] == "closed"
|
||||
if duplicate:
|
||||
warnMsg = "issue seems to be already reported"
|
||||
if closed:
|
||||
warnMsg += " and resolved. Please update to the latest "
|
||||
warnMsg += "development version from official GitHub repository at '%s'" % GIT_PAGE
|
||||
logger.warn(warnMsg)
|
||||
return
|
||||
except:
|
||||
pass
|
||||
|
||||
data = {"title": "Unhandled exception (#%s)" % key, "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.decode("base64")})
|
||||
|
||||
try:
|
||||
f = urllib2.urlopen(req)
|
||||
content = f.read()
|
||||
content = urllib2.urlopen(req).read()
|
||||
except Exception, ex:
|
||||
content = None
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
|||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.0.10.24"
|
||||
VERSION = "1.0.10.25"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
@ -26,7 +26,7 @@ f15544a4c9c365ae8f2f8fa2e3a69aa5 lib/controller/checks.py
|
|||
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
|
||||
04f16204c899438dc7599a9a8426bfee lib/core/agent.py
|
||||
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
|
||||
8bf4949483128163a34334207f1b78a7 lib/core/common.py
|
||||
01c42757ab2928edcf62789e94397d1c lib/core/common.py
|
||||
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
|
||||
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
|
||||
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
|
||||
|
@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
|
|||
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
|
||||
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
|
||||
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
|
||||
a226f17fafb974d0bc88f0a47171353b lib/core/settings.py
|
||||
b6d53fd8d8dc437c358366789ddeb935 lib/core/settings.py
|
||||
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
|
||||
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
|
||||
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
|
||||
|
|
Loading…
Reference in New Issue
Block a user