Reputation: 561
I am now trying to report event log to windows, right now I am using win32evtlogutil
win32evtlogutil.ReportEvent(
app_name, app_event_id,
eventCategory=app_event_category,
eventType=event_type,
strings=[str(message)], data=app_event_data
)
but this only report event log to application log? but how can I report the event to security log(see picture below)?
Upvotes: 0
Views: 775
Reputation: 10136
As of Windows XP SP2+ ReportEvent()
cannot be used to report security events. You must use the Windows API AuthzReportSecurityEvent()
function. PyWin32 does not have a convenience binding for this function, so you would need to write the binding yourself.
Upvotes: 2