Learning win32evtlog in python
WIn32evtlog is a module from pywin32 reading Windows Event Log. I found this library lack of examples, so I hope this page could help.
Last updated
Was this helpful?
WIn32evtlog is a module from pywin32 reading Windows Event Log. I found this library lack of examples, so I hope this page could help.
Last updated
Was this helpful?
Basic example of reading "Security" event
Success! But it returned a PyEventLogRecord object
The log type variable actuall only accept the list of channel names that are registered on the computer. To obtain the correct channel name, you could use EvtNextChannelEnum handler and EvtNextChannelPath. Of course @0xeb 's WEPExplorer can helps too
To achieve this, using EvtRender() and the EvtRenderEventXml flag. See example of query 4624 events from "Security"
As win32evtlog is just a module of pywin32, it offers a exception handling using pywintypes.error