How subhajit-garai/minor_project-kgec_25-27- works
This repository is principally a Python deep-packet-inspection (DPI) prototype: live or PCAP traffic is captured, converted into packet features, aggregated into bidirectional flows, and classified by a saved decision-tree model. The main demonstrated entry point is dpi/main.py; capture wrappers and CSV export are additional capture capabilities. The web app appears to be an uncustomized Next.js scaffold, with no evidenced connection to DPI. The README provides no further capability details, and unsampled modules are not inferred beyond indexed references.
Main entry points: main.py DPI runner · packet_capture.py Capture engine · prediction_engine.py Prediction engine · flow_manager.py Flow manager
Components 16
Packet capture
- Capture engine
dpi/capture/packet_capture.py - Live capture wrapper
dpi/capture/livecapture.py - Packet CSV writer
dpi/capture/packet_writer.py
Traffic analysis
- Packet feature extractor
dpi/feature/feature_extractor.py - Flow manager
dpi/flow/flow_manager.py - Bidirectional flow
dpi/flow/flow.py
ML classification
- Model setup
dpi/model/predict.py - Prediction engine
dpi/model/prediction_engine.py - Decision-tree artifacts
dpi/model/saved/DT
Runtime support
- DPI runner
dpi/main.py - Application logger
dpi/utils/logger.py
Other components
- Operator
- Live interface
- PCAP file
- CSV output
- Web scaffold
apps/web/app/page.tsx
Connections 20
- Operator → DPI runner: starts
dpi/main.py - DPI runner → Capture engine: starts capture
dpi/main.py - DPI runner → Packet feature extractor: provides extractor
dpi/main.py - DPI runner → Flow manager: aggregates packets
dpi/main.py - DPI runner → Model setup: loads classifier
dpi/main.py - DPI runner → Application logger: logs packets
dpi/main.py - Live interface → Capture engine: supplies packets
dpi/capture/packet_capture.py - PCAP file → Capture engine: supplies packets
dpi/capture/packet_capture.py - Capture engine → Packet feature extractor: extracts features
dpi/capture/packet_capture.py - Capture engine → Packet CSV writer: writes features
dpi/capture/packet_capture.py - Capture engine → DPI runner: calls callback
dpi/main.py - Live capture wrapper → Capture engine: delegates capture
dpi/capture/livecapture.py - Capture engine → CSV output: writes CSV
dpi/capture/packet_capture.py - Flow manager → Bidirectional flow: updates flow
dpi/flow/flow_manager.py - Flow manager → Packet feature extractor: gets flow key
dpi/flow/flow_manager.py - Model setup → Prediction engine: initializes engine
dpi/model/predict.py - Model setup → Decision-tree artifacts: loads artifacts
dpi/model/predict.py - Prediction engine → Decision-tree artifacts: loads model
dpi/model/prediction_engine.py - DPI runner → Prediction engine: predicts flow
dpi/main.py - Prediction engine → Bidirectional flow: extracts statistics
dpi/model/prediction_engine.py