Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit af22679

Browse files
committed
minor update
1 parent 6223f25 commit af22679

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/core/agent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from lib.core.data import queries
2121
from lib.core.datatype import advancedDict
2222
from lib.core.enums import DBMS
23+
from lib.core.enums import PAYLOAD
2324
from lib.core.enums import PLACE
2425
from lib.core.exception import sqlmapNoneDataException
2526
from lib.core.settings import PAYLOAD_DELIMITER
@@ -151,10 +152,10 @@ def prefixQuery(self, string):
151152
# Either if the technique is stacked queries (<stype>) or we are
152153
# replacing (<where>) the parameter original value with our
153154
# payload, do not put a space after the prefix
154-
if kb.technique == 4:
155+
if kb.technique == PAYLOAD.TECHNIQUE.STACKED:
155156
query = kb.injection.prefix
156157
elif kb.injection.clause == [2, 3] or kb.injection.clause == [ 3 ]:
157-
if kb.technique != 3:
158+
if kb.technique != PAYLOAD.TECHNIQUE.UNION:
158159
query = kb.injection.prefix
159160
elif kb.technique and kb.technique in kb.injection.data:
160161
where = kb.injection.data[kb.technique].where

lib/techniques/inband/union/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from lib.core.data import logger
1515
from lib.core.data import queries
1616
from lib.core.enums import DBMS
17+
from lib.core.enums import PAYLOAD
1718
from lib.core.session import setUnion
1819
from lib.core.unescaper import unescaper
1920
from lib.parse.html import htmlParser
@@ -118,7 +119,7 @@ def unionTest():
118119
return kb.unionTest
119120

120121
oldTechnique = kb.technique
121-
kb.technique = 3
122+
kb.technique = PAYLOAD.TECHNIQUE.UNION
122123

123124
if conf.uChar == "NULL":
124125
technique = "NULL bruteforcing"

0 commit comments

Comments
 (0)