From af226796055b40164f94b3c027369abe2a27c219 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 8 Dec 2010 13:09:27 +0000 Subject: [PATCH] minor update --- lib/core/agent.py | 5 +++-- lib/techniques/inband/union/test.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 01a93d526..d4c2c22c5 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -20,6 +20,7 @@ from lib.core.data import kb from lib.core.data import queries from lib.core.datatype import advancedDict from lib.core.enums import DBMS +from lib.core.enums import PAYLOAD from lib.core.enums import PLACE from lib.core.exception import sqlmapNoneDataException from lib.core.settings import PAYLOAD_DELIMITER @@ -151,10 +152,10 @@ class Agent: # Either if the technique is stacked queries () or we are # replacing () the parameter original value with our # payload, do not put a space after the prefix - if kb.technique == 4: + if kb.technique == PAYLOAD.TECHNIQUE.STACKED: query = kb.injection.prefix elif kb.injection.clause == [2, 3] or kb.injection.clause == [ 3 ]: - if kb.technique != 3: + if kb.technique != PAYLOAD.TECHNIQUE.UNION: query = kb.injection.prefix elif kb.technique and kb.technique in kb.injection.data: where = kb.injection.data[kb.technique].where diff --git a/lib/techniques/inband/union/test.py b/lib/techniques/inband/union/test.py index 7ecbc480b..3be9df49a 100644 --- a/lib/techniques/inband/union/test.py +++ b/lib/techniques/inband/union/test.py @@ -14,6 +14,7 @@ from lib.core.data import kb from lib.core.data import logger from lib.core.data import queries from lib.core.enums import DBMS +from lib.core.enums import PAYLOAD from lib.core.session import setUnion from lib.core.unescaper import unescaper from lib.parse.html import htmlParser @@ -118,7 +119,7 @@ def unionTest(): return kb.unionTest oldTechnique = kb.technique - kb.technique = 3 + kb.technique = PAYLOAD.TECHNIQUE.UNION if conf.uChar == "NULL": technique = "NULL bruteforcing"