mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +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>
|
Sylphid <sylphid.su@sti.com.tw>
|
||||||
for suggesting some features
|
for suggesting some features
|
||||||
|
|
||||||
|
ToR <sstidus@email.it>
|
||||||
|
for reporting a minor bug
|
||||||
|
|
||||||
== Organizations ==
|
== Organizations ==
|
||||||
|
|
||||||
Black Hat team <info@blackhat.com>
|
Black Hat team <info@blackhat.com>
|
||||||
|
|
|
@ -81,8 +81,9 @@ def checkCharEncoding(encoding):
|
||||||
#http://www.destructor.de/charsets/index.htm
|
#http://www.destructor.de/charsets/index.htm
|
||||||
translate = { 'windows-874':'iso-8859-11' }
|
translate = { 'windows-874':'iso-8859-11' }
|
||||||
|
|
||||||
if ';' in encoding:
|
for delimiter in (';', ','):
|
||||||
encoding = encoding[:encoding.find(';')]
|
if delimiter in encoding:
|
||||||
|
encoding = encoding[:encoding.find(delimiter)]
|
||||||
|
|
||||||
# http://philip.html5.org/data/charsets-2.html
|
# http://philip.html5.org/data/charsets-2.html
|
||||||
if encoding in translate:
|
if encoding in translate:
|
||||||
|
@ -97,9 +98,9 @@ def checkCharEncoding(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
|
||||||
|
|
||||||
return encoding
|
return encoding
|
||||||
|
|
||||||
def decodePage(page, contentEncoding, contentType):
|
def decodePage(page, contentEncoding, contentType):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user