Query windows event log with python

mons.sidus at gmail.com mons.sidus at gmail.com
Fri Mar 29 23:06:00 EDT 2019


lol cheeky as. 
server = 'x' # name of the target computer to get event logs
source = 'x' # 'Application' # 'Security'


hand = win32evtlog.OpenEventLog(server, source)
flags = win32evtlog.EVENTLOG_BACKWARDS_READ | win32evtlog.EVENTLOG_SEQUENTIAL_READ
total = win32evtlog.GetNumberOfEventLogRecords(hand)
event_no = 1

log = win32evtlog.ReadEventLog(hand, flags, 0, )

i wanna keep going hard as i do and learn it but keep getting a nonsensical error
OverflowError: days=1834132873; must have magnitude <= 999999999

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
SystemError: <built-in function ReadEventLog> returned a result with an error set 
cant find much info, tried a few win32 modules to see if it made a difference.



More information about the Python-list mailing list