mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-02 21:09:01 +00:00
Adding deprecated options (along with obsolete)
This commit is contained in:
@@ -70,6 +70,7 @@ from lib.core.decorators import cachedmethod
|
||||
from lib.core.defaults import defaults
|
||||
from lib.core.dicts import DBMS_DICT
|
||||
from lib.core.dicts import DEFAULT_DOC_ROOTS
|
||||
from lib.core.dicts import DEPRECATED_OPTIONS
|
||||
from lib.core.dicts import OBSOLETE_OPTIONS
|
||||
from lib.core.dicts import SQL_STATEMENTS
|
||||
from lib.core.enums import ADJUST_TIME_DELAY
|
||||
@@ -4466,9 +4467,9 @@ def getHostHeader(url):
|
||||
|
||||
return retVal
|
||||
|
||||
def checkObsoleteOptions(args):
|
||||
def checkOldOptions(args):
|
||||
"""
|
||||
Checks for obsolete options
|
||||
Checks for obsolete/deprecated options
|
||||
"""
|
||||
|
||||
for _ in args:
|
||||
@@ -4478,6 +4479,11 @@ def checkObsoleteOptions(args):
|
||||
if OBSOLETE_OPTIONS[_]:
|
||||
errMsg += " (hint: %s)" % OBSOLETE_OPTIONS[_]
|
||||
raise SqlmapSyntaxException(errMsg)
|
||||
elif _ in DEPRECATED_OPTIONS:
|
||||
warnMsg = "switch/option '%s' is deprecated" % _
|
||||
if DEPRECATED_OPTIONS[_]:
|
||||
warnMsg += " (hint: %s)" % DEPRECATED_OPTIONS[_]
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def checkSystemEncoding():
|
||||
"""
|
||||
|
||||
@@ -290,10 +290,13 @@ OBSOLETE_OPTIONS = {
|
||||
"--purge-output": "use '--purge' instead",
|
||||
"--check-payload": None,
|
||||
"--check-waf": None,
|
||||
"--identify-waf": "functionality being done automatically",
|
||||
"--pickled-options": "use '--api -c ...' instead",
|
||||
}
|
||||
|
||||
DEPRECATED_OPTIONS = {
|
||||
"--identify-waf": "functionality being done automatically",
|
||||
}
|
||||
|
||||
DUMP_DATA_PREPROCESS = {
|
||||
DBMS.ORACLE: {"XMLTYPE": "(%s).getStringVal()"}, # Reference: https://www.tibcommunity.com/docs/DOC-3643
|
||||
DBMS.MSSQL: {"IMAGE": "CONVERT(VARBINARY(MAX),%s)"},
|
||||
|
||||
@@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.6.24"
|
||||
VERSION = "1.3.6.25"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
||||
Reference in New Issue
Block a user