From 7349f3a70ff9a779c6dd56c7199dd089941dc4c3 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 1 Jul 2010 15:25:57 +0000 Subject: [PATCH] Closes #197 --- lib/techniques/blind/inference.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 38dd2e0d1..dbd907d6d 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -290,16 +290,19 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None val = getChar(curidx) if val is None: - if not kb.assumeBlank: + if not kb.assumeEmpty: iolock.acquire() + warnMsg = "failed to get character at index %d (expected %d total)." % (curidx, length) logger.warn(warnMsg) - message = "assume blank character? [Y/n/a]" - getOutput = readInput(message, default="Y") + + message = "assume empty character? [Y/n/a]" + choice = readInput(message, default="Y") iolock.release() - if getOutput in ("a", "A"): - kb.assumeBlank = True - elif not getOutput or getOutput in ("y", "Y"): + + if choice in ("a", "A"): + kb.assumeEmpty = True + elif not choice or choice in ("y", "Y"): pass # do nothing else: raise sqlmapValueException