From 1674142d822422af393da49c1e2896bbde213f20 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 14 Oct 2010 15:28:54 +0000 Subject: [PATCH] Minor cosmetic fixes --- lib/request/basic.py | 6 ++++-- lib/techniques/blind/inference.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/request/basic.py b/lib/request/basic.py index 81b359b70..4cadd485a 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -87,18 +87,20 @@ def checkCharEncoding(encoding): if ';' in encoding: encoding = encoding[:encoding.find(';')] - #http://philip.html5.org/data/charsets-2.html + + # http://philip.html5.org/data/charsets-2.html if encoding in translate: encoding = translate[encoding] elif encoding.startswith('cp-'): encoding = 'cp%s' % encoding[3:] elif encoding.startswith('windows') and not encoding.startswith('windows-'): encoding = 'windows-%s' % encoding[7:] + try: codecs.lookup(encoding) except LookupError: warnMsg = "unknown charset '%s'. " % encoding - warnMsg += "please report by e-mail to sqlmap-users@lists.sourceforge.net." + warnMsg += "Please report by e-mail to sqlmap-users@lists.sourceforge.net." logger.warn(warnMsg) encoding = conf.dataEncoding diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 05813f5ce..42d1f0f61 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -93,7 +93,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None progress = ProgressBar(maxValue=length) progressTime = [] - if numThreads is not None: + if numThreads > 1: debugMsg = "starting %d thread%s" % (numThreads, ("s" if numThreads > 1 else "")) logger.debug(debugMsg)