mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Minor update
This commit is contained in:
parent
a100496ec0
commit
7747112340
3 changed files with 5 additions and 5 deletions
|
|
@ -235,13 +235,13 @@ def checkCharEncoding(encoding, warn=True):
|
|||
# Reference: http://docs.python.org/library/codecs.html
|
||||
try:
|
||||
codecs.lookup(encoding)
|
||||
except:
|
||||
except LookupError:
|
||||
encoding = None
|
||||
|
||||
if encoding:
|
||||
try:
|
||||
six.text_type(getBytes(randomStr()), encoding)
|
||||
except:
|
||||
except (UnicodeDecodeError, LookupError):
|
||||
if warn:
|
||||
warnMsg = "invalid web page charset '%s'" % encoding
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, encoding)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue