2828from lib .core .data import logger
2929from lib .core .data import queries
3030from lib .core .enums import DBMS
31+ from lib .core .enums import PAYLOAD
3132from lib .core .exception import sqlmapNotVulnerableException
3233from lib .core .settings import MIN_TIME_RESPONSES
3334from lib .request .connect import Connect as Request
@@ -387,7 +388,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
387388 expression = expression .replace ("DISTINCT " , "" )
388389
389390 if inband and kb .unionTest is not None :
390- kb .technique = 3
391+ kb .technique = PAYLOAD . TECHNIQUE . UNION
391392 value = __goInband (expression , expected , sort , resumeValue , unpack , dump )
392393
393394 if not value :
@@ -400,7 +401,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
400401 kb .unionNegative = False
401402
402403 if error and kb .errorTest and not value :
403- kb .technique = 2
404+ kb .technique = PAYLOAD . TECHNIQUE . ERROR
404405 value = __goError (expression , resumeValue )
405406
406407 if not value :
@@ -410,11 +411,11 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
410411 logger .warn (warnMsg )
411412
412413 if blind and kb .booleanTest and not value :
413- kb .technique = 1
414+ kb .technique = PAYLOAD . TECHNIQUE . BOOLEAN
414415 value = __goInferenceProxy (expression , fromUser , expected , batch , resumeValue , unpack , charsetType , firstChar , lastChar )
415416
416417 if time and kb .timeTest and not value :
417- kb .technique = 5
418+ kb .technique = PAYLOAD . TECHNIQUE . TIME
418419
419420 while len (kb .responseTimes ) < MIN_TIME_RESPONSES :
420421 _ = Request .queryPage (content = True )
@@ -436,7 +437,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
436437 return value
437438
438439def goStacked (expression , silent = False ):
439- kb .technique = 4
440+ kb .technique = PAYLOAD . TECHNIQUE . STACKED
440441 expression = cleanQuery (expression )
441442
442443 if conf .direct :
0 commit comments