Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
stasinopoulos committed Apr 11, 2024
1 parent f804e0d commit f81bd71
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/core/injections/controller/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,9 @@ def check_skipped_params(check_parameters, http_request_method):
Print the non-listed parameters.
"""
def testable_parameters(check_parameters, http_request_method, header_name):
if len([i for i in settings.TEST_PARAMETER if i in settings.HTTP_HEADERS]) != 0 :
menu.options.level = int(settings.HTTP_HEADER_INJECTION_LEVEL)

_ = False
if len([i for i in settings.TEST_PARAMETER if i in check_parameters]) == 0:
_ = True
Expand Down
9 changes: 5 additions & 4 deletions src/core/injections/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def command_injection_heuristic_basic(url, http_request_method, check_parameter,
_ = 0
for payload in basic_payloads:
_ = _ + 1
if not inject_http_headers or (inject_http_headers and "'Host'" in check_parameter):

if not inject_http_headers or (inject_http_headers and settings.HOST.capitalize() in check_parameter):
if not any((settings.IS_JSON, settings.IS_XML)) or settings.COOKIE_INJECTION:
payload = _urllib.parse.quote(payload)
payload = parameters.prefixes(payload, prefix="")
Expand Down Expand Up @@ -146,7 +147,7 @@ def code_injections_heuristic_basic(url, http_request_method, check_parameter, t
try:
if (not settings.IDENTIFIED_WARNINGS and not settings.IDENTIFIED_PHPINFO) or settings.MULTI_TARGETS:
for payload in settings.PHPINFO_CHECK_PAYLOADS:
if not inject_http_headers or (inject_http_headers and "'Host'" in check_parameter):
if not inject_http_headers or (inject_http_headers and settings.HOST.capitalize() in check_parameter):
if not any((settings.IS_JSON, settings.IS_XML)) or settings.COOKIE_INJECTION:
payload = _urllib.parse.quote(payload)
payload = parameters.prefixes(payload, prefix="")
Expand Down Expand Up @@ -402,7 +403,7 @@ def referer_injection(url, http_request_method, filename, timesec):
referer = menu.options.referer
if not menu.options.shellshock:
if menu.options.referer is None:
menu.options.referer = ""
menu.options.referer = _urllib.parse.urljoin(url, _urllib.parse.urlparse(url).path)
menu.options.referer = menu.options.referer + settings.INJECT_TAG
settings.REFERER_INJECTION = True
if settings.REFERER_INJECTION:
Expand All @@ -416,7 +417,7 @@ def referer_injection(url, http_request_method, filename, timesec):
def host_injection(url, http_request_method, filename, timesec):
host = menu.options.host
if menu.options.host is None:
menu.options.host = ""
menu.options.host = _urllib.parse.urlparse(url).netloc
menu.options.host = menu.options.host + settings.INJECT_TAG
settings.HOST_INJECTION = True
if settings.HOST_INJECTION:
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 = "26"
REVISION = "27"
STABLE_RELEASE = False
VERSION = "v"
if STABLE_RELEASE:
Expand Down

0 comments on commit f81bd71

Please sign in to comment.