From a296d22195709659bcae5a7ca9c126e2d5cbb833 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 10 Aug 2018 14:01:55 +0200 Subject: [PATCH] Fixes #3205 --- lib/controller/checks.py | 4 +++- lib/core/settings.py | 2 +- txt/checksum.md5 | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 047c77a05..074437fce 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -13,6 +13,7 @@ import random import re import socket import subprocess +import sys import tempfile import time @@ -90,6 +91,7 @@ from lib.core.settings import NON_SQLI_CHECK_PREFIX_SUFFIX_LENGTH from lib.core.settings import SLEEP_TIME_MARKER from lib.core.settings import SUHOSIN_MAX_VALUE_LENGTH from lib.core.settings import SUPPORTED_DBMS +from lib.core.settings import UNICODE_ENCODING from lib.core.settings import URI_HTTP_HEADER from lib.core.settings import UPPER_RATIO_BOUND from lib.core.threads import getCurrentThreadData @@ -761,7 +763,7 @@ def checkSqlInjection(place, parameter, value): infoMsg = "executing alerting shell command(s) ('%s')" % conf.alert logger.info(infoMsg) - process = subprocess.Popen(conf.alert, shell=True) + process = subprocess.Popen(conf.alert.encode(sys.getfilesystemencoding() or UNICODE_ENCODING), shell=True) process.wait() kb.alerted = True diff --git a/lib/core/settings.py b/lib/core/settings.py index 9ea537e00..ffce4051c 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.2.8.5" +VERSION = "1.2.8.6" 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/txt/checksum.md5 b/txt/checksum.md5 index a1e636703..4673e63ee 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -22,7 +22,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py 1e5532ede194ac9c083891c2f02bca93 extra/sqlharvest/__init__.py b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py 0f581182871148b0456a691ae85b04c0 lib/controller/action.py -94872ce72dc2628cdedf2eb82cba716e lib/controller/checks.py +bc3800ec099df253968b3a7fc1ffce44 lib/controller/checks.py c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py 1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py @@ -48,7 +48,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py -569498929d03e722dbfefaf65c387006 lib/core/settings.py +a4ded87968a06825056f25955c009db6 lib/core/settings.py dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py 12bed9603b6fba3e5ffda11d584bc449 lib/core/target.py