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.18.tar.gz
(17.5 kB
view hashes)
Built Distribution
Close
Hashes for driver_pcap_parser-0.1.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13ee2e840810f1af11b1714ef7564b55b4a094c130f2cede9e795b1f7c132631 |
|
MD5 | bf08f9bc585ce02ec2cd5ede0daf6ab3 |
|
BLAKE2b-256 | 06c9032f9ea07d1b411e18573c498ecb7a78c74ed55dcad7491d494142dc5803 |
Close
Hashes for driver_pcap_parser-0.1.18-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd8fd1e74daf8dbce688360081d90eb1a70996975933886f7c1f889c9f7c86b7 |
|
MD5 | e722b640f18ab60d0edef49411afe3b6 |
|
BLAKE2b-256 | 776b956835e6b648d63d0150a24edbe392c0827dad4dfdc070cf68601833d57e |