A Python port of the C# ZwiftPacketMonitor project which monitors Zwift UDP packets
Project description
zwiftpktmon
A Python port of the C# ZwiftPacketMonitor project which monitors Zwift UDP packets.
This project implements a TCP and UDP packet monitor for the Zwift cycling simulator. It listens for packets on a specific port of a local network adapter, and when found, deserializes the payload and dispatches events that can be consumed by the caller. It uses the asyncio standard library to allow the packet parsing activities to not interfere with the event consumer.
NOTE: Because this utilizes a network packet capture to intercept the UDP packets, your system may require this code to run using elevated privileges. This is definitely required on MacOS.
Requirements
-
Requires Python version 3.10 or higher
-
Uses the project pcapy-ng as its interface to the Pcap-API. The Pcap-API exists natively on MacOS and Linux but not on Windows. On Windows, the Npcap packet capture library must be installed. Npcap is available here: https://npcap.com/dist/npcap-1.60.exe
-
The pcapy-ng library is written in Cython at must be compiled for each environment. Currently, two environments have been pre-compiled and supported:
- Windows 10+ (64bit AMD; Intel might work but untested)
- MacOS 10.13+ (High Sierra)
Setup
pip install zwiftpktmon
There are some example scripts in the .\tests folder:
- test_harness.py: A simple script allowing network selection and event logging.
- test_harness_ui.py: A simple UI based upon PySimpleGui. To use this you must pip install PySimpleGui first.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zwiftpktmon-0.1.0.tar.gz.
File metadata
- Download URL: zwiftpktmon-0.1.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3c5ad0b7c467618443c07a77a1097379c36a4b9d8870f4f8d2cf7f89d5c4d6d
|
|
| MD5 |
dcec6807323f49b08c0bc396a33f34e5
|
|
| BLAKE2b-256 |
b93e1314034f686d0da45c03c309198304d94af85b2fb72a393ebaa5dd0b23dc
|
File details
Details for the file zwiftpktmon-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zwiftpktmon-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2752e4620f72052816ab4bf0fb5be5b335e031d004ab9825328f738a7c80aa9
|
|
| MD5 |
4c6c45e27cda293bd31555c4fa9ca563
|
|
| BLAKE2b-256 |
1662d94ad12b646c660bcd458168186b928dd020238184bbcba2d5632fbef987
|