Merge branch 'master' into dependabot/pip/paramiko-3.5.1

This commit is contained in:
Sam Stepanyan 2025-02-21 22:39:43 +00:00 committed by GitHub
commit b3fe262439
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 6 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.11.10-slim
FROM python:3.11.11-slim
RUN apt-get update && \
apt-get install -y gcc libssl-dev && \

View File

@ -126,6 +126,7 @@ class DefaultSettings(ConfigBase):
scan_ip_range = False
scan_subdomains = False
selected_modules = None
url_base_path = None
set_hardware_usage = "maximum" # low, normal, high, maximum
show_all_modules = False
show_all_profiles = False

View File

@ -105,10 +105,19 @@ class Nettacker(ArgParser):
Returns:
a generator
"""
targets = []
base_path = ""
for target in self.arguments.targets:
if "://" in target:
try:
if not target.split("://")[1].split("/")[1]:
base_path = ""
else:
base_path = "/".join(target.split("://")[1].split("/")[1:])
if base_path[-1] != "/":
base_path += "/"
except IndexError:
base_path = ""
# remove url proto; uri; port
target = target.split("://")[1].split("/")[0].split(":")[0]
targets.append(target)
@ -130,6 +139,7 @@ class Nettacker(ArgParser):
else:
targets.append(target)
self.arguments.targets = targets
self.arguments.url_base_path = base_path
# subdomain_scan
if self.arguments.scan_subdomains:
@ -172,7 +182,6 @@ class Nettacker(ArgParser):
self.arguments.selected_modules.remove("port_scan")
self.arguments.targets = self.filter_target_by_event(targets, scan_id, "port_scan")
self.arguments.skip_service_discovery = False
return list(set(self.arguments.targets))
def filter_target_by_event(self, targets, scan_id, module_name):
@ -252,7 +261,6 @@ class Nettacker(ArgParser):
options = copy.deepcopy(self.arguments)
socket.socket, socket.getaddrinfo = set_socks_proxy(options.socks_proxy)
module = Module(
module_name,
options,

View File

@ -21,7 +21,7 @@ payloads:
ssl: false
url:
nettacker_fuzzer:
input_format: "{{schema}}://{target}:{{ports}}/{{urls}}"
input_format: "{{schema}}://{target}:{{ports}}/{url_base_path}{{urls}}"
prefix: ""
suffix: ""
interceptors:

View File

@ -21,7 +21,7 @@ payloads:
ssl: false
url:
nettacker_fuzzer:
input_format: "{{schema}}://{target}:{{ports}}/{{urls}}/"
input_format: "{{schema}}://{target}:{{ports}}/{url_base_path}{{urls}}/"
prefix: ""
suffix: ""
interceptors: