From 76c873a22287a9f3d86d48c85f3c30aadf384380 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 15 Jun 2012 06:22:44 +0000 Subject: [PATCH] minor fix --- lib/core/agent.py | 2 +- lib/techniques/blind/inference.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 90650e6df..1e10284e3 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -420,7 +420,7 @@ class Agent: fieldsToCastStr = fieldsSelectFrom.groups()[0] elif fieldsSelect: fieldsToCastStr = fieldsSelect.groups()[0] - elif fieldsNoSelect: + else: fieldsToCastStr = fieldsNoSelect # Function diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index f336e92bc..399122703 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -105,14 +105,14 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None else: expressionUnescaped = unescaper.unescape(expression) - if length and not isinstance(length, int) and length.isdigit(): + if length and isinstance(length, basestring) and length.isdigit(): length = int(length) if length == 0: return 0, "" if lastChar > 0 and length > ( lastChar - firstChar ): - length = ( lastChar - firstChar ) + length = lastChar - firstChar showEta = conf.eta and isinstance(length, int) numThreads = min(conf.threads, length)