Netcat command inputs
Pick one scenario, then edit host, port, shell, and implementation.
Choose the shell you will paste into; quoting, executable prefix, and continuation syntax follow this target.
Select OpenBSD nc, traditional netcat, Nmap ncat, or BusyBox nc.
Connect uses a remote host and port; Listen uses a local bind port.
Use a DNS name, IPv4/IPv6 address, or internal host you may test.
Enter one destination port, 1-65535, such as 80, 443, or 5432.
Enter the first port in the scan range, 1-65535.
Enter the last port in the scan range, 1-65535.
Choose an unused local listener port, for example 9000.
Turn on for datagrams such as DNS, syslog, or UDP reachability checks.
{{ udp ? 'On' : 'Off' }}
Short flags maximize compatibility; long flags are mainly for ncat.
Applies only to short flags; disabled automatically for long-flag output.
{{ combine_short_flags ? 'On' : 'Off' }}
Use for long POSIX, Bash/Zsh, fish, or PowerShell commands; CMD and Nushell stay single line.
{{ multiline && supportsMultilineShell ? 'On' : 'Off' }}
Example: sudo -E ncat or /usr/local/bin/nc.
Use 127.0.0.1 for local-only, 0.0.0.0 for all IPv4 interfaces.
Adds an IPv6 flag when supported; keep off for ordinary IPv4 targets.
{{ ipv6 ? 'On' : 'Off' }}
Useful for listeners that should accept repeated test clients.
{{ keep_open ? 'On' : 'Off' }}
Adds status output for troubleshooting connection and scan attempts.
{{ verbose ? 'On' : 'Off' }}
Use for reachability checks where no stdin payload should be sent.
{{ zero_io ? 'On' : 'Off' }}
Use with literal IPs when reverse DNS lookups would slow testing.
{{ numeric_only ? 'On' : 'Off' }}
Enter seconds; 0 omits a timeout and leaves implementation defaults.
sec
Enter seconds after stdin closes; 0 omits the close-delay flag.
sec
Bind outbound sockets to this local IP; leave blank for OS routing.
Use 0 for an ephemeral OS-chosen source port.
Leave disabled unless you intentionally need netcat exec behavior.
Example: /bin/sh, /usr/bin/env bash, or cmd.exe.
Turn on for HTTPS-style probes or TLS listeners; warnings show unsupported flags.
{{ use_tls ? 'On' : 'Off' }}
Requires ncat TLS support and trusted CA configuration.
{{ tls_verify ? 'On' : 'Off' }}
Path to a client certificate, for example ./client.crt.
Path to the matching private key, for example ./client.key.
Use decimal seconds; 0 sends without a generated delay flag.
sec
Ncat only; 0 leaves idle timeout unset.
sec
Ncat listener only; 0 leaves the connection count unlimited.
Proxy routing applies to outbound connect mode when supported.
Enter a proxy DNS name or IP when proxy type is not No proxy.
Use the listening port for the selected proxy, such as 8080 or 1080.
Format as user:password; it will be visible in the generated command.
Path for supported output logging, such as ~/captures/session.log.
Ncat only; pair with flows that should not transmit data.
{{ recv_only ? 'On' : 'Off' }}
Ncat only; use when stdin should be sent without reading replies.
{{ send_only ? 'On' : 'Off' }}
OpenBSD nc only; sends TCP shutdown when local input ends.
{{ shutdown_on_eof ? 'On' : 'Off' }}
Append only flags you have verified for the selected netcat variant.

                
Field Value Copy
{{ row.label }} {{ row.value }}

                
Customize
Advanced
:

Introduction:

Netcat is useful when the question is about a socket rather than a full application workflow. It opens a TCP or UDP connection, listens for one, or checks whether a small range of ports accepts connections, then leaves the bytes visible to the terminal or the process connected to it. That makes it a common tool for banner checks, lab listeners, proxy-path tests, simple payload probes, and controlled file-transfer experiments.

The same short command can mean very different things depending on its role. A client command reaches outward to a host and port. A listener binds a local port and waits for a peer. A zero-I/O scan tries to establish a connection without sending an application payload. Those roles carry different risk: a client usually tests reachability, a listener can expose a local service, and a scan can cross an authorization boundary if the target range is not approved.

Connect
Open an outbound session to a host and port, often to check banners, send a simple protocol request, or test reachability.
Listen
Bind a local port and wait for a peer, useful for lab callbacks, packet capture, local service testing, or controlled file transfer.
Scan
Try one port or a small port range and report which TCP services accept a connection. UDP scans need extra caution because silence does not prove a port is closed.

Portability is the main source of mistakes. Many systems provide an nc command, but OpenBSD nc, traditional netcat, Nmap ncat, and BusyBox nc do not expose the same flags. A line that works on a Linux server may fail on macOS, a router shell, a container image, or Windows. The command name, proxy syntax, TLS support, execution flags, timeout behavior, and source-address options all depend on the actual binary installed on the machine where the command will run.

Shell quoting matters almost as much as the netcat flags. Hostnames are usually simple, but paths, proxy credentials, certificate files, payload commands, and shell snippets can contain spaces, quotes, dollar signs, backslashes, or characters that a shell treats specially. A command prepared for Bash may not be safe to paste into PowerShell or Windows CMD without different quoting.

Netcat commands deserve the same review as firewall rules or temporary access changes. A listener can expose a port, an execution flag can run a program for a remote peer, proxy credentials can appear in command history, and a scan can violate network policy if the destination is not approved. A generated command is a draft for an authorized test, not evidence that the test is allowed or safe in every environment.

How to Use This Tool:

Start from the job you are allowed to run, then make the generated line match the shell and netcat variant that will execute it.

  1. Choose a Preset close to the task, such as TCP client probe, TCP listener, port scan sweep, TLS client, proxy tunnel client, DNS query over UDP, syslog listener, SMTP STARTTLS client, or Custom. The summary should immediately switch to the chosen mode, protocol, host, and port shape.
  2. Set Shell before copying anything. Bash/Zsh, POSIX sh, fish, Nushell, PowerShell, and Windows CMD use different quoting and line continuation rules, and CMD and Nushell stay single-line in this generator.
  3. Set Implementation to the binary you expect on the target machine. The Command Details table will show the selected implementation, emitted binary, flag style, layout, and the final flag list.
  4. Pick Connection type. Connect to remote needs a target host and target port, Listen needs a listen port and optional bind address, and Port scan needs a start and end port from 1 to 65535.
  5. Set transport and timing options that change network behavior: Use UDP, Force IPv6, Verbose output, Zero I/O probe, Numeric only, Timeout, Quit after EOF, Source address, and Source port.
  6. Open Advanced only for features that are intentionally part of the test: command execution, TLS/SSL, certificate verification, proxy routing, send delay, idle timeout, connection limits, logging, receive-only or send-only behavior, shutdown-after-EOF, a custom binary prefix, or extra flags.
  7. Fix Errors before using the output, then read Warnings. A warning means a requested behavior was skipped, narrowed, or left for manual review because the selected variant does not model that feature.

Interpreting Results:

Use the Command tab as the copyable artifact, but review Command Details before pasting it into a terminal. The details table is often easier to audit because it separates shell, layout, implementation, binary, mode, protocol, target, listener, source override, timeout, TLS, proxy, logging, data direction, flags, and extra args.

A clean result means the current inputs passed the generator's checks. It does not prove that the host is reachable, the local binary supports every option exactly as modeled, the proxy accepts credentials, the certificate chain validates, or a UDP target will reply. Test in the same network and shell where the command is meant to run.

  • Stop on Errors. Missing hosts, invalid ports, negative timing values, missing proxy settings, conflicting one-way modes, or blank execution commands block a usable command.
  • Treat Warnings as behavior changes. Unsupported TLS, proxy, execution, logging, receive-only, send-only, IPv6, keep-open, or shutdown flags can make the generated line less capable than the options you selected.
  • Check Extra args manually. They are appended as written so advanced variant-specific switches remain possible, but portability and shell safety are your responsibility.
  • Use the JSON output when a runbook, ticket, or review note needs the entered values, generated command, metrics, warnings, and errors in one structured record.

Technical Details:

A netcat command is a socket instruction expressed as command-line tokens. The core decision is the socket role: outbound client, inbound listener, or zero-I/O scanner. Transport, address family, timing, source binding, TLS, proxying, logging, and execution flags modify that role, but they do not replace it.

TCP checks usually provide clearer success or failure feedback because connection setup itself is stateful. UDP sends datagrams without the same handshake, so a quiet target may be filtered, closed, silently accepting packets, or simply not programmed to answer. That is why UDP reachability often needs packet capture, service logs, or a protocol-specific reply in addition to a command exit status.

Variant selection changes both syntax and meaning. Nmap ncat exposes long options for TLS, proxy authentication, idle timeout, connection limits, and one-way data modes. OpenBSD nc is common and scriptable, but different releases expose different TLS and proxy behavior. Traditional netcat and BusyBox nc are useful on older or minimal systems, with smaller flag surfaces and more local variation.

Transformation Core:

How a netcat command is assembled from role, flags, target, and shell rendering
Stage Command rule Review cue
Role Client mode emits a remote host and port, listener mode emits listen flags and a bind port, and scan mode emits a host plus one port or a port range. Verify the direction first. A listener opens local exposure; a client or scan reaches outward.
Transport TCP is the default. UDP and IPv6 add flags only when the selected variant profile supports a matching switch. A UDP command may need packet capture or service logs to prove what happened.
Timing and source controls Timeout, quit-after-EOF delay, send delay, idle timeout, source address, and source port are added before the destination tokens. Keep seconds and port values numeric, and remember that source ports can require privileges or be unavailable.
High-impact features Execution, TLS, proxy, logging, one-way data flow, connection limits, and shutdown-on-EOF are filtered against variant capabilities. Warnings indicate that at least one selected behavior was not emitted as requested.
Shell rendering Arguments are quoted for the selected shell, and supported shells may render long commands across multiple lines. Recheck paths, credentials, and embedded commands after switching shells.

Variant Capability Map:

Modeled netcat and ncat variant capabilities
Variant Strong fit in this generator Caution
ncat TLS clients and listeners, proxy routing with credentials, long-form flags, idle timeout, connection limits, output logging, and receive-only or send-only sessions. Its feature set is broader than classic netcat, so a command may not transfer cleanly to nc on another host.
OpenBSD nc Classic client, listener, zero-I/O scan, UDP, IPv6, proxy routing, source binding, keep-open listeners, quit-after-EOF, and shutdown-after-EOF flows. Current OpenBSD manuals document TLS options, while this generator's OpenBSD profile stays conservative. Compare with the local manual when TLS is required.
Traditional netcat Older short-flag connect, listen, scan, timeout, numeric-only, source port, and program-execution patterns. TLS, proxy authentication, idle timeout, and one-way direction flags are not emitted for this profile.
BusyBox nc Minimal-system connect, listen, UDP, verbose, timeout, delay, source address, source port, execution, and zero-I/O scan patterns. BusyBox applets are often built for small systems. The target device's own help text remains the authority.

Validation Boundaries:

Validation boundaries for generated netcat commands
Condition Result Reason
Blank target host in connect or scan mode Blocking error The command cannot infer which host should receive the connection or probe.
Target, listen, proxy, start, or end port outside 1 to 65535 Blocking error TCP and UDP ports are 16-bit endpoint numbers in this range.
Scan end port below start port Blocking error A port range must move forward or collapse to a single port.
Negative timeout, quit delay, send delay, idle timeout, source port, or connection count Blocking error Timing, count, and source-port controls are numeric parameters, not arbitrary text.
Receive-only and send-only both enabled Blocking error A single one-way data mode cannot be both directions at once.
Unsupported feature for the selected variant Warning and skipped flag The command remains copyable, but the output no longer includes every requested behavior.
Additional extra flags Appended as written This preserves advanced options, but manual variant and shell review is required.

Responsible Use Notes:

Netcat is a legitimate administration and troubleshooting utility, but it can also expose services, move data, scan hosts, route through proxies, and attach programs to sockets. Use it only on systems and networks where you have authorization.

  • Prefer narrow tests. Keep scan ranges small, set timeouts deliberately, and avoid broad target lists unless an approved procedure says otherwise.
  • Bind listeners carefully. 127.0.0.1 limits a listener to the local host, while 0.0.0.0 exposes it on all IPv4 interfaces that firewall policy allows.
  • Protect secrets. Proxy credentials, certificate paths, and execution strings can appear in the generated command, JSON output, screenshots, shell history, and exported notes.
  • Execution modes deserve extra review. A command that runs a program after a connection opens can become a remote shell or data bridge if used carelessly.
  • The page prepares command text and review output. It does not run netcat, open a socket, scan a host, authenticate to a proxy, or verify the installed binary.

Worked Examples:

TLS client through an HTTP CONNECT proxy

Choose Proxy tunnel client, keep Implementation on ncat, set the target to an approved internal host on port 443, and enter Proxy host and Proxy port. Command Details should show TLS enabled, Proxy set to HTTP CONNECT, and Protocol set to TCP. If Proxy auth is filled, the command will include those credentials.

Small TCP scan with a clear boundary

Use Port scan sweep for a narrow range such as start port 20 and end port 25. Command Details should show Mode as port scan, Target as the host plus 20-25, and Flags including zero-I/O scan behavior when the selected variant supports it. If the end port is changed to 19, the Errors list blocks the command because the end port is below the start port.

UDP listener for local syslog capture

Choose Syslog listener (UDP 514) only when the bind is approved for the test host. Command Details should show Listener on port 514, Protocol as UDP, and logging if a file path is present. Running a privileged low port may require elevated permissions, so the generated command still needs a terminal-side permission check.

Execution setting that should not pass silently

If Execution mode is set to Execute through shell and Command to run is blank, Errors asks for a command or for execution to be disabled. That is the safer result: the output should not hide an incomplete or accidental listener-execution setup behind a copyable command.

FAQ:

Why does changing the implementation change the command?

Each variant accepts a different flag set. Switching between ncat, OpenBSD nc, traditional netcat, and BusyBox nc can add, remove, or rename flags for TLS, proxy routing, execution, logging, timeouts, and one-way data flow.

Why is a TLS, proxy, or logging option missing from the output?

The selected variant profile probably does not support that feature in this generator. Read Warnings, switch to ncat when the feature is required, or compare the command with the exact local help output.

Can the generated command prove a UDP service is open?

Not by itself. UDP has no connection handshake, so a quiet result may mean filtered traffic, no reply, a closed port, or an application that accepts datagrams silently. Pair UDP checks with logs, packet capture, or a protocol-specific response.

What should I do when a port error appears?

Keep target, listen, proxy, start, and end ports within 1 to 65535. In scan mode, make sure the end port is greater than or equal to the start port.

Are extra flags checked for every netcat variant?

No. Extra flags are appended exactly as typed so advanced users can add variant-specific options. Review them against the local manual and the selected shell before copying.

Does this page contact the target host?

No. It builds command text and review output in the browser. Network traffic happens only if you copy the generated command into a terminal and run it.

Glossary:

Client mode
An outbound netcat session that connects to a remote host and port.
Listener
A netcat process that binds a local port and waits for an inbound peer.
Zero-I/O scan
A reachability check that attempts a connection without sending application payload data.
Bind address
The local address a listener or outbound socket uses, such as 127.0.0.1 or 0.0.0.0.
Proxy routing
Sending an outbound connection through an HTTP CONNECT, SOCKS4, or SOCKS5 proxy before reaching the target.
One-way data flow
A session mode intended to only receive bytes or only send bytes instead of staying full duplex.
STARTTLS
A protocol upgrade that begins in plaintext and then negotiates TLS after a service-specific command.

References: