banumath/networksecurityscanner
0
๐ Network Security Scanner
A lightweight, browser-based Network Security Scanner built with Python and Flask. Perform real-time port scanning, host discovery, service fingerprinting, and vulnerability checks โ all from a clean web UI.
๐ Features
- Network Discovery โ Ping sweep a CIDR range to find live hosts
- Port Scanner โ Scan custom or preset port ranges via TCP connection probing
- Quick Scan โ Instantly check the 17 most common ports
- Service Fingerprinting โ Detect service names and versions (HTTP, SSH, FTP, MySQL, SMTP, etc.)
- Vulnerability Check โ Flag insecure services (Telnet, plain FTP, unencrypted SSH)
- Confidence Scoring โ Each open port comes with a verification confidence score (0โ100%)
- No dependencies on nmap โ Pure Python socket-based scanning, no external tools required
๐ฅ๏ธ Tech Stack
โก Getting Started
1. Clone the repository
git clone https://github.com/Banumathkovinda/Network-Security-Scanner.git
cd Network-Security-Scanner2. Install dependencies
pip install -r requirements.txt3. Run the app
python simple_scanner.py4. Open in browser
http://127.0.0.1:8080๐ก API Endpoints
Advanced features
Nmap integration
Install Nmap and ensure nmap is on your PATH. Use Nmap Scan in the UI or pass "use_nmap": true in scan API requests.
CVE lookup
Uses the NIST NVD API 2.0. Optional: set NVD_API_KEY in .env for higher rate limits.
Scheduled scans + email
- Copy
.env.exampleto.env - Set
SMTP_HOST,SMTP_USER,SMTP_PASSWORD,ALERT_EMAIL_TO - Add schedules in the UI (Advanced โ Scheduled scans)
Scan history & compare
Scans save automatically under History. Compare shows added/removed/changed ports or hosts between two runs.
Network map
Run Network discovery, then open the Network map tab for a visual graph of live hosts.
Docker
cp .env.example .env # optional
docker compose up --buildOpen http://localhost:8080
Login / API key (public deploy)
Set in .env:
SCANNER_PASSWORDโ web loginSCANNER_API_KEYโ login orX-API-Keyheader on API callsSECRET_KEYโ session signing (use a long random string)
If neither password nor API key is set, the app runs in open local mode.
๐ก๏ธ Example Use Cases
- Audit your home or lab network for open/exposed services
- Check which ports are open on a local server before deployment
- Learn how TCP port scanning and service fingerprinting work under the hood
- Understand common network vulnerabilities like exposed Telnet or FTP
โ ๏ธ Disclaimer
This tool is intended for educational purposes and authorized network auditing only. Do not use it to scan networks or systems you do not own or have explicit permission to test. The author is not responsible for any misuse.
๐ Project Structure
network-security-scanner/
โโโ simple_scanner.py # Flask web server & API routes
โโโ scanner_lib.py # Core scanning & fingerprinting logic
โโโ nmap_scanner.py # Optional Nmap integration
โโโ cve_lookup.py # NVD CVE lookup
โโโ scheduler_service.py # Scheduled scans + SMTP alerts
โโโ index.html # Frontend UI
โโโ requirements.txt # Python dependencies
โโโ .env.example # SMTP / NVD config template
โโโ README.md