From: =?utf-8?q?Timo_R=C3=B6hling?= Date: Fri, 31 Dec 2021 11:48:02 +0100 Subject: Disable update check Forwarded: not-needed --- ropgadget/updateAlert.py | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/ropgadget/updateAlert.py b/ropgadget/updateAlert.py index 73a8ad3..eed58ba 100644 --- a/ropgadget/updateAlert.py +++ b/ropgadget/updateAlert.py @@ -6,32 +6,10 @@ ## http://shell-storm.org/project/ROPgadget/ ## -import re -try: - import httplib -except ImportError: - import http.client as httplib - - -from ropgadget.version import * - class UpdateAlert(object): @staticmethod def checkUpdate(): - try: - conn = httplib.HTTPSConnection("raw.githubusercontent.com", 443) - conn.request("GET", "/JonathanSalwan/ROPgadget/master/ropgadget/version.py") - except: - print("Can't connect to raw.githubusercontent.com") - return - d = conn.getresponse().read().decode() - majorVersion = re.search(r"MAJOR_VERSION.+=.+(?P[\d])", d).group("value") - minorVersion = re.search(r"MINOR_VERSION.+=.+(?P[\d])", d).group("value") - webVersion = int("%s%s" % (majorVersion, minorVersion)) - curVersion = int("%s%s" % (MAJOR_VERSION, MINOR_VERSION)) - if webVersion > curVersion: - print("The version %s.%s is available. Currently, you use the version %d.%d." % (majorVersion, minorVersion, MAJOR_VERSION, MINOR_VERSION)) - else: - print("Your version is up-to-date.") + print("The update check has been disabled for Debian.") + print("Please use the package manager to upgrade python3-ropgadget")