mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Fixes #1496
This commit is contained in:
parent
d41cd53d31
commit
0b64cf803c
|
@ -17,6 +17,7 @@ from lib.core.common import extractErrorMessage
|
|||
from lib.core.common import extractRegexResult
|
||||
from lib.core.common import getPublicTypeMembers
|
||||
from lib.core.common import getUnicode
|
||||
from lib.core.common import randomStr
|
||||
from lib.core.common import readInput
|
||||
from lib.core.common import resetCookieJar
|
||||
from lib.core.common import singleTimeLogMessage
|
||||
|
@ -206,6 +207,15 @@ def checkCharEncoding(encoding, warn=True):
|
|||
singleTimeLogMessage(warnMsg, logging.WARN, encoding)
|
||||
encoding = None
|
||||
|
||||
if encoding:
|
||||
try:
|
||||
unicode(randomStr(), encoding)
|
||||
except:
|
||||
if warn:
|
||||
warnMsg = "invalid web page charset '%s'" % encoding
|
||||
singleTimeLogMessage(warnMsg, logging.WARN, encoding)
|
||||
encoding = None
|
||||
|
||||
return encoding
|
||||
|
||||
def getHeuristicCharEncoding(page):
|
||||
|
|
Loading…
Reference in New Issue
Block a user