netcat
Usage⚑
Test TCP connections⚑
nc -v -z -w 3
Options: * -v
: verbose * -z
: just check if the port is open and exit (without sending any data) * -w 3
: 3 seconds timeout
If it exists with return code 0, it means that the connection succeeded.
Listen to a port⚑
netcat -l
Scan port range⚑
nc -zvnw 1 1-1000
-z
Port scanning mode.-v
Verbose.-n
Do not resolve the host name.-w 1
1s timeout.
(https://www.cyberciti.biz/faq/linux-port-scanning/)
Connect through TOR⚑
nc -v -X5 -x localhost:9050