Python PCAP file parser for FC drivers
Project description
Driver PCAP parser
Python PCAP file parser for Teltonika drivers
Free software: MIT license
Documentation: https://driver-pcap-parser.readthedocs.io.
Features
Parses PCAP file and detects TELTONIKA serial number
Add Ruptela serial number parser
Add VT10 serial number parser
Usage
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install driver_pcap_parser
$ sudo timeout 60s tcpdump -i eth0 -G 60 'dst port 123 and dst host 1.2.3.4' -w '/tmp/log.pcap'
$ driver_pcap_parser -f /tmp/log.pcap
{'serial': '123', 'src_ip': '1.1.1.1', 'dst_ip': '1.1.1.2', 'tcp_sport': 37767, 'tcp_dport': 21300, 'src_mac': 'a1:b2:c3:d4:e5:f6', 'dst_mac': 'a1:b2:c3:d4:e5:f7', 'time': Decimal('1616154926.586344')}
{'serial': '112', 'src_ip': '1.1.1.1', 'dst_ip': '1.1.1.2', 'tcp_sport': 32287, 'tcp_dport': 21300, 'src_mac': 'a1:b2:c3:d4:e5:f6', 'dst_mac': 'a1:b2:c3:d4:e5:f7', 'time': Decimal('1616154926.612047')}
{'serial': '111', 'src_ip': '1.1.1.1', 'dst_ip': '1.1.1.2', 'tcp_sport': 18308, 'tcp_dport': 21300, 'src_mac': 'a1:b2:c3:d4:e5:f6', 'dst_mac': 'a1:b2:c3:d4:e5:f7', 'time': Decimal('1616154926.660903')}
Credits
This packge was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2021-03-18)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
driver_pcap_parser-0.1.24.tar.gz
(17.7 kB
view hashes)
Built Distribution
Close
Hashes for driver_pcap_parser-0.1.24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f6fad3233646ec227a674ce267ef41540443ce33562c2981bfd46b4de195b95 |
|
MD5 | e3e3f71d9f65bda90a0c20f5aa5c417f |
|
BLAKE2b-256 | 6f1c03b5b2c8548cf9e26c7c55ce741eb4c4db6fc49f832bf0d50d97e4eb2373 |
Close
Hashes for driver_pcap_parser-0.1.24-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be66811d40355544ffef3103a56d2fa7fb09a57797892d2a8efb99bdf6218c70 |
|
MD5 | 67d94c83cc28e16f012ea20204a45041 |
|
BLAKE2b-256 | da9ada0e3f32314e91b5ae19a07e333faf5c2fc8d9bde3bf01bec852e0eef8e6 |