From a702dafd035db0add45d096d9a8860d5a5b21eb7 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 14 Apr 2017 12:47:24 +0200 Subject: [PATCH] Fixes #2481 --- lib/core/settings.py | 2 +- lib/request/connect.py | 4 ++-- lib/techniques/union/use.py | 2 +- txt/checksum.md5 | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index f77a37e3c..a1908cb35 100755 --- 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.1.4.21" +VERSION = "1.1.4.22" 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/request/connect.py b/lib/request/connect.py index a5c9f3127..fb447094e 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -310,8 +310,8 @@ class Connect(object): elif target: if conf.forceSSL and urlparse.urlparse(url).scheme != "https": - url = re.sub("\Ahttp:", "https:", url, re.I) - url = re.sub(":80/", ":443/", url, re.I) + url = re.sub("(?i)\Ahttp:", "https:", url) + url = re.sub("(?i):80/", ":443/", url) if PLACE.GET in conf.parameters and not get: get = conf.parameters[PLACE.GET] diff --git a/lib/techniques/union/use.py b/lib/techniques/union/use.py index 9ff1559f9..d2e728b3c 100644 --- a/lib/techniques/union/use.py +++ b/lib/techniques/union/use.py @@ -226,7 +226,7 @@ def unionUse(expression, unpack=True, dump=False): if expressionFieldsList and len(expressionFieldsList) > 1 and "ORDER BY" in expression.upper(): # Removed ORDER BY clause because UNION does not play well with it - expression = re.sub("\s*ORDER BY\s+[\w,]+", "", expression, re.I) + expression = re.sub("(?i)\s*ORDER BY\s+[\w,]+", "", expression) debugMsg = "stripping ORDER BY clause from statement because " debugMsg += "it does not play well with UNION query SQL injection" singleTimeDebugMessage(debugMsg) diff --git a/txt/checksum.md5 b/txt/checksum.md5 index dd2ce94a2..e9d7a4c4b 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -45,7 +45,7 @@ dd19b4d930d418f8aef498941346ab2d lib/core/option.py d8e9250f3775119df07e9070eddccd16 lib/core/replication.py 785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py 40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py -de6c992fcd582495ce17cfb8797847e3 lib/core/settings.py +6cd1406ec40d12aec9e2c677a6e6ded7 lib/core/settings.py d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py 2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py afd0636d2e93c23f4f0a5c9b6023ea17 lib/core/target.py @@ -67,7 +67,7 @@ a0444cc351cd6d29015ad16d9eb46ff4 lib/parse/sitemap.py 403d873f1d2fd0c7f73d83f104e41850 lib/request/basicauthhandler.py 0035612a620934d7ebe6d18426cfb065 lib/request/basic.py ef48de622b0a6b4a71df64b0d2785ef8 lib/request/comparison.py -74a2a83e3af11ab02088c79b6367ef29 lib/request/connect.py +6c7aef40c0ef539a920592d97cae56b3 lib/request/connect.py fb6b788d0016ab4ec5e5f661f0f702ad lib/request/direct.py cc1163d38e9b7ee5db2adac6784c02bb lib/request/dns.py 5dcdb37823a0b5eff65cd1018bcf09e4 lib/request/httpshandler.py @@ -98,7 +98,7 @@ be752c8075641bc390368c9955f34c91 lib/techniques/error/use.py 310efc965c862cfbd7b0da5150a5ad36 lib/techniques/__init__.py 310efc965c862cfbd7b0da5150a5ad36 lib/techniques/union/__init__.py 19fd73af7a278fd72b46a5a60f5bdd09 lib/techniques/union/test.py -09b23d3ecb6c0e6e276822a3f2f3bf7b lib/techniques/union/use.py +c2bf28aab749b0de30bfdeea6d09449f lib/techniques/union/use.py 981318873e2df1cc55173e8b8a4a7637 lib/utils/api.py 29e32d59fcdd63c5a13498af1f367c8c lib/utils/crawler.py ba12c69a90061aa14d848b8396e79191 lib/utils/deps.py