From edf7dcee22f8447b38f89118d0f75ecdc9370bcb Mon Sep 17 00:00:00 2001 From: stasinopoulos Date: Wed, 7 Aug 2024 07:12:36 +0300 Subject: [PATCH] Fixes https://github.com/commixproject/commix/issues/920 --- src/core/injections/controller/injector.py | 16 ++++++++++------ src/utils/settings.py | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/core/injections/controller/injector.py b/src/core/injections/controller/injector.py index 5bcc49d262..b217f4a38d 100755 --- a/src/core/injections/controller/injector.py +++ b/src/core/injections/controller/injector.py @@ -373,14 +373,18 @@ def custom_web_root(url, OUTPUT_TEXTFILE): message = "Enter URL to use " message += "for command execution output > " message = common.read_input(message, default=output, check_batch=True) - output = settings.DEFINED_WEBROOT = message - info_msg = "Using '" + output - info_msg += "' for command execution output." - settings.print_data_to_stdout(settings.print_info_msg(info_msg)) - if not settings.DEFINED_WEBROOT: + if not re.search(r'^(?:http)s?://', message, re.I): + common.invalid_option(message) pass else: - break + output = settings.DEFINED_WEBROOT = message + info_msg = "Using '" + output + info_msg += "' for command execution output." + settings.print_data_to_stdout(settings.print_info_msg(info_msg)) + if not settings.DEFINED_WEBROOT: + pass + else: + break elif procced_option in settings.CHOICE_QUIT: raise SystemExit() else: diff --git a/src/utils/settings.py b/src/utils/settings.py index 03b8943e29..4a186098d9 100755 --- a/src/utils/settings.py +++ b/src/utils/settings.py @@ -262,7 +262,7 @@ def sys_argv_errors(): DESCRIPTION = "The command injection exploiter" AUTHOR = "Anastasios Stasinopoulos" VERSION_NUM = "4.0" -REVISION = "90" +REVISION = "91" STABLE_RELEASE = False VERSION = "v" if STABLE_RELEASE: