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

Skip to content

Commit 8ed76b3

Browse files
committed
minor update regarding good samaritan
1 parent 065d5b0 commit 8ed76b3

2 files changed

Lines changed: 12 additions & 7 deletions

File tree

lib/core/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,11 +1262,11 @@ def getGoodSamaritanParameters(part, prevValue, originalCharset):
12621262
predictedCharset.append(ordChar)
12631263

12641264
predictedCharset.sort()
1265-
1266-
if len(predictedCharset) > 1:
1267-
singleValue = None
12681265

1269-
return singleValue, predictedCharset, otherCharset
1266+
if len(predictedCharset) > 1:
1267+
return None, predictedCharset, otherCharset
1268+
else:
1269+
return singleValue, None, originalCharset
12701270
else:
12711271
return None, None, originalCharset
12721272

lib/techniques/blind/inference.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,18 @@ def downloadThread():
371371

372372
if conf.useCommonPrediction:
373373
singleValue, predictedCharset, otherCharset = getGoodSamaritanParameters(kb.partRun, finalValue, asciiTbl)
374+
val = None
375+
374376
if singleValue is None:
375377
val = getChar(index, predictedCharset, False) if predictedCharset else None
376378
else:
377-
##check if that's the value
378-
#finalValue = singleValue
379-
#break
379+
#forgedPayload = safeStringFormat('AND (%s) = \'%s\'', (expressionUnescaped, singleValue))
380+
#result = Request.queryPage(urlencode(forgedPayload))
381+
#if result:
382+
# finalValue = singleValue
383+
# break
380384
pass
385+
381386
if not val:
382387
val = getChar(index, otherCharset)
383388
else:

0 commit comments

Comments
 (0)