How sahil-dalwani/real-time-network-anayliser works
This is a Flask-based network analyzer. A user selects an interface and starts capture; the analyzer sniffs IP packets, tracks protocol, connection, and port statistics, detects suspicious patterns, and serves results through API endpoints. The UI template is served at /, while interfaces, capture control, statistics, ports, and reset are exposed by app.py. The analyzer excerpt shows capture and aggregation behavior, but not the template's client-side interactions or all packet-processing details, so those links are omitted.
Main entry points: app.py Flask routes · analyzer.py NetworkAnalyzer · index.html Analyzer page
Components 14
Web interface
- Analyzer page
templates/index.html - Flask routes
app.py - Interface listing
app.py - Capture control
app.py - Stats and ports API
app.py - Reset API
app.py
Packet analysis
- NetworkAnalyzer
analyzer.py - Packet sniffing
analyzer.py - Packet processing
analyzer.py - Traffic statistics
analyzer.py - Suspicious activity detection
analyzer.py
Other components
- Operator
- Network interfaces
- Scapy
Connections 16
- Operator → Flask routes: uses
app.py - Flask routes → Analyzer page: renders
app.py - Flask routes → Interface listing: routes
app.py - Interface listing → Network interfaces: lists interfaces
app.py - Flask routes → Capture control: routes
app.py - Capture control → NetworkAnalyzer: starts or stops
app.py - Flask routes → Stats and ports API: routes
app.py - Stats and ports API → NetworkAnalyzer: gets stats
app.py - Flask routes → Reset API: routes
app.py - Reset API → NetworkAnalyzer: resets stats
app.py - NetworkAnalyzer → Packet sniffing: starts capture
analyzer.py - Packet sniffing → Scapy: sniffs packets
analyzer.py - Packet sniffing → Packet processing: dispatches packets
analyzer.py - Packet processing → Traffic statistics: updates
analyzer.py - Packet processing → Suspicious activity detection: checks activity
analyzer.py - Suspicious activity detection → Traffic statistics: records alerts
analyzer.py