diff --git a/lib/core/settings.py b/lib/core/settings.py index 30c479510..4d7913b31 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.5.1.39" +VERSION = "1.5.1.40" 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) diff --git a/lib/core/testing.py b/lib/core/testing.py index d44517bb5..ceb270155 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -39,7 +39,7 @@ def vulnTest(): TESTS = ( ("-h", ("to see full list of options run with '-hh'",)), - ("--dependencies", ("sqlmap requires", "third-party library")), + ("--dependencies --deprecations", ("sqlmap requires", "third-party library", "~DeprecationWarning:")), ("-u --flush-session --wizard", ("Please choose:", "back-end DBMS: SQLite", "current user is DBA: True", "banner: '3.")), (u"-c --flush-session --roles --statements --hostname --privileges --sql-query=\"SELECT '\u0161u\u0107uraj'\" --technique=U", (u": '\u0161u\u0107uraj'", "on SQLite it is not possible")), (u"-u --flush-session --sql-query=\"SELECT '\u0161u\u0107uraj'\" --technique=B --no-escape --string=luther --unstable", (u": '\u0161u\u0107uraj'",)), diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 4224fb064..9d5bdc8f5 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -779,6 +779,9 @@ def cmdLineParser(argv=None): parser.add_argument("--debug", dest="debug", action="store_true", help=SUPPRESS) + parser.add_argument("--deprecations", dest="deprecations", action="store_true", + help=SUPPRESS) + parser.add_argument("--disable-multi", dest="disableMulti", action="store_true", help=SUPPRESS) diff --git a/sqlmap.py b/sqlmap.py index f18df7fbe..7a4f63468 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -37,9 +37,11 @@ try: warnings.filterwarnings(action="ignore", message=".*was already imported", category=UserWarning) warnings.filterwarnings(action="ignore", message=".*using a very old release", category=UserWarning) warnings.filterwarnings(action="ignore", message=".*default buffer size will be used", category=RuntimeWarning) - warnings.filterwarnings(action="ignore", category=DeprecationWarning) warnings.filterwarnings(action="ignore", category=UserWarning, module="psycopg2") + if "--deprecations" not in sys.argv: + warnings.filterwarnings(action="ignore", category=DeprecationWarning) + from lib.core.data import logger from lib.core.common import banner