Nmap
9 min
this connector performs network scans and gather information about hosts on a network capabilities actions allow to pass arguments to nmap the following table lists the available arguments and their description note that arguments are case sensitive and it is allowed to combine multiple arguments in a single action nmap arguments scan type this argument specifies the type of scan to be performed nmap offers various types of scans such as tcp, udp, syn, fin, xmas, null, and others for example, ss will perform a syn scan service and version detection this argument attempts to detect the type of service running on a given port and the version of the service for example, sv will attempt to identify the service and version running on open ports operating system detection this argument attempts to identify the operating system running on the scanned hosts for example, o will attempt to identify the operating system timing and performance this argument allows users to adjust the timing and performance of the scan for example, nmap t4 will set the timing template to aggressive scan firewall/ids evasion and spoofing this argument allows users to bypass firewall and ids detection mechanisms by spoofing packets for example, s spoofed ip will send packets with a spoofed ip address scripting this argument allows users to use custom scripts to automate the scanning process or perform advanced tasks for example, script smb os discovery nse will use the smb os discovery script aggressive scanning this argument enables aggressive scanning, which can speed up the scanning process and detect more hosts and services for example, a will enable aggressive scanning ping options this argument allows users to configure the ping options used by nmap for example, pn will disable ping scanning, while pe will use icmp echo requests for ping scanning timing template this argument allows users to set the timing template used by nmap for scanning for example, t4 will set the timing template to aggressive scan traceroute this argument performs a traceroute to the scanned hosts for example, traceroute will perform a traceroute ipv6 scanning this argument enables ipv6 scanning for example, 6 will enable ipv6 scanning dns resolution this argument performs dns resolution of hostnames to ip addresses for example, r will perform dns resolution firewall detection this argument detects whether a firewall is present and active on the scanned hosts for example, sa will perform an ack scan to detect firewalls os detection this argument attempts to detect the operating system running on the scanned hosts for example, o will attempt to identify the operating system scripting engine this argument allows users to run scripts to automate or customize the scanning process for example, script=default will run the default nmap scripts exclude hosts this argument excludes specified hosts from the scan for example, exclude 192 168 1 10 will exclude the host with ip address 192 168 1 10 from the scan actions check network status check the status of hosts endpoint method get input argument name type required description args string optional arguments to pass to nmap defaults to ' n sp pe pa21,23,80,3389' host string required host to scan timeout number optional timeout in seconds defaults to 0 (infinite) raw data boolean optional return raw data output parameter type description info array output field info ip string output field ip hostname string name of the resource status string status value mac string output field mac raw data string response data example \[ { "info" \[ {} ], "raw data" "b'\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\\\n\<!doctype nmaprun>\\\n\<?xml stylesheet h " } ] scan ports scan port status endpoint method get input argument name type required description host string required host(s) to scan examples 'scanme nmap org' or '198 116 0 255 1 127' or '216 163 128 20/20' ports string optional port(s) to scan examples '22,53,110,143 4564' default is all ports args string optional additional arguments to pass to nmap examples ' su sx sc' defaults to ' sv' sudo boolean optional run nmap with sudo timeout number optional timeout in seconds defaults to 0 which is infinite raw data boolean optional return raw data from nmap defaults to false output parameter type description hosts array output field hosts info array output field info ip string output field ip host info object output field host info command line run string output field command line run scan info object output field scan info tcp object output field tcp method string http method to use services string output field services scan stats object output field scan stats timestr string output field timestr elapsed string output field elapsed uphosts string output field uphosts downhosts string output field downhosts totalhosts string output field totalhosts host object output field host hostname string name of the resource status string status value addresses object output field addresses ipv4 string output field ipv4 ipv6 string output field ipv6 mac string output field mac vendor object output field vendor open ports array output field open ports protocol string output field protocol example \[ { "hosts" \[ "172 67 74 8" ], "info" \[ {} ], "raw data" "b'\<?xml version=\\"1 0\\" encoding=\\"utf 8\\"?>\\\n\<!doctype nmaprun>\\\n\<?xml stylesheet h " } ]