How le4f/pcap-analyzer works
Pcap Analyzer Online is a Flask web application for uploading and managing capture files, then inspecting and analyzing them. The main workflow runs from the browser through Flask routes: upload and store a capture, select it for analysis, and view packet details and traffic summaries. Analysis includes filtering, packet statistics, IP/port breakdowns, and web, DNS, and mail extraction. The core logic is concentrated in server/func.py. The excerpts show route-to-function calls and file/database operations; unsampled templates and browser code are represented only where the README or route code supports their role.
Main entry points: views.py Web routes · app.py Flask entry · __init__.py Flask application · func.py Capture access
Components 13
Web interface
- Flask entry
app.py - Flask application
server/__init__.py - Web routes
server/views.py - Page templates
server/templates
Capture storage
- Capture files
server/pcapfile - Capture metadata
server/db/db.sqlite - Capture access
server/func.py
Capture analysis
- Packet decoding
server/func.py - Traffic statistics
server/func.py - Protocol extraction
server/func.py
Other components
- Browser user
- PyShark
- Scapy
Connections 14
- Browser user → Flask entry: requests pages
readme.md - Flask entry → Flask application: imports app
app.py - Flask application → Web routes: imports routes
server/__init__.py - Web routes → Page templates: renders pages
server/views.py - Web routes → Capture files: saves and removes
server/views.py - Web routes → Capture metadata: queries metadata
server/views.py - Web routes → Capture access: calls helpers
server/views.py - Capture access → Capture metadata: queries metadata
server/func.py - Web routes → Packet decoding: requests packet data
server/views.py - Web routes → Traffic statistics: requests statistics
server/views.py - Web routes → Protocol extraction: requests extracts
server/views.py - Packet decoding → PyShark: reads captures
server/func.py - Traffic statistics → Scapy: reads packets
server/func.py - Protocol extraction → Scapy: reads packets
server/func.py