diff --git a/lib/core/option.py b/lib/core/option.py index e23f51347..944b11372 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -416,7 +416,7 @@ def _doSearch(): conf.googlePage += 1 def _setStdinPipeTargets(): - if isinstance(conf.stdinPipe, _collections.Iterable): + if isinstance(conf.stdinPipe, _collections.Iterable) and not conf.testing: infoMsg = "using 'STDIN' for parsing targets list" logger.info(infoMsg) diff --git a/lib/core/settings.py b/lib/core/settings.py index eae0324c5..955313237 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.5.9.12" +VERSION = "1.5.9.13" 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 12706246c..be60eb099 100644 --- a/lib/core/testing.py +++ b/lib/core/testing.py @@ -143,7 +143,7 @@ def vulnTest(): for tag, value in (("", url), ("", base), ("", direct), ("", tmpdir), ("", request), ("", log), ("", multiple), ("", config), ("", url.replace("id=1", "id=MZ=%3d"))): options = options.replace(tag, value) - cmd = "%s \"%s\" %s --batch --non-interactive --debug" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), options) + cmd = "%s \"%s\" %s --batch --non-interactive --testing --debug" % (sys.executable, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sqlmap.py")), options) if "" in cmd: handle, tmp = tempfile.mkstemp() @@ -153,6 +153,7 @@ def vulnTest(): if "" in cmd: cmd = re.sub(r"\s*", "", cmd) cmd = "echo %s | %s" % (url, cmd) + cmd = cmd.replace("--testing ", "") output = shellExec(cmd) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 5dacb84b5..eb55d21bc 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -815,6 +815,9 @@ def cmdLineParser(argv=None): parser.add_argument("--non-interactive", dest="nonInteractive", action="store_true", help=SUPPRESS) + parser.add_argument("--testing", dest="testing", action="store_true", + help=SUPPRESS) + parser.add_argument("--gui", dest="gui", action="store_true", help=SUPPRESS)