Ncat

Terminal Guide & Documentation

Ncat Installation & Usage in Termux

Ncat is widely considered the 'Swiss Army Knife' of networking. It allows you to read, write, and redirect data across networks in Termux, making it an essential tool for debugging, testing, and transferring data.

Installation Commands

Ncat is part of the nmap package. Follow these steps to install it in Termux.

1. Update Packages

TERMINAL BASH
pkg update && pkg upgrade -y

2. Install Nmap

TERMINAL INSTALL
pkg install nmap -y

3. Verify Installation

TERMINAL VERIFY
ncat --version

Practical Usage Examples

Once installed, you can use Ncat for a variety of tasks.

Listening on a Port

Start a listening server on port 4444. Useful for receiving connections.

TERMINAL LISTEN
ncat -lvnp 4444

Connecting to a Port

Connect to a remote device listening on port 4444.

TERMINAL CONNECT
ncat <IP_ADDRESS> 4444

File Transfer

Send a file to a listening receiver:

TERMINAL SEND
ncat <IP_ADDRESS> 4444 < file.txt

Receive a file (acting as a listener):

TERMINAL RECEIVE
ncat -lvnp 4444 > received.txt

Basic Network Analysis

Check if a specific port is open on a target (e.g., port 80):

TERMINAL SCAN
ncat -zv <IP_ADDRESS> 80

Scan a range of ports (e.g., 20-100):

TERMINAL SCAN RANGE
ncat -zv <IP_ADDRESS> 20-100

Explore More Tools

Nmap

Powerful network discovery and security auditing.

WAFW00F

Identify Web Application Firewalls (WAF).

Cool Commands

Visual and fun terminal commands for Termux.