Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
stasinopoulos committed May 10, 2024
1 parent daf9ec8 commit d81bcfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
25 changes: 1 addition & 24 deletions src/core/injections/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,30 +778,7 @@ def do_check(url, http_request_method, filename):
warn_msg = "Commands substitution using backtics is only supported by the (results-based) classic command injection technique. "
print(settings.print_warning_msg(warn_msg) + Style.RESET_ALL)

# Check for "wizard" switch.
if menu.options.wizard:
if perform_checks(url, http_request_method, filename) == False:
scan_level = menu.options.level
while int(scan_level) < int(settings.HTTP_HEADER_INJECTION_LEVEL) and settings.LOAD_SESSION != True:
while True:
message = "Do you want to increase to '--level=" + str(scan_level + 1)
message += "' in order to perform more tests? [Y/n] > "
next_level = common.read_input(message, default="Y", check_batch=True)
if next_level in settings.CHOICE_YES:
menu.options.level = int(menu.options.level + scan_level)
if perform_checks(url, http_request_method, filename) == False and scan_level < settings.HTTP_HEADER_INJECTION_LEVEL :
scan_level = scan_level + 1
else:
break
elif next_level in settings.CHOICE_NO:
break
elif next_level in settings.CHOICE_QUIT:
raise SystemExit()
else:
common.invalid_option(next_level)
pass
else:
perform_checks(url, http_request_method, filename)
perform_checks(url, http_request_method, filename)

# All injection techniques seems to be failed!
if not settings.INJECTION_CHECKER:
Expand Down
2 changes: 1 addition & 1 deletion src/utils/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def sys_argv_errors():
DESCRIPTION = "The command injection exploiter"
AUTHOR = "Anastasios Stasinopoulos"
VERSION_NUM = "4.0"
REVISION = "44"
REVISION = "45"
STABLE_RELEASE = False
VERSION = "v"
if STABLE_RELEASE:
Expand Down

0 comments on commit d81bcfe

Please sign in to comment.