{"id":25030132,"url":"https://github.com/kw-soft/packetmonitor","last_synced_at":"2025-03-30T19:16:29.600Z","repository":{"id":274981558,"uuid":"924697343","full_name":"kw-soft/PacketMonitor","owner":"kw-soft","description":"This project visualizes live network traffic using Flask, WebSockets, Scapy, and Leaflet.js. It captures network packets, retrieves geolocation data, and displays them dynamically on a real-time map.","archived":false,"fork":false,"pushed_at":"2025-01-31T15:50:07.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T05:29:21.208Z","etag":null,"topics":["flask","geolocation","leaflet","map","network-traffic","packet-capture","packets","real-time","realtime","realtime-map","scapy","websockets"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kw-soft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-30T13:43:58.000Z","updated_at":"2025-01-31T15:50:11.000Z","dependencies_parsed_at":"2025-01-30T14:46:31.478Z","dependency_job_id":null,"html_url":"https://github.com/kw-soft/PacketMonitor","commit_stats":null,"previous_names":["kw-soft/packetmonitor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kw-soft%2FPacketMonitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kw-soft%2FPacketMonitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kw-soft%2FPacketMonitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kw-soft%2FPacketMonitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kw-soft","download_url":"https://codeload.github.com/kw-soft/PacketMonitor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365651,"owners_count":20765549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","geolocation","leaflet","map","network-traffic","packet-capture","packets","real-time","realtime","realtime-map","scapy","websockets"],"created_at":"2025-02-05T21:46:18.563Z","updated_at":"2025-03-30T19:16:29.508Z","avatar_url":"https://github.com/kw-soft.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PacketMonitor\n\n## 📌 Project Overview\nThis project visualizes **live network traffic** using **Flask, WebSockets, Scapy, and Leaflet.js**. It captures network packets, retrieves geolocation data, and displays them dynamically on a real-time map.\n\n## 🚀 Features\n✅ **Live network packet capturing** using Scapy\n✅ **Real-time WebSocket communication** between Sniffer \u0026 Web UI\n✅ **Geolocation mapping** for IP addresses\n✅ **Traffic statistics** (connection count \u0026 data usage per country)\n\n---\n\n## 🛠 Setup Instructions\n### **1️⃣ Clone the Repository**\n```sh\ngit clone https://github.com/kw-soft/PacketMonitor.git\ncd PacketMonitor\n```\n\n### **2️⃣ Install Dependencies**\n```sh\npip install -r requirements.txt\n```\n\n### **3️⃣ Install Required Network Capture Tools**\n#### **Windows**\nScapy requires **Npcap** to capture packets on Windows. Download and install it from:\n- [Npcap Download](https://nmap.org/npcap/)\n\nMake sure to check the option **\"Install Npcap in WinPcap API-compatible mode\"** during installation.\n\n#### **Linux/macOS**\nNo additional installation is required, as Scapy uses native network interfaces.\nEnsure you have the necessary permissions to capture packets:\n```sh\nsudo setcap cap_net_raw,cap_net_admin=eip $(which python3)\n```\n\n### **4️⃣ Run the WebSocket Server**\n```sh\npython server.py\n```\n\n### **5️⃣ Start Packet Sniffing (if not auto-started)**\n```sh\npython sniffer.py\n```\n\n### **6️⃣ Open the Web UI**\nGo to **http://127.0.0.1:8080** in your browser.\n\n---\n\n## 📁 Project Structure\n```\n/your_project_directory\n│── server.py          # Flask WebSocket server with geolocation\n│── sniffer.py         # Network sniffer using Scapy\n│── requirements.txt   # Python dependencies\n│── /templates\n│   └── index.html     # Frontend UI\n```\n\n---\n\n## 🔧 Configuration\n### **Change Network Interface (for Sniffing)**\nEdit `sniffer.py` and update the **network interface**:\n```python\niface = \"Intel(R) I211 Gigabit Network Connection\"  # Change to your actual interface\n```\nFind your interface using:\n```sh\nifconfig (Linux/macOS)\nipconfig (Windows)\n```\n\n### **API Token for Geolocation (Optional)**\nBy default, `server.py` uses **ip-api.com** for IP geolocation. To use `ipinfo.io`, update the token:\n```python\nfetch(\"https://ipinfo.io/json?token=YOUR_API_TOKEN\")\n```\n\n---\n\n## 🖥️ Screenshots\n![Live Network Map](screenshots/screenshot.PNG)\n\n---\n\n## 🐜 License\nThis project is licensed under the **MIT License**.\n\n---\n\n## 👨‍💻 Contributing\nPull requests are welcome! Feel free to fork this repository and submit a PR.\n\n1. **Fork the repo**\n2. **Create a new branch** (`feature-xyz`)\n3. **Commit your changes** (`git commit -m \"Added new feature\"`)\n4. **Push \u0026 create a PR**\n\n---\n\n## 💌 Contact\n📧 **Your Email:** kevin@kevsoft.de  \n🐙 **GitHub:** [KW-Soft](https://github.com/kw-soft)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkw-soft%2Fpacketmonitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkw-soft%2Fpacketmonitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkw-soft%2Fpacketmonitor/lists"}