![]() To scan for UDP ports simply add the -u option to the command as shown below: nc -z -v -u 10.10.8.8 20-80 The output will look something like this: SSH-2.0-OpenSSH_7.6p1 Ubuntu-4 For example, if you send an “EXIT” command to the server on the default SSH port 22 You can also use Netcat to find the server software and its version. If you want to print only the lines with the open ports, you can filter the results with the grepĬommand. Nc: connect to 10.10.8.8 port 79 (tcp) failed: Connection refusedĬonnection to 10.10.8.8 80 port succeeded! Nc: connect to 10.10.8.8 port 23 (tcp) failed: Connection refused Nc: connect to 10.10.8.8 port 21 (tcp) failed: Connection refusedĬonnection to 10.10.8.8 22 port succeeded! The output will look something like this: nc: connect to 10.10.8.8 port 20 (tcp) failed: Connection refused ![]() The -z option will tell nc to only scan for open ports, without sending any data to them and the -v option to provide more verbose information. You can scan a single port or a port range.įor example, to scan for open ports in the range 20-80 you would use the following command: nc -z -v 10.10.8.8 20-80 ![]() Scanning ports is one of the most common uses for Netcat.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |