mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
fix for bug reported by ToR (unknown charset 'utf-8, text/html')
This commit is contained in:
parent
c7c84c3089
commit
861706fb31
|
@ -422,6 +422,9 @@ Stuffe <stuffe.dk@gmail.com>
|
|||
Sylphid <sylphid.su@sti.com.tw>
|
||||
for suggesting some features
|
||||
|
||||
ToR <sstidus@email.it>
|
||||
for reporting a minor bug
|
||||
|
||||
== Organizations ==
|
||||
|
||||
Black Hat team <info@blackhat.com>
|
||||
|
|
|
@ -81,8 +81,9 @@ def checkCharEncoding(encoding):
|
|||
#http://www.destructor.de/charsets/index.htm
|
||||
translate = { 'windows-874':'iso-8859-11' }
|
||||
|
||||
if ';' in encoding:
|
||||
encoding = encoding[:encoding.find(';')]
|
||||
for delimiter in (';', ','):
|
||||
if delimiter in encoding:
|
||||
encoding = encoding[:encoding.find(delimiter)]
|
||||
|
||||
# http://philip.html5.org/data/charsets-2.html
|
||||
if encoding in translate:
|
||||
|
@ -97,9 +98,9 @@ def checkCharEncoding(encoding):
|
|||
except LookupError:
|
||||
warnMsg = "unknown charset '%s'. " % encoding
|
||||
warnMsg += "Please report by e-mail to sqlmap-users@lists.sourceforge.net."
|
||||
|
||||
logger.warn(warnMsg)
|
||||
encoding = conf.dataEncoding
|
||||
|
||||
return encoding
|
||||
|
||||
def decodePage(page, contentEncoding, contentType):
|
||||
|
|
Loading…
Reference in New Issue
Block a user