UT: Use keyword arguments when using configurations

This commit is contained in:
Shreya Malviya 2022-08-30 12:19:59 +05:30
parent 2b11fde827
commit 45c6fda8b2
2 changed files with 11 additions and 11 deletions

View File

@ -39,10 +39,10 @@ def scan_config(default_agent_configuration):
PluginConfiguration(name="SSHFinger", options={}),
]
scan_config = NetworkScanConfiguration(
tcp_config,
icmp_config,
fingerprinter_config,
default_agent_configuration.propagation.network_scan.targets,
tcp=tcp_config,
icmp=icmp_config,
fingerprinters=fingerprinter_config,
targets=default_agent_configuration.propagation.network_scan.targets,
)
return scan_config

View File

@ -145,15 +145,15 @@ def get_propagation_config(
default_agent_configuration, scan_target_config: ScanTargetConfiguration
):
network_scan = NetworkScanConfiguration(
default_agent_configuration.propagation.network_scan.tcp,
default_agent_configuration.propagation.network_scan.icmp,
default_agent_configuration.propagation.network_scan.fingerprinters,
scan_target_config,
tcp=default_agent_configuration.propagation.network_scan.tcp,
icmp=default_agent_configuration.propagation.network_scan.icmp,
fingerprinters=default_agent_configuration.propagation.network_scan.fingerprinters,
targets=scan_target_config,
)
propagation_config = PropagationConfiguration(
default_agent_configuration.propagation.maximum_depth,
network_scan,
default_agent_configuration.propagation.exploitation,
maximum_depth=default_agent_configuration.propagation.maximum_depth,
network_scan=network_scan,
exploitation=default_agent_configuration.propagation.exploitation,
)
return propagation_config