{
  "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/nc.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "host",
        "label": "Host",
        "type": "string",
        "position": 0,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "ports",
        "label": "Port or port range",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "udp",
        "label": "Use UDP",
        "type": "boolean",
        "option": [
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "scan",
        "label": "Scan only (send no data)",
        "type": "boolean",
        "option": [
          "-z"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_dns",
        "label": "No DNS lookups",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "-v"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "timeout",
        "label": "Idle timeout (seconds)",
        "type": "integer",
        "option": [
          "-w"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "source_ip",
        "label": "Source IP address",
        "type": "string",
        "option": [
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "source_port",
        "label": "Source port",
        "type": "integer",
        "option": [
          "-p"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "port-scan",
        "label": "Scan ports",
        "set": {
          "scan": [
            true
          ],
          "verbose": [
            true
          ]
        },
        "fields": [
          "host",
          "ports",
          "scan",
          "verbose",
          "timeout",
          "udp"
        ],
        "required": [
          "host",
          "ports"
        ]
      },
      {
        "id": "connect",
        "label": "Connect to host",
        "fields": [
          "host",
          "ports",
          "udp",
          "timeout"
        ],
        "required": [
          "host",
          "ports"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "host",
          "ports",
          "udp",
          "scan",
          "verbose",
          "timeout"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_dns",
          "source_ip",
          "source_port"
        ]
      }
    ]
  }
}
