The Python Port Scanner is a command-line tool written in Python that allows users to scan for open ports on a target host. It provides two options for scanning:
- Scan the first 1000 ports: This option scans the most commonly used ports to quickly identify any open ports and associated services.
- Scan all ports: This option scans all 65,535 ports to perform a comprehensive scan and identify any open ports.
The port scanner utilizes the python-nmap
module to perform the scanning functionality.
- Scans for open ports on a target host.
- Provides options to scan the first 1000 ports or all ports.
- Utilizes the
python-nmap
module for efficient scanning.
- Python 3.x
python-nmap
module
-
Clone this repository or download the source code files.
-
Open a terminal or command prompt and navigate to the directory where the Port Scanner files are located.
-
Install the
python-nmap
module by running the following command:pip install python-nmap
-
Run the Port Scanner with the following command:
python port_scanner.py [target_host]
Replace
[target_host]
with the IP address or hostname of the target host you want to scan.Example:
python port_scanner.py 192.168.0.1
-
Follow the displayed instructions to either scan furst 1000 ports or all 65535 ports
-
The Port Scanner will start scanning the specified target host based on the chosen option.
-
Once the scan is complete, the tool will display the results, showing which ports are open.
Note: Please ensure that you have proper authorization before scanning any hosts. Unauthorized port scanning can be a violation of network security policies or even illegal in certain cases.
This project is licensed under the MIT License.
The Python Port Scanner is provided as-is without any guarantee or warranty. Use it responsibly and at your own risk. The developers are not responsible for any misuse or damage caused by the tool.