A Python-based tool that scans IP addresses or hostnames for open ports. This tool supports scanning multiple targets and resolves hostnames to IP addresses before performing the scan.
- Hostname resolution: Resolves hostnames to their corresponding IP addresses.
- Port scanning: Identifies open ports on a given IP address or hostname.
- Multiple target support: Scans one or more IPs/hostnames simultaneously.
- Asynchronous design: Efficient and fast scanning using Pythonβs
asyncio
.
python 3.x
termcolor
β For colored terminal output.
git clone https://github.com/AdrianTomin/port-scanner.git
cd port-scanner
python -m venv venv
source venv/bin/activate
On Windows: venv\Scripts\activate
The required libraries are listed in requirements.txt. You can install them using pip:
pip install -r requirements.txt
If you donβt have the requirements.txt file yet, you can generate it as follows:
pip freeze > requirements.txt
After installing the dependencies, you can run the tool by executing the following command:
python main.py
[*] Enter IP addresses or hostnames to scan (comma-separated): example.com
[*] Enter how many ports to scan: 100
[*] Starting scan for: 93.184.216.34 (example.com)
[+] Port Opened: 80
[*] Scanning complete. Exiting program.