Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c92fde1

Browse files
committed
Implements #2220
1 parent 7eab1bc commit c92fde1

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

lib/core/common.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3178,13 +3178,28 @@ def createGithubIssue(errMsg, excMsg):
31783178
ex = None
31793179
errMsg = errMsg[errMsg.find("\n"):]
31803180

3181+
req = urllib2.Request(url="https://api.github.com/search/issues?q=%s" % urllib.quote("repo:sqlmapproject/sqlmap Unhandled exception (#%s)" % key))
3182+
3183+
try:
3184+
content = urllib2.urlopen(req).read()
3185+
_ = json.loads(content)
3186+
duplicate = _["total_count"] > 0
3187+
closed = duplicate and _["items"][0]["state"] == "closed"
3188+
if duplicate:
3189+
warnMsg = "issue seems to be already reported"
3190+
if closed:
3191+
warnMsg += " and resolved. Please update to the latest "
3192+
warnMsg += "development version from official GitHub repository at '%s'" % GIT_PAGE
3193+
logger.warn(warnMsg)
3194+
return
3195+
except:
3196+
pass
31813197

31823198
data = {"title": "Unhandled exception (#%s)" % key, "body": "```%s\n```\n```\n%s```" % (errMsg, excMsg)}
31833199
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")})
31843200

31853201
try:
3186-
f = urllib2.urlopen(req)
3187-
content = f.read()
3202+
content = urllib2.urlopen(req).read()
31883203
except Exception, ex:
31893204
content = None
31903205

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.0.10.24"
22+
VERSION = "1.0.10.25"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ f15544a4c9c365ae8f2f8fa2e3a69aa5 lib/controller/checks.py
2626
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
2727
04f16204c899438dc7599a9a8426bfee lib/core/agent.py
2828
eb0bd28b0bd9fbf67dcc3119116df377 lib/core/bigarray.py
29-
8bf4949483128163a34334207f1b78a7 lib/core/common.py
29+
01c42757ab2928edcf62789e94397d1c lib/core/common.py
3030
5680d0c446a3bed5c0f2a0402d031557 lib/core/convert.py
3131
e77cca1cb063016f71f6e6bdebf4ec73 lib/core/data.py
3232
1d042f0bc0557d3fd564ea5a46deb77e lib/core/datatype.py
@@ -45,7 +45,7 @@ e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
5ef56abb8671c2ca6ceecb208258e360 lib/core/replication.py
4646
99a2b496b9d5b546b335653ca801153f lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
a226f17fafb974d0bc88f0a47171353b lib/core/settings.py
48+
b6d53fd8d8dc437c358366789ddeb935 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py

0 commit comments

Comments
 (0)