Python bindings for https://github.com/omerbenamram/evtx
Project description
pyevtx-rs
Python bindings for https://github.com/omerbenamram/evtx/
.
Installation
Available on PyPi - https://pypi.org/project/evtx/.
To install from PyPi - pip install evtx
Wheels
Wheels are currently automatically built for Python 3.7+ using abi3 tag (which means they are compatible with all version from 3.7 onwards).
Supported platforms are:
- Linux x86_64
- macOS x86_64
- macOS arm64 (m1)
- Windows x86_64
Installation from sources
Installation is possible for other platforms by installing from sources.
This requires a Rust compiler and a recent enough Setuptools and Pip.
Run pip install -e .
Usage
The API surface is currently fairly limited (only yields events as XML/JSON documents), but is planned to be expanded in the future.
This will print each record as an XML string.
from evtx import PyEvtxParser
def main():
parser = PyEvtxParser("./samples/Security_short_selected.evtx")
for record in parser.records():
print(f'Event Record ID: {record["event_record_id"]}')
print(f'Event Timestamp: {record["timestamp"]}')
print(record['data'])
print(f'------------------------------------------')
And this will print each record as a JSON string.
from evtx.parser import PyEvtxParser
def main():
parser = PyEvtxParser("./samples/Security_short_selected.evtx")
for record in parser.records_json():
print(f'Event Record ID: {record["event_record_id"]}')
print(f'Event Timestamp: {record["timestamp"]}')
print(record['data'])
print(f'------------------------------------------')
File-like objects are also supported.
from evtx.parser import PyEvtxParser
def main():
a = open("./samples/Security_short_selected.evtx", 'rb')
# io.BytesIO is also supported.
parser = PyEvtxParser(a)
for record in parser.records_json():
print(f'Event Record ID: {record["event_record_id"]}')
print(f'Event Timestamp: {record["timestamp"]}')
print(record['data'])
print(f'------------------------------------------')
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 Distributions
Built Distributions
Hashes for evtx-0.8.7-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1566eb41e67aa75e6b7574f8986e3288706e7c3e321b1fefe5e61bede1292786 |
|
MD5 | f0ef0855dddcd25e83335c6e3d8599e8 |
|
BLAKE2b-256 | 80c2947bd4e1ed095a116dce43150d58e0cf101d21abbd9460b960dd18f44b26 |
Hashes for evtx-0.8.7-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cd751799a415a39a49787cc4c8fb2cd485e9c2eeb9a7a8713daf83040d36c5b |
|
MD5 | bbaf47b8108a31cbe505882b2dfb29ee |
|
BLAKE2b-256 | fcf59ddadb7472f2e2abba7779df48b862c4db97ee50cfce1525f37d728c3220 |
Hashes for evtx-0.8.7-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eec5f2603ad03d6f828024492bbf409b0b2946e4f47b3b42a7fe3e508c51ede |
|
MD5 | 50aff4fecf3775cbcf4ec2e85a20c618 |
|
BLAKE2b-256 | a88e7256a33230000061750a6329b0c8113ec3723fb69a5fffa21b57db12cb77 |
Hashes for evtx-0.8.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aaf4c93c4f2cb4c81c1b3ebbf10e84c9d58dc4b803186ceada63fc98b29d82c |
|
MD5 | 034cca5839aec0be6d936371acef1dff |
|
BLAKE2b-256 | e77bc39a8a50245c396c32f44c93f0f28524f9a2570cd530660aaf6a8b9c980e |
Hashes for evtx-0.8.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b65c9903470e1a9c212d5cea1813cf3f3f4234747856e467506abcddb28575e |
|
MD5 | 36f3779412a01d5789d6ae6e80d08d27 |
|
BLAKE2b-256 | 5844e989bb5773ed00eb4dbdff3ad4a51bc0db9723904e80fdfbeccd3d4ee668 |
Hashes for evtx-0.8.7-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5097c844438f481b2d3770b869bca3dfba59bc548777d4302ee115119197ef4b |
|
MD5 | 0d9f62513696302c8f0d3aa8755dc7e9 |
|
BLAKE2b-256 | dbd49fda5e2bf5083d49994a516f19ebae983e8c3935c22d0f50c552b60bef76 |
Hashes for evtx-0.8.7-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 944661a3d4a54e60a6597ce94a3e300c79029d6d09909cb154a4c10d8eaa4f8a |
|
MD5 | a4fcbbe1b7578d5875ccb83750d9229d |
|
BLAKE2b-256 | fc735f527bcc497dc87c0f03825aa822e437047b1c07deff515962d48da9b551 |