Debian Codegraph @

debian/patches/0001-Disable-update-check.patch

raw symbols SCIP
1 From: =?utf-8?q?Timo_R=C3=B6hling?= <[email protected]>
2 Date: Fri, 31 Dec 2021 11:48:02 +0100
3 Subject: Disable update check
4
5 Forwarded: not-needed
6 ---
7 ropgadget/updateAlert.py | 26 ++------------------------
8 1 file changed, 2 insertions(+), 24 deletions(-)
9
10 diff --git a/ropgadget/updateAlert.py b/ropgadget/updateAlert.py
11 index 73a8ad3..eed58ba 100644
12 --- a/ropgadget/updateAlert.py
13 +++ b/ropgadget/updateAlert.py
14 @@ -6,32 +6,10 @@
15 ## http://shell-storm.org/project/ROPgadget/
16 ##
17
18 -import re
19 -try:
20 - import httplib
21 -except ImportError:
22 - import http.client as httplib
23 -
24 -
25 -from ropgadget.version import *
26 -
27
28 class UpdateAlert(object):
29
30 @staticmethod
31 def checkUpdate():
32 - try:
33 - conn = httplib.HTTPSConnection("raw.githubusercontent.com", 443)
34 - conn.request("GET", "/JonathanSalwan/ROPgadget/master/ropgadget/version.py")
35 - except:
36 - print("Can't connect to raw.githubusercontent.com")
37 - return
38 - d = conn.getresponse().read().decode()
39 - majorVersion = re.search(r"MAJOR_VERSION.+=.+(?P<value>[\d])", d).group("value")
40 - minorVersion = re.search(r"MINOR_VERSION.+=.+(?P<value>[\d])", d).group("value")
41 - webVersion = int("%s%s" % (majorVersion, minorVersion))
42 - curVersion = int("%s%s" % (MAJOR_VERSION, MINOR_VERSION))
43 - if webVersion > curVersion:
44 - print("The version %s.%s is available. Currently, you use the version %d.%d." % (majorVersion, minorVersion, MAJOR_VERSION, MINOR_VERSION))
45 - else:
46 - print("Your version is up-to-date.")
47 + print("The update check has been disabled for Debian.")
48 + print("Please use the package manager to upgrade python3-ropgadget")