A port scanner is designed to examine a server or host machine for open ports. It helps the attackers to identify the service running on the host machine and exploit the vulnerabilities, if there are any.
Simple port scanner
Getting ready
We can write a simple port scanner with Python using the socket module. The socket module is the default low-level networking interface in Python.
How to do it...
We can create a simple port scanner with the socket module, following are the steps:
- Create a new file called port-scanner.py and open it in your editor.
- Import the required...