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.20.tar.gz
(17.7 kB
view hashes)
Built Distribution
Close
Hashes for driver_pcap_parser-0.1.20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29e2bc963ad39e5dd0aa6b5a0ab6cb92544c5ce711e93332e02b8600009d5f3b |
|
MD5 | 831eff46b2bc13b4ed156ba64bd9d7e9 |
|
BLAKE2b-256 | 226b149a08556fe9a68e3f5eee558c17671344c803610a605b5dcd13487f76b5 |
Close
Hashes for driver_pcap_parser-0.1.20-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dd32dc4943243398aaec1ff0c8c391cc14620d915e3938e3422fa8068c24843 |
|
MD5 | 17162c697241759da7e3833fb5062cac |
|
BLAKE2b-256 | 0005d19c75b31ab87512a2bf6e4f927f63c5c7808aef73d84262f5787e01b17e |