@@ -107,9 +107,9 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
107107 _ , _ , _ , _ , _ , _ , fieldToCastStr , _ = agent .getFields (expression )
108108 nulledCastedField = agent .nullAndCastField (fieldToCastStr )
109109 expressionReplaced = expression .replace (fieldToCastStr , nulledCastedField , 1 )
110- expressionUnescaped = unescaper .unescape (expressionReplaced )
110+ expressionUnescaped = unescaper .escape (expressionReplaced )
111111 else :
112- expressionUnescaped = unescaper .unescape (expression )
112+ expressionUnescaped = unescaper .escape (expression )
113113
114114 if length and isinstance (length , basestring ) and length .isdigit ():
115115 length = int (length )
@@ -234,7 +234,7 @@ def getChar(idx, charTbl=None, continuousOrder=True, expand=charsetType is None,
234234 else :
235235 # e.g.: ... > '%c' -> ... > ORD(..)
236236 markingValue = "'%s'" % CHAR_INFERENCE_MARK
237- unescapedCharValue = unescaper .unescape ("'%s'" % decodeIntToUnicode (posValue ))
237+ unescapedCharValue = unescaper .escape ("'%s'" % decodeIntToUnicode (posValue ))
238238 forgedPayload = safeStringFormat (payload , (expressionUnescaped , idx )).replace (markingValue , unescapedCharValue )
239239
240240 result = Request .queryPage (forgedPayload , timeBasedCompare = timeBasedCompare , raise404 = False )
@@ -461,7 +461,7 @@ def blindThread():
461461 # it via equal against the query output
462462 if commonValue is not None :
463463 # One-shot query containing equals commonValue
464- testValue = unescaper .unescape ("'%s'" % commonValue ) if "'" not in commonValue else unescaper .unescape ("%s" % commonValue , quote = False )
464+ testValue = unescaper .escape ("'%s'" % commonValue ) if "'" not in commonValue else unescaper .escape ("%s" % commonValue , quote = False )
465465 query = agent .prefixQuery (safeStringFormat ("AND (%s) = %s" , (expressionUnescaped , testValue )))
466466 query = agent .suffixQuery (query )
467467 result = Request .queryPage (agent .payload (newValue = query ), timeBasedCompare = timeBasedCompare , raise404 = False )
@@ -483,7 +483,7 @@ def blindThread():
483483 if commonPattern is not None :
484484 # Substring-query containing equals commonPattern
485485 subquery = queries [Backend .getIdentifiedDbms ()].substring .query % (expressionUnescaped , 1 , len (commonPattern ))
486- testValue = unescaper .unescape ("'%s'" % commonPattern ) if "'" not in commonPattern else unescaper .unescape ("%s" % commonPattern , quote = False )
486+ testValue = unescaper .escape ("'%s'" % commonPattern ) if "'" not in commonPattern else unescaper .escape ("%s" % commonPattern , quote = False )
487487 query = agent .prefixQuery (safeStringFormat ("AND (%s) = %s" , (subquery , testValue )))
488488 query = agent .suffixQuery (query )
489489 result = Request .queryPage (agent .payload (newValue = query ), timeBasedCompare = timeBasedCompare , raise404 = False )
0 commit comments