mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
fix for a bug reported by Kirill (unknown charset '8859-1')
This commit is contained in:
parent
d79fae724c
commit
762397854e
|
@ -101,11 +101,15 @@ def checkCharEncoding(encoding):
|
||||||
if delimiter in encoding:
|
if delimiter in encoding:
|
||||||
encoding = encoding[:encoding.find(delimiter)]
|
encoding = encoding[:encoding.find(delimiter)]
|
||||||
|
|
||||||
|
# popular typos/errors
|
||||||
|
if '8858' in encoding:
|
||||||
|
encoding = encoding.replace('8858', '8859')
|
||||||
|
if encoding.startswith('8859'):
|
||||||
|
encoding = 'iso-%s' % encoding
|
||||||
|
|
||||||
# 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('iso-8858'): #very popular typo
|
|
||||||
encoding = encoding.replace('8858', '8859')
|
|
||||||
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-'):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user