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.14.tar.gz
(16.9 kB
view hashes)
Built Distribution
Close
Hashes for driver_pcap_parser-0.1.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb279258635e7ea8bbea282a705eba41c0ec04b211284cf443ab37162a34f93 |
|
MD5 | 6a4a9da09075bae5b05d66fec37e6d28 |
|
BLAKE2b-256 | 67aa1c11d80ff6fb2f176342f35083265b3bb50d11d6877bdb947dec202ad3e2 |
Close
Hashes for driver_pcap_parser-0.1.14-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69bf572350014f823b26d701f5b8f95547d4abac467441aa81b8a5645ab3c3d9 |
|
MD5 | 41d8c1809619af1439bdaa94fd1b444b |
|
BLAKE2b-256 | 5a768f5d0a87a3089808a95c2b4600761aa6dd8cd1bb858cd4638e1ccf04174c |