minor refactoring

This commit is contained in:
Miroslav Stampar 2011-05-17 23:03:31 +00:00
parent cc07e5dc97
commit 3048e9f710
2 changed files with 5 additions and 1 deletions

View File

@ -71,6 +71,7 @@ from lib.core.exception import sqlmapSyntaxException
from lib.core.exception import sqlmapUnsupportedDBMSException from lib.core.exception import sqlmapUnsupportedDBMSException
from lib.core.exception import sqlmapUserQuitException from lib.core.exception import sqlmapUserQuitException
from lib.core.optiondict import optDict from lib.core.optiondict import optDict
from lib.core.settings import CODECS_LIST_PAGE
from lib.core.settings import DEFAULT_PAGE_ENCODING from lib.core.settings import DEFAULT_PAGE_ENCODING
from lib.core.settings import IS_WIN from lib.core.settings import IS_WIN
from lib.core.settings import PLATFORM from lib.core.settings import PLATFORM
@ -1641,7 +1642,7 @@ def __basicOptionValidation():
codecs.lookup(conf.charset) codecs.lookup(conf.charset)
except LookupError: except LookupError:
errMsg = "unknown charset '%s'. please visit page " % conf.charset errMsg = "unknown charset '%s'. please visit page " % conf.charset
errMsg += "'http://docs.python.org/library/codecs.html#standard-encodings' " errMsg += "'%s' " % CODECS_LIST_PAGE
errMsg += "to get the full list of supported charsets" errMsg += "to get the full list of supported charsets"
raise sqlmapSyntaxException, errMsg raise sqlmapSyntaxException, errMsg

View File

@ -330,3 +330,6 @@ TURN_OFF_RESUME_INFO_LIMIT = 20
# Strftime format for results file used in multiple target mode # Strftime format for results file used in multiple target mode
RESULTS_FILE_FORMAT = 'results-%I%M%p_%m%d%Y.csv' RESULTS_FILE_FORMAT = 'results-%I%M%p_%m%d%Y.csv'
# Official web page with the list of Python supported codecs
CODECS_LIST_PAGE = 'http://docs.python.org/library/codecs.html#standard-encodings'