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.6, 3.7, 3.8, 3.9, 3.10 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 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 Distribution
Built Distributions
Hashes for evtx-0.7.3-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b54b953810de808236351bd9a156c226df268dfe12eec7343a89a6571fc8a657 |
|
MD5 | 19282efe0922bff118939aa10c7f7e04 |
|
BLAKE2b-256 | 82c58e16bd6c79f062b6ba629256be42fa74d16b4fe111a27eed2861f83fb3f3 |
Hashes for evtx-0.7.3-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc62d06225204072de2837399fb7287bdcb2ca16015a8c30073cb702afc01181 |
|
MD5 | 535bde5e747dde15b82d54e2204afcd6 |
|
BLAKE2b-256 | 905b58dd2204733322305a7ab1b8f692459335fe38fac83918f16d01d87baec2 |
Hashes for evtx-0.7.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d3d77429579175ec4c17b04de2bf0f136a4bb006c6ad33b3789c0a2463bce44 |
|
MD5 | 77b90e4fe3ede55fd63ec2b036ae7d56 |
|
BLAKE2b-256 | 5d1175bf231c1acce4fdd94323b23e171e1f6f5ccce9f00e4334f9a37aa31a42 |
Hashes for evtx-0.7.3-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45122be73aae9b0bd13430852580478d55062be444feb99507e5a9c5866f8e56 |
|
MD5 | 2652ef898a030a50b425d15446899379 |
|
BLAKE2b-256 | bafaaaca2dc45244d17126c26ed5d7c61c3ed699e7c048f08fd9f8d4fba4ef11 |
Hashes for evtx-0.7.3-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc0811451b765d07081a907b62e169e22d163db49af4cbd121b03e6d633b4904 |
|
MD5 | d1fc3c1ece84ac413c630d784dd10743 |
|
BLAKE2b-256 | c549c2526ea24bbeb5e84e8859a5987ade6b35045ebb997bd67b7d332248c4f1 |
Hashes for evtx-0.7.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a20a1a64e601c41e2dff7d88694c036d88e2ad136143bb38fa244fed795e1f08 |
|
MD5 | ad14864064910af190760ea8d0ebb8f6 |
|
BLAKE2b-256 | 81785207ee95855489b10404e476737fc10280bf8d7962d3c2d1128d1cbe7d62 |
Hashes for evtx-0.7.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 370adf474280b266b313b1328be5a08519781bde2f5312c33264c6c11f99e588 |
|
MD5 | e04c5eb3add8af8f6e82a050cd5d6a5c |
|
BLAKE2b-256 | 5414bbb400c143e18d75b43d0541ec5d49b01c6b723793112d2ef9afe72e846e |
Hashes for evtx-0.7.3-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18db97b0b81fae53d93c2a1d5033d6415340daec812465868e289390c3bb1f11 |
|
MD5 | 79742e2507c17fd7a715e834e8885922 |
|
BLAKE2b-256 | a1d7e5cefd2c035448568dbc9cc4cf159a8d41483f57360e7ee8f33a60e1d0ef |
Hashes for evtx-0.7.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ce67464f047b41c39b09060b9f1cd8d1aafa9ea057ba286e0406fddae2e974c |
|
MD5 | fae49afa12352643241225dfa674438d |
|
BLAKE2b-256 | 8911630662eeb3ea932fe03114a03962d30e1e3a8585ed2714df799423ab6590 |
Hashes for evtx-0.7.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b192e347dac2254384e5f6e2df00e0fbac94e8e79bb265ad68d4713a4689ee5 |
|
MD5 | 45ac06bf0e2271754fbe2e81f09eb61b |
|
BLAKE2b-256 | eed8d109ec5c9ba481ccbe660426048ac8814551090a9afee0281f335a0140ff |
Hashes for evtx-0.7.3-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2634c8933160483806d5d84aa5d5f95a40622e3703602bc6c52752d9ec4b1da2 |
|
MD5 | 7168c9207d24912e973993b50b0f3f34 |
|
BLAKE2b-256 | c2faa16913629bb4ce402b0dda073814f8e1bb49d540d3894f158d4678991154 |
Hashes for evtx-0.7.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6e110ab3e5dbd9ba9aec4adc5551204f5ae6f78cb0808cf830205d9dfa4c859 |
|
MD5 | 52c39ac0b2b9b7527204f733eca1d957 |
|
BLAKE2b-256 | 4bc3547f3a4e1afedd575026fcbed711533a4b03d199fba9ae6f91e53eece4a9 |
Hashes for evtx-0.7.3-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29465ad0fe180752ffa132c2e8d42cc81d6e596ba6922004d9b426416b016a27 |
|
MD5 | 54e20b616d8aeeefbfd31c6ddf755e6e |
|
BLAKE2b-256 | f8c1e51f8720056c53f66c335e47fec5dd94e7d1bb4b32ddefc166472bd242df |
Hashes for evtx-0.7.3-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f78849d0793223a4be83d504b86c1fbe395c1cfd6cae6674e92688eb9d6f6d5c |
|
MD5 | 024c3437c1ac57db3deb5feffbbeecfe |
|
BLAKE2b-256 | d3de3b3ec665eb43ec33786b9d3db2d098330660d2d2bf575034ce57172d33e3 |