A lightweight Python-based port scanner that uses the nmap
module to scan a target's open ports (1β1024 by default). Features a clean terminal loader animation and logs scan results to a report file.
- π Scans TCP ports (1β1024) using
nmap
- π― Accepts IP address or domain as input
- β³ Real-time loading animation during scan
- π Auto-saves scan reports in the
scan_reports/
folder - π‘ Simple, terminal-friendly, and beginner-safe
- Python 3.x
python-nmap
packagenmap
must be installed on your system
-
Clone the Repository
git clone https://github.com/your-username/port-scanner.git cd port-scanner
-
Install Python Requirements
pip install python-nmap
-
Install Nmap Tool (if not already installed)
- For Linux (Debian/Kali):
sudo apt install nmap
- For Windows:
Download from official site and addnmap
to system PATH.
- For Linux (Debian/Kali):
python3 port_scanner.py
Then enter your target IP or domain when prompted:
Enter your target (Domain or IP) >> scanme.nmap.org
- The tool creates a folder
scan_reports/
(you can create it manually if not present). - Each scan creates or updates a file named like
scanme_nmap_org.txt
.
Example content:
Host : scanme.nmap.org ()
port : 22 state : open
port : 80 state : open
2025-07-10 10:32:19.150041 scanned using namap module
This tool is for educational and authorized testing only.
Never scan a system you don't have permission to test.
Developed with β€ by Amal
Python + Nmap = Fast & Friendly Scanning π