CoolFace
Apppublic

banumath/networksecurityscanner

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
App README

๐Ÿ” 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

LayerTechnology
BackendPython 3, Flask
FrontendHTML, CSS, JavaScript
ScanningPython socket module
UI StyleVanilla CSS (dark theme)

โšก Getting Started

1. Clone the repository

bash
git clone https://github.com/Banumathkovinda/Network-Security-Scanner.git
cd Network-Security-Scanner

2. Install dependencies

bash
pip install -r requirements.txt

3. Run the app

bash
python simple_scanner.py

4. Open in browser

http://127.0.0.1:8080

๐Ÿ“ก API Endpoints

MethodEndpointDescription
POST/api/scan/networkDiscover live hosts in a network range
POST/api/scan/hostFull port scan on a specific host
POST/api/scan/quickQuick scan of common ports
POST/api/vulnerability/checkAnalyze open ports for vulnerabilities
GET/api/nmap/statusCheck if Nmap is installed
POST/api/scan/nmapPort scan using Nmap (-sV)
POST/api/cve/lookupCVE search by product + version (NIST NVD)
POST/api/cve/lookup-scanCVE lookup from port scan results
GET/POST/DELETE/api/schedulesScheduled scans + email alerts

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

  1. 1.Copy .env.example to .env
  2. 2.Set SMTP_HOST, SMTP_USER, SMTP_PASSWORD, ALERT_EMAIL_TO
  3. 3.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

bash
cp .env.example .env   # optional
docker compose up --build

Open http://localhost:8080

Login / API key (public deploy)

Set in .env:

  • โ€”SCANNER_PASSWORD โ€” web login
  • โ€”SCANNER_API_KEY โ€” login or X-API-Key header on API calls
  • โ€”SECRET_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

๐Ÿ‘ฉโ€๐Ÿ’ป Author

Banumathkovinda GitHub ยท LinkedIn