How hatboy/pcap-analyzer works
Pcap-Analyzer is a Flask web application for uploading packet captures and inspecting, analyzing, and extracting information from them. The documented workflow proceeds from upload to packet details, protocol and traffic analysis, then optional session/file extraction and security warnings; IP geolocation is another analysis view. The backend relationships below are supported by the route module’s indexed references and excerpts, while feature coverage also follows the README. The bundled ECharts runtime is represented as a visualization capability; its precise connection to application routes is not shown in the supplied excerpts.
Main entry points: views.py Web routes · echarts.js Interactive charts · file_extract.py File extraction · data_extract.py Session extraction
Components 16
Web interface
- Flask app
app/__init__.py - Upload/filter forms
app/forms.py - Web routes
app/views.py
Packet analysis
- Upload handling
app/utils/upload_tools.py - Packet decoding
app/utils/pcap_decode.py - Protocol filtering
app/utils/pcap_filter.py - Protocol analysis
app/utils/proto_analyzer.py - Traffic analysis
app/utils/flow_analyzer.py - IP geolocation
app/utils/ipmap_tools.py
Extraction and security
- Session extraction
app/utils/data_extract.py - File extraction
app/utils/file_extract.py - Risk detection
app/utils/except_info.py
Visualization
- Interactive charts
app/static/echarts-2.27/src/echarts.js - Chart components
app/static/echarts-2.27/src/component.js - Chart defaults
app/static/echarts-2.27/src/config.js
Other components
- Analyst
Connections 16
- Analyst → Web routes: uses
- Flask app → Web routes: registers
app/__init__.py - Web routes → Upload/filter forms: uses
app/views.py - Web routes → Upload handling: calls
app/views.py - Web routes → Packet decoding: calls
app/views.py - Web routes → Protocol filtering: calls
app/views.py - Web routes → Protocol analysis: calls
app/views.py - Web routes → Traffic analysis: calls
app/views.py - Web routes → IP geolocation: calls
app/views.py - Web routes → Session extraction: calls
app/views.py - Web routes → File extraction: calls
app/views.py - Web routes → Risk detection: calls
app/views.py - File extraction → Session extraction: uses
app/utils/file_extract.py - Interactive charts → Chart components: loads
app/static/echarts-2.27/src/echarts.js - Interactive charts → Chart defaults: loads
app/static/echarts-2.27/src/echarts.js - Web routes → Interactive charts: renders results