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 python3.6 python3.7 for all 64-bit platforms (Windows, macOS, and manylinux
).
Installation from sources
Installation is possible for other platforms by installing from sources, this requires a nightly rust compiler and setuptools-rust
.
Run python setup.py install
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.6.9-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ff3af47e80fa02848fac99d15a269c1aea43cdda4b53f1a36f9c157222c0aa |
|
MD5 | 58afb7e4e14274028583152c0c29aae8 |
|
BLAKE2b-256 | e2f3f3c34ccc4b8ec706edc93ddf6ec814c29bcbbf2a8789cf817bc25ad4634b |
Hashes for evtx-0.6.9-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84bde26bbe2b7010429f18c5d46c14010c2729e8b94d3a39bb48becafeec0dda |
|
MD5 | 089e9f3526c2e339e8d247d48f50ae02 |
|
BLAKE2b-256 | dd8c40b3a5519b7fd3893007952cb329552fa391b67fed5bbe2dbf62696ef7e7 |
Hashes for evtx-0.6.9-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 713be0378f8e7fa28d45c43a4f0e574b721b1a23d317c488184de6329789495e |
|
MD5 | 21d96e72446fa05006fc4e1bf56fcc4c |
|
BLAKE2b-256 | 243e20a0b4a8a7f754ec1a09de45365eef1159ed8700e9e3cb380033c45f33dd |
Hashes for evtx-0.6.9-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7f351878fb5e77d54e3ffece57ba926937dde883232d68cc22c335112815f52 |
|
MD5 | fb490d5a3b2fc9c541d889b09885ece7 |
|
BLAKE2b-256 | f0eb02cffc7c360550699c50b437088fb72196a78469ff69210508a69fdcdbde |
Hashes for evtx-0.6.9-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a0b1da3f7a0fe0744773d5813a1c66ea5dd9e2d72249f985b4a6c0901afd7de |
|
MD5 | e087922596e747d112921e602725a9fa |
|
BLAKE2b-256 | 9ea3a954de0969b9d497d692beb099644ae5548e42fe8dbe5a7b421c8d4c2116 |
Hashes for evtx-0.6.9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46eba7b3a4d6052ba9c0c2dba8c2b76facb0db4a22f1f69c93ea34bf9d02ac4 |
|
MD5 | 2576f4ae161347044c8a2b28c9a7a92a |
|
BLAKE2b-256 | c0e06946d15721e530b2e5cc6c2aa7575c24e41c92f717eb4a7d72e184a1ce15 |
Hashes for evtx-0.6.9-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98ebb4a6190b40261c0eea8fc724a1e4782613dac99f28abcfdb0199a8bf0ce5 |
|
MD5 | 99162aef467a555a80b4e1bb73908f08 |
|
BLAKE2b-256 | 95689d8a830fadada32cc6e2e5b55f93d86084d1d60793015d75b8020be98c7e |
Hashes for evtx-0.6.9-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df656c1b45d48fa254d4cbe16a201f04775c5ae02ead1f7ae583cb68be869295 |
|
MD5 | 497cdf51444a8b311305a20ef409f79d |
|
BLAKE2b-256 | 1e3acd9363fbc7abbaffa544979d5900674a9cbc0bf6533d994d26268b119e25 |
Hashes for evtx-0.6.9-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82a4ff5c917e0f7cdd1ecf8de5d1fead5e659e673e514257bfc9eab4923101ce |
|
MD5 | d865dcb9d31c55898633a0c8afdc4732 |
|
BLAKE2b-256 | 5660f8c5e662e46701888795849b854e9f45c8c2e060d2d77ade1fcd088a27ea |