mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
fix for "unknown charset 'windows-874'" reported by Phat R.
This commit is contained in:
parent
82bce81e28
commit
48a67d6d51
|
@ -91,9 +91,19 @@ def parseResponse(page, headers):
|
|||
kb.absFilePaths.add(absFilePath)
|
||||
|
||||
def checkCharEncoding(encoding):
|
||||
if encoding:
|
||||
encoding = encoding.lower()
|
||||
else:
|
||||
return encoding
|
||||
|
||||
#http://www.destructor.de/charsets/index.htm
|
||||
translate = { 'windows-874':'iso-8859-11' }
|
||||
|
||||
#http://philip.html5.org/data/charsets-2.html
|
||||
if encoding and encoding.startswith('cp-'):
|
||||
encoding = 'cp%s' % encoding[3:]
|
||||
elif encoding in translate:
|
||||
encoding = translate[encoding]
|
||||
try:
|
||||
codecs.lookup(encoding)
|
||||
except LookupError:
|
||||
|
|
Loading…
Reference in New Issue
Block a user