Minor cosmetic fixes

This commit is contained in:
Bernardo Damele 2010-10-14 15:28:54 +00:00
parent 2bbe0c9ba6
commit 1674142d82
2 changed files with 5 additions and 3 deletions

View File

@ -87,6 +87,7 @@ def checkCharEncoding(encoding):
if ';' in encoding:
encoding = encoding[:encoding.find(';')]
# http://philip.html5.org/data/charsets-2.html
if encoding in translate:
encoding = translate[encoding]
@ -94,11 +95,12 @@ def checkCharEncoding(encoding):
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

View File

@ -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)