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={}), PluginConfiguration(name="SSHFinger", options={}),
] ]
scan_config = NetworkScanConfiguration( scan_config = NetworkScanConfiguration(
tcp_config, tcp=tcp_config,
icmp_config, icmp=icmp_config,
fingerprinter_config, fingerprinters=fingerprinter_config,
default_agent_configuration.propagation.network_scan.targets, targets=default_agent_configuration.propagation.network_scan.targets,
) )
return scan_config return scan_config

View File

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