


🔍 Lyarinet Bash Script Network Scanner Result Viewer With Browser
This project provides a clean and responsive HTML interface to view network scan results exported as scan_results.json.
- 📊 Clean, modern table layout
- 📱 Responsive design with hover effects
- ⚡ Automatically loads JSON data via JavaScript
- netscan.sh – The scan Bash script
- index.html – The HTML page for viewing
- scan_results.json – The scan data generated by your Bash script
- scan_results.csv – The scan data generated by your Bash script
chmod +x netscan.sh
./netscan.sh
Follow the on-screen prompts:
- Choose Network Interface(s): Select one or more interfaces to scan. You can pick a specific interface by its number or choose all to scan across all detected interfaces.
[1] eth0
[2] wlan0
[3] all
Choose interface [1-2 or all]: all
- Choose Scan Type:
- 1) Standard (ping + nbstat): This is the default comprehensive scan, ideal for general network discovery.
- 2) UDP port scan (top 1000): Focuses on scanning common UDP ports on discovered hosts.
- 3) Listen for UDP multicast: Enters a sniffing mode to capture multicast traffic for a specified duration.
Choose scan type:
1) Standard (ping + nbstat)
2) UDP port scan (top 1000)
3) Listen for UDP multicast
Choice [1-3]: 1
Upon completion, standard and UDP scans will generate two files in the script's directory:
- scan_results.csv: A comma-separated values file, easily viewable in spreadsheets.
- scan_results.json: A JSON array of objects, suitable for programmatic parsing.
Multicast scans will generate multicast_<interface_name>.log files.
- Root Privileges: The script requires sudo because nmap, tcpdump, and smbclient often need elevated permissions for raw socket access and certain operations.
- DHCP Leases: The script attempts to find hostnames from /var/lib/dhcp/dhcpd.leases. This path is hardcoded and may vary on different Linux distributions. If hostnames aren't appearing, verify this path.
- Security: Be mindful when running network scanning tools. Ensure you have permission to scan the network you are targeting.
2. Generate your scan results:
Make sure your Bash scanner script outputs scan_results.json in the same folder as the HTML file.
Or with any modern browser: Chrome, Edge, Brave, etc.
4. Optional – Serve it locally:
Then open http://localhost:8000 in your browser.
- 🖼 Dark Mode: Ask to enable a dark theme
- 📦 Self-contained HTML: Embed JSON results directly in the HTML
- 🌍 Web Dashboard: Host on a server (Apache, Nginx, etc.) to access remotely
Use the CSV file (scan_results.csv) for spreadsheet apps, and the JSON/HTML view for quick, portable browsing.
MIT License | © 2025 Asif Agaria