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.12.tar.gz
(17.0 kB
view hashes)
Built Distribution
Close
Hashes for driver_pcap_parser-0.1.12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8335ded5311cc0923e2810008f502b9daa61eb4431c751370cd15f1a315396d |
|
MD5 | baefbca31f7c863dde0ab441ff433284 |
|
BLAKE2b-256 | 386a5d736893fa7d954ee771723b23afd3695d5fcff9bfa15c0f1a4b705be487 |
Close
Hashes for driver_pcap_parser-0.1.12-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 051d6cc031588d4e2cb2a20e6de0d38c7d17559212880d89dc8de8d88b9b8efd |
|
MD5 | 450b6b171bf07bb93557ea2928c3ae19 |
|
BLAKE2b-256 | 3c255390d200f0cc56749495c3d7a3b1bc69e9be0a8e31527f8353ab8144b3b6 |