From 5037e43c998dbb3352e0eec7c3dcadcb93a7d295 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 26 Mar 2019 12:52:19 +0100 Subject: [PATCH] Fixes #3550 --- lib/core/revision.py | 11 +++++++---- lib/core/settings.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/core/revision.py b/lib/core/revision.py index 94158a67a..23d2d840b 100644 --- a/lib/core/revision.py +++ b/lib/core/revision.py @@ -44,9 +44,12 @@ def getRevisionNumber(): break if not retVal: - process = subprocess.Popen("git rev-parse --verify HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, _ = process.communicate() - match = re.search(r"(?i)[0-9a-f]{32}", stdout or "") - retVal = match.group(0) if match else None + try: + process = subprocess.Popen("git rev-parse --verify HEAD", shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, _ = process.communicate() + match = re.search(r"(?i)[0-9a-f]{32}", stdout or "") + retVal = match.group(0) if match else None + except: + pass return retVal[:7] if retVal else None diff --git a/lib/core/settings.py b/lib/core/settings.py index 0b0d990ee..02f174063 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.3.3.47" +VERSION = "1.3.3.48" 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)