mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Minor cosmetic fixes
This commit is contained in:
parent
2bbe0c9ba6
commit
1674142d82
|
@ -87,18 +87,20 @@ def checkCharEncoding(encoding):
|
||||||
|
|
||||||
if ';' in encoding:
|
if ';' in encoding:
|
||||||
encoding = encoding[:encoding.find(';')]
|
encoding = encoding[:encoding.find(';')]
|
||||||
#http://philip.html5.org/data/charsets-2.html
|
|
||||||
|
# http://philip.html5.org/data/charsets-2.html
|
||||||
if encoding in translate:
|
if encoding in translate:
|
||||||
encoding = translate[encoding]
|
encoding = translate[encoding]
|
||||||
elif encoding.startswith('cp-'):
|
elif encoding.startswith('cp-'):
|
||||||
encoding = 'cp%s' % encoding[3:]
|
encoding = 'cp%s' % encoding[3:]
|
||||||
elif encoding.startswith('windows') and not encoding.startswith('windows-'):
|
elif encoding.startswith('windows') and not encoding.startswith('windows-'):
|
||||||
encoding = 'windows-%s' % encoding[7:]
|
encoding = 'windows-%s' % encoding[7:]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
codecs.lookup(encoding)
|
codecs.lookup(encoding)
|
||||||
except LookupError:
|
except LookupError:
|
||||||
warnMsg = "unknown charset '%s'. " % encoding
|
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)
|
logger.warn(warnMsg)
|
||||||
encoding = conf.dataEncoding
|
encoding = conf.dataEncoding
|
||||||
|
|
|
@ -93,7 +93,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||||
progress = ProgressBar(maxValue=length)
|
progress = ProgressBar(maxValue=length)
|
||||||
progressTime = []
|
progressTime = []
|
||||||
|
|
||||||
if numThreads is not None:
|
if numThreads > 1:
|
||||||
debugMsg = "starting %d thread%s" % (numThreads, ("s" if numThreads > 1 else ""))
|
debugMsg = "starting %d thread%s" % (numThreads, ("s" if numThreads > 1 else ""))
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user