How sakthivel223/malicious-ip-detection works
This is an IP/network threat-monitoring system: users can inspect a site or IP in the browser extension, while operators can analyze live traffic and review results in dashboards or a chatbot. The backend exposes analysis endpoints and combines model-based and threat-intelligence assessment; separate scripts capture packets and prepare/train detection models. The excerpts establish several API calls, but not all backend internals or extension wiring, so those relationships are omitted rather than inferred.
Main entry points: app.py Threat analysis API · chatbot.py Threat assistant · background.js Extension service worker · traffic_analyzer.py Live flow analysis
Components 15
Browser extension
- Popup analysis
main/extension/popup.js - Extension service worker
main/extension/background.js - Inline threat alerts
main/extension/content.js
Threat analysis
- Threat analysis API
main/backend/app.py - Detection configuration
main/backend/config.py - Live flow analysis
main/backend/traffic_analyzer.py - Packet capture
main/backend/capture_live_traffic.py
Monitoring interfaces
- Threat dashboard
main/backend/dashboard.py - Threat assistant
main/backend/chatbot.py
Detection modeling
- Model training
main/backend/train_model.py - Dataset preprocessing
main/backend/preprocess_cicids2017.py - Anomaly model
main/backend/anomaly_detector.pkl - Feature scaler
main/backend/scaler.pkl - Model metadata
main/backend/model_metadata.json
Other components
- Browser user
Connections 7
- Browser user → Popup analysis: requests analysis
main/extension/popup.js - Extension service worker → Threat analysis API: posts IP or domain
main/extension/background.js - Live flow analysis → Threat analysis API: posts flow features
main/backend/traffic_analyzer.py - Threat dashboard → Threat analysis API: fetches stats and feed
main/backend/dashboard.py - Threat assistant → Threat analysis API: checks health
main/backend/chatbot.py - Threat assistant → Browser user: answers questions
- Browser user → Packet capture: starts capture