mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
added --charset option to force charset encoding of the retrieved data (e.g. when the backend collation is different than the current web page charset) as requested by devon.mitchell1988@yahoo.com
This commit is contained in:
@@ -1636,6 +1636,15 @@ def __basicOptionValidation():
|
||||
errMsg = "value for --union-cols must be a range with hyphon (e.g. 1-10)"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
if conf.charset:
|
||||
try:
|
||||
codecs.lookup(conf.charset)
|
||||
except LookupError:
|
||||
errMsg = "unknown charset '%s'. please visit page " % conf.charset
|
||||
errMsg += "'http://docs.python.org/library/codecs.html#standard-encodings' "
|
||||
errMsg += "to get the full list of supported charsets"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
def init(inputOptions=advancedDict(), overrideOptions=False):
|
||||
"""
|
||||
Set attributes into both configuration and knowledge base singletons
|
||||
|
||||
Reference in New Issue
Block a user