Pre-fetching latest revision number in case of update

This commit is contained in:
Miroslav Stampar
2018-07-11 19:30:14 +02:00
parent 3c439c3929
commit 4846d85ccd
4 changed files with 26 additions and 4 deletions

View File

@@ -3347,6 +3347,22 @@ def unhandledExceptionMessage():
return errMsg
def getLatestRevision():
"""
Retrieves latest revision from the offical repository
"""
retVal = None
req = urllib2.Request(url="https://raw.githubusercontent.com/sqlmapproject/sqlmap/master/lib/core/settings.py")
try:
content = urllib2.urlopen(req).read()
retVal = extractRegexResult(r"VERSION\s*=\s*[\"'](?P<result>[\d.]+)", content)
except:
pass
return retVal
def createGithubIssue(errMsg, excMsg):
"""
Automatically create a Github issue with unhandled exception information