A real-time network packet sniffer and analyzer with a web-based dashboard. Capture, visualize, and analyze network traffic with ease. Designed for local use with optional remote access via ngrok.
- Real-Time Packet Capture: Start and stop live packet capturing with a simple interface.
- Protocol Analysis: Automatically detects and categorizes traffic by protocol (HTTP, HTTPS, TCP, UDP, ICMP).
- Interactive Dashboard: Visualize total packets, average size, protocol distribution, and energy consumption in real time.
- Data Visualization:
- Protocol Distribution: Donut chart showing the breakdown of protocols.
- Packet Size Distribution: Bar chart displaying packet sizes.
- Energy Consumption: Line chart tracking estimated energy usage over time.
- Anomaly Detection: Highlights unusual or suspicious traffic patterns.
- Remote Access: Share your dashboard securely over the internet using ngrok.
🛠️ Technology Stack Backend: Python (with Flask or similar framework for API endpoints)
Frontend:
->HTML, CSS, and JavaScript for the web interface
->Bootstrap for responsive layout and styling
->jQuery for DOM manipulation and AJAX requests
->Chart.js for data visualization (protocol, packet size, and energy charts)
->Optional Remote Access: ngrok for exposing your local server to the internet
Note: This project currently uses a traditional web stack (HTML/CSS/JS) for the dashboard. React is not used, but you can migrate or add a React frontend in the future if you prefer a modern SPA (Single Page Application) approach
- Python 3.8+
- pip (Python package manager)
- Git (version control)
- ngrok (for remote access, optional)
-
Clone the repository:
git clone https://github.com/shr8769/Network-Packet-Sniffer.git cd Network-Packet-Sniffer -
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app/main.py
(Replace with your actual start command if different.)
-
Access the dashboard:
- Open your browser and go to:
http://localhost:5000 - Use the dashboard to start packet capture and view analytics.
- Open your browser and go to:
Want to share your dashboard? Use ngrok to expose your local server securely:
- Start your application as above.
- Open a new terminal and run:
ngrok http 5000
- Copy the public URL provided by ngrok and share it with others.
- Fork the repository.
- Clone your fork and create a new branch:
git checkout -b feature/your-feature
- Make your changes and commit them:
git add . git commit -m "Your commit message"
- Push your branch to GitHub:
git push origin feature/your-feature
- Open a pull request from your branch to the main repository.
This project is licensed under the MIT License.




