Skip to content

Instantly share code, notes, and snippets.

@vhbui02
Created May 1, 2023 08:21
Show Gist options
  • Save vhbui02/320b5f731ddbb2bb03f3e09cfd73633b to your computer and use it in GitHub Desktop.
Save vhbui02/320b5f731ddbb2bb03f3e09cfd73633b to your computer and use it in GitHub Desktop.
[nc command] another networking tool that i've never remembered anything :v #linux

Options

-l: listen for incoming connections

-p: specify the local port to use for the connection

-v: enables verbose output, which can be helpful when debugging

-n: disables DNS resolution, which can speed up connections.

-z: scan for open ports, without actually estavlishing a connection.

-u: enables UDP connections instead of TCP.

Best practices when using Netcat

  • Verify the identity of the remote host before connecting to it (check the host name, ip address, is it the correct machine?)

  • Be careful when using Netcat to scan for open ports, it can trigger security alerts.

  • When transferring files, make sure to use encrypting to protect the data in transit. Netcat doesn't provide encryption by default so you many need to use additional tools like SSH or SSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment