NMAPDEV plugin work v0.6 #645 🆕🔎

This commit is contained in:
jokob-sk
2024-04-28 10:17:02 +10:00
parent 8647bf2699
commit ecf6c1848d
5 changed files with 13 additions and 14 deletions

View File

@@ -300,7 +300,7 @@
{
"function": "ARGS",
"type": "text",
"default_value": "sudo nmap -sn ",
"default_value": "sudo nmap -sn -PR -n ",
"options": [],
"localized": [
"name",
@@ -315,7 +315,7 @@
"description": [
{
"language_code": "en_us",
"string": "Arguments to run nmap-scan with. Recommended and tested only with the setting: <br/> <code>sudo nmap -sn </code>."
"string": "Arguments to run nmap-scan with. Recommended and tested only with the setting: <br/> <code>sudo nmap -sn </code>. <br/><br/> Note: The plugin attaches the interface and network mask, for example <code> -e eth1 192.168.1.0/24</code> and performs a separate scan for each interface specified in the <a onclick=\"toggleAllSettings()\" href=\"#SCAN_SUBNETS\"><code>SCAN_SUBNETS</code> setting</a>."
}
]
}

View File

@@ -83,9 +83,10 @@ def execute_scan (subnets_list, timeout):
devices_list = []
# scan each interface
for interface in subnets_list:
nmap_output = execute_scan_on_interface(interface, timeout)
mylog('verbose', [f'[{pluginName}] nmap_output: ', nmap_output])
if nmap_output is not None:
@@ -124,7 +125,7 @@ def execute_scan (subnets_list, timeout):
def execute_scan_on_interface (interface, timeout):
# Prepare command arguments
scan_args = get_setting_value('NMAPDEV_ARGS').split() + [interface.split()[0]]
scan_args = get_setting_value('NMAPDEV_ARGS').split() + interface.replace('--interface=','-e ').split()
mylog('verbose', [f'[{pluginName}] scan_args: ', scan_args])