diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 17ee9bc86..633d0af4b 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -42,6 +42,7 @@ from lib.core.session import setInjection from lib.core.target import initTargetEnv from lib.core.target import setupTargetEnv from lib.core.testing import smokeTest +from lib.core.testing import liveTest from lib.utils.parenthesis import checkForParenthesis def __selectInjection(injData): @@ -95,8 +96,13 @@ def start(): return if conf.smokeTest: - if not smokeTest(): - return + smokeTest() + + if conf.liveTest: + liveTest() + + if conf.smokeTest or conf.liveTest: + return if conf.direct: initTargetEnv() diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 784d15d83..699d8ecf8 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -467,6 +467,9 @@ def cmdLineParser(): parser.add_option("--smoke-test", dest="smokeTest", action="store_true", help=SUPPRESS_HELP) + parser.add_option("--live-test", dest="liveTest", action="store_true", + help=SUPPRESS_HELP) + parser.add_option_group(target) parser.add_option_group(request) parser.add_option_group(injection) @@ -481,7 +484,8 @@ def cmdLineParser(): (args, _) = parser.parse_args([utf8decode(arg) for arg in sys.argv]) - if not args.direct and not args.url and not args.list and not args.googleDork and not args.configFile and not args.requestFile and not args.updateAll and not args.smokeTest: + if not args.direct and not args.url and not args.list and not args.googleDork and not args.configFile\ + and not args.requestFile and not args.updateAll and not args.smokeTest and not args.liveTest: errMsg = "missing a mandatory parameter ('-d', '-u', '-l', '-r', '-g', '-c' or '--update'), " errMsg += "-h for help" parser.error(errMsg)