From 9fd5fe732c912b95d057ac5e8cc3b6f7d6889d86 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 19 May 2019 07:44:32 +0200 Subject: [PATCH] Fixes #3677 --- lib/core/settings.py | 2 +- lib/core/update.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index baef68707..fb3b05536 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.5.105" +VERSION = "1.3.5.106" 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) diff --git a/lib/core/update.py b/lib/core/update.py index 1035a6800..3d628bbb9 100644 --- a/lib/core/update.py +++ b/lib/core/update.py @@ -10,7 +10,6 @@ import os import re import shutil import subprocess -import sys import time import zipfile @@ -29,7 +28,6 @@ from lib.core.settings import GIT_REPOSITORY from lib.core.settings import IS_WIN from lib.core.settings import VERSION from lib.core.settings import ZIPBALL_PAGE -from lib.core.settings import UNICODE_ENCODING from thirdparty.six.moves import urllib as _urllib def update(): @@ -108,11 +106,11 @@ def update(): dataToStdout("\r[%s] [INFO] update in progress" % time.strftime("%X")) try: - process = subprocess.Popen("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=paths.SQLMAP_ROOT_PATH.encode(sys.getfilesystemencoding() or UNICODE_ENCODING)) + process = subprocess.Popen("git checkout . && git pull %s HEAD" % GIT_REPOSITORY, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=paths.SQLMAP_ROOT_PATH) pollProcess(process, True) output, _ = process.communicate() success = not process.returncode - except (IOError, OSError) as ex: + except Exception as ex: success = False output = getSafeExString(ex) finally: