id = "nc" name = "nc" description = "Netcat: arbitrary TCP and UDP connections and listeners." executables = ["nc"] [commands] format = 1 label = "Connect or scan" description = "Open a TCP or UDP connection to a host and port, or scan ports without sending data. Listening mode, proxies and Apple-specific socket options are left out." quality = "ai-draft" base = "fig:nc" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/nc.ts" license = "MIT" [[commands.field]] id = "host" label = "Host" type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "ports" label = "Port or port range" type = "string" position = 1 multiple = true sources = ["fig"] [[commands.field]] id = "udp" label = "Use UDP" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.field]] id = "scan" label = "Scan only (send no data)" type = "boolean" option = ["-z"] sources = ["fig"] [[commands.field]] id = "no_dns" label = "No DNS lookups" type = "boolean" option = ["-n"] sources = ["fig"] [[commands.field]] id = "verbose" label = "Verbose" type = "boolean" option = ["-v"] sources = ["fig"] [[commands.field]] id = "timeout" label = "Idle timeout (seconds)" type = "integer" option = ["-w"] sources = ["fig"] [[commands.field]] id = "source_ip" label = "Source IP address" type = "string" option = ["-s"] sources = ["fig"] [[commands.field]] id = "source_port" label = "Source port" type = "integer" option = ["-p"] sources = ["fig"] [[commands.task]] id = "port-scan" label = "Scan ports" set = { scan = [true], verbose = [true] } fields = ["host", "ports", "scan", "verbose", "timeout", "udp"] required = ["host", "ports"] [[commands.task]] id = "connect" label = "Connect to host" fields = ["host", "ports", "udp", "timeout"] required = ["host", "ports"] [[commands.group]] id = "basic" label = "Basic" fields = ["host", "ports", "udp", "scan", "verbose", "timeout"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["no_dns", "source_ip", "source_port"]