From 91c5151770fd9445770bf631d0ecedce6dadd3e9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 5 Sep 2018 00:56:39 +0200 Subject: [PATCH] Another update related to the #120 --- lib/core/agent.py | 10 ++++++---- lib/core/settings.py | 2 +- txt/checksum.md5 | 6 +++--- xml/boundaries.xml | 9 +++++++++ 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 63c7e4851..1a6f98199 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -301,8 +301,7 @@ class Agent(object): ("[SPACE_REPLACE]", kb.chars.space), ("[DOLLAR_REPLACE]", kb.chars.dollar), ("[HASH_REPLACE]", kb.chars.hash_), - ("[GENERIC_SQL_COMMENT]", GENERIC_SQL_COMMENT), - ("[ORIGINAL]", origValue or "") + ("[GENERIC_SQL_COMMENT]", GENERIC_SQL_COMMENT) ) payload = reduce(lambda x, y: x.replace(y[0], y[1]), replacements, payload) @@ -312,9 +311,12 @@ class Agent(object): for _ in set(re.findall(r"(?i)\[RANDSTR(?:\d+)?\]", payload)): payload = payload.replace(_, randomStr()) - if origValue is not None and "[ORIGVALUE]" in payload: + if origValue is not None: origValue = getUnicode(origValue) - payload = getUnicode(payload).replace("[ORIGVALUE]", origValue if origValue.isdigit() else unescaper.escape("'%s'" % origValue)) + if "[ORIGVALUE]" in payload: + payload = getUnicode(payload).replace("[ORIGVALUE]", origValue if origValue.isdigit() else unescaper.escape("'%s'" % origValue)) + if "[ORIGINAL]" in payload: + payload = getUnicode(payload).replace("[ORIGINAL]", origValue) if INFERENCE_MARKER in payload: if Backend.getIdentifiedDbms() is not None: diff --git a/lib/core/settings.py b/lib/core/settings.py index b20c1d2d9..1a3cd30c7 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.9.5" +VERSION = "1.2.9.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 cdfd423d6..abaeddb63 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -28,7 +28,7 @@ b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py c414cecdb0472c92cf50ed5b01e4438c lib/controller/controller.py c7443613a0a2505b1faec931cee2a6ef lib/controller/handler.py 1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py -738e160412b3cb52bdeb7bc58dec91c9 lib/core/agent.py +8eb0a5dbd79bd58fedac4c0cc344246b lib/core/agent.py fd8f239e259afaf5f24bcf34a0ad187f lib/core/bigarray.py 6e73b39f7c51f75ae64a652dec69ab2f lib/core/common.py 0d082da16c388b3445e656e0760fb582 lib/core/convert.py @@ -50,7 +50,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py -1e62a08b7dc32e7063ca5d981354c5fc lib/core/settings.py +24ed497dd48a34fdada54a0cb62f1161 lib/core/settings.py dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py 815d1cf27f0f8738d81531e73149867d lib/core/target.py @@ -469,7 +469,7 @@ d48c971769c6131e35bd52d2315a8d58 xml/banner/servlet-engine.xml d989813ee377252bca2103cea524c06b xml/banner/sharepoint.xml 350605448f049cd982554123a75f11e1 xml/banner/x-aspnet-version.xml 817078783e1edaa492773d3b34d8eef0 xml/banner/x-powered-by.xml -8400e0dce3304eae2189fdff5813d7fe xml/boundaries.xml +55216973f6846ea2b3c3da39464dbf7e xml/boundaries.xml 6cffc395cd0280f5c1a84542da6642e5 xml/errors.xml a279656ea3fcb85c727249b02f828383 xml/livetests.xml 3318571fac8df058f19ea85780606643 xml/payloads/boolean_blind.xml diff --git a/xml/boundaries.xml b/xml/boundaries.xml index cd954ebcf..8ecfe5980 100644 --- a/xml/boundaries.xml +++ b/xml/boundaries.xml @@ -497,6 +497,15 @@ Formats: ` AND `[ORIGINAL] + + + 5 + 1 + 1 + 1 + "=[ORIGINAL] + AND [ORIGINAL]="[ORIGINAL] +