diff --git a/nettacker/core/lib/http.py b/nettacker/core/lib/http.py index 776266036..4b9959f55 100644 --- a/nettacker/core/lib/http.py +++ b/nettacker/core/lib/http.py @@ -8,6 +8,7 @@ import aiohttp import uvloop +from yarl import URL from nettacker.core.lib.base import BaseEngine from nettacker.core.utils.common import ( @@ -34,6 +35,8 @@ async def perform_request_action(action, request_options): async def send_request(request_options, method): + if request_options.pop("url_raw", False): + request_options["url"] = URL(request_options["url"], encoded=True) async with aiohttp.ClientSession() as session: action = getattr(session, method, None) response = await asyncio.gather( diff --git a/nettacker/modules/vuln/apache_cve_2021_41773.yaml b/nettacker/modules/vuln/apache_cve_2021_41773.yaml index 185d4505c..b8034c2a6 100644 --- a/nettacker/modules/vuln/apache_cve_2021_41773.yaml +++ b/nettacker/modules/vuln/apache_cve_2021_41773.yaml @@ -24,6 +24,7 @@ payloads: headers: User-Agent: "{user_agent}" ssl: false + url_raw: true url: nettacker_fuzzer: input_format: "{{schema}}://{target}:{{ports}}/{{path}}" diff --git a/tests/test_yaml_schema_and_regex.py b/tests/test_yaml_schema_and_regex.py index d1b45cd8f..ab6b0ae36 100644 --- a/tests/test_yaml_schema_and_regex.py +++ b/tests/test_yaml_schema_and_regex.py @@ -69,6 +69,7 @@ def is_valid_regex(regex: str) -> bool: Optional("timeout"): int, Optional("allow_redirects"): bool, Optional("ssl"): bool, + Optional("url_raw"): bool, Optional("data"): object, Optional("json"): object, Optional("ports"): object,