Simple Port Scanner in Python

In this very short article I’ll present a simple port scanner written in Python.

If you’re looking for a production ready, kick-ass port scanner, I highly recommend nmap.

For those unfamiliar with port scans;

When performing a port scan, you are in reality probing a server or a host for open ports.
Said in other words, a port scan determines which ports on a given server or host are open, and which ones are closed.
An analogy to the real world can be seen as knocking on doors, and determining which are open.

I promised that this article would be short, so let’s jump straight to the port scanner. The comments explains the flow of the script.

That’s it.
Simply run the script by typing python portscanner.py in your terminal.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *