4343from lib .core .enums import DBMS
4444from lib .core .enums import HASHDB_KEYS
4545from lib .core .enums import HTTP_HEADER
46+ from lib .core .enums import PAYLOAD
4647from lib .core .exception import SqlmapDataException
4748from lib .core .settings import CHECK_ZERO_COLUMNS_THRESHOLD
4849from lib .core .settings import MAX_ERROR_CHUNK_LENGTH
@@ -123,7 +124,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
123124 nulledCastedField = queries [Backend .getIdentifiedDbms ()].substring .query % (nulledCastedField , offset , kb .errorChunkLength )
124125
125126 # Forge the error-based SQL injection request
126- vector = kb .injection .data [kb . technique ].vector
127+ vector = kb .injection .data [PAYLOAD . TECHNIQUE . ERROR ].vector
127128 query = agent .prefixQuery (vector )
128129 query = agent .suffixQuery (query )
129130 injExpression = expression .replace (field , nulledCastedField , 1 ) if field else expression
@@ -134,7 +135,7 @@ def _oneShotErrorUse(expression, field=None, chunkTest=False):
134135 # Perform the request
135136 page , headers , _ = Request .queryPage (payload , content = True , raise404 = False )
136137
137- incrementCounter (kb . technique )
138+ incrementCounter (PAYLOAD . TECHNIQUE . ERROR )
138139
139140 if page and conf .noEscape :
140141 page = re .sub (r"('|\%%27)%s('|\%%27).*?('|\%%27)%s('|\%%27)" % (kb .chars .start , kb .chars .stop ), "" , page )
@@ -247,7 +248,7 @@ def _errorFields(expression, expressionFields, expressionFieldsList, num=None, e
247248 if not kb .threadContinue :
248249 return None
249250
250- if not suppressOutput :
251+ if not any (( suppressOutput , kb . bruteMode )) :
251252 if kb .fileReadMode and output and output .strip ():
252253 print ()
253254 elif output is not None and not (threadData .resumed and kb .suppressResumeInfo ) and not (emptyFields and field in emptyFields ):
@@ -298,7 +299,7 @@ def errorUse(expression, dump=False):
298299 SQL injection vulnerability on the affected parameter.
299300 """
300301
301- initTechnique (kb . technique )
302+ initTechnique (PAYLOAD . TECHNIQUE . ERROR )
302303
303304 abortedFlag = False
304305 count = None
@@ -460,7 +461,7 @@ def errorThread():
460461 duration = calculateDeltaSeconds (start )
461462
462463 if not kb .bruteMode :
463- debugMsg = "performed %d queries in %.2f seconds" % (kb .counters [kb . technique ], duration )
464+ debugMsg = "performed %d queries in %.2f seconds" % (kb .counters [PAYLOAD . TECHNIQUE . ERROR ], duration )
464465 logger .debug (debugMsg )
465466
466467 return value
0 commit comments