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.6-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd9155653dcef172a4be94973bef97ab75acd2b1844e6195851c9cbd3002e513 |
|
MD5 | 04b87f7441c0597f4cff3b8bbaabdcec |
|
BLAKE2b-256 | bd706a6c213005a6fb910b6fd5d25f6754ade3e8c5cd3da983fb8e65825706dc |
Hashes for evtx-0.8.6-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e51c75a7d27210d129be0e2c350b431107231ebecd9ea3653f12698d507834ba |
|
MD5 | cd9f50c7d2c27e9b7efeb314d6708526 |
|
BLAKE2b-256 | 3df63712f8a7cfb439c3259b7b1dc06d2ebcd7ea119fa7a765e3130314c8d701 |
Hashes for evtx-0.8.6-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 393adee0a4c3fd677d24f16a3a06d712c585251fc1692faa1f9eab935063fed3 |
|
MD5 | c2742756030a840993779f0a50fb1ad8 |
|
BLAKE2b-256 | 11d4dc9b1b532390c4b72f2b24cb4dc82d2be8ed0e6b86dadadb2917ed57279f |
Hashes for evtx-0.8.6-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 872cf858e4e0fbf5f2ffc77b9654244317b6c221821f029efe09b1e753cd3d8e |
|
MD5 | d493f1f3dda577ff723662ec51465357 |
|
BLAKE2b-256 | 79b9865bdc2927244f87c9f66178bddff3c743248cf07d9d5f1e042a9ea4db6f |
Hashes for evtx-0.8.6-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa20b886a42ee91a5b7d2aa636bc79c0f398205567df90f7565c6301604edd5a |
|
MD5 | 2dd96a4420d2adc8058458844ce6aca6 |
|
BLAKE2b-256 | 3296abf3f367554b96e5c058e1570cf9324263cbd5f958e0328ade6116a3d3f4 |
Hashes for evtx-0.8.6-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a8481d9d701250138731628fce76859f5d98993e9fa149e70e32bef32a5abdf |
|
MD5 | b9bab323dc4537d3c29140c68944fbca |
|
BLAKE2b-256 | 3091923795ff2d7077e4807e03e0a56367f9f01d3db369ea598e232f1f1373c7 |
Hashes for evtx-0.8.6-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21628adb4b445b1fbb0a5d5925120a11efd4ff8955e281c1053f58b16383ceef |
|
MD5 | b95ffffe89b6d1a56b28f081a1f42e6a |
|
BLAKE2b-256 | 272d9677480d31f53997296f1c3ca144698c0a9ffff8da6bd53c88288c083e23 |