mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +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
|
||||
|
||||
@@ -150,14 +150,15 @@ optDict = {
|
||||
|
||||
"General": {
|
||||
#"xmlFile": "string",
|
||||
"trafficFile": "string",
|
||||
"sessionFile": "string",
|
||||
"flushSession": "boolean",
|
||||
"freshQueries": "boolean",
|
||||
"forms": "boolean",
|
||||
"trafficFile": "string",
|
||||
"batch": "boolean",
|
||||
"charset": "string",
|
||||
"eta": "boolean",
|
||||
"updateAll": "boolean",
|
||||
"batch": "boolean"
|
||||
"flushSession": "boolean",
|
||||
"forms": "boolean",
|
||||
"freshQueries": "boolean",
|
||||
"updateAll": "boolean"
|
||||
},
|
||||
|
||||
"Miscellaneous": {
|
||||
|
||||
Reference in New Issue
Block a user