Re: [python-win32] pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.') - GOAL - ACCESS to windows event log from remote host

2021-09-17 Thread Ruggero Paolo Basile
ogfile='System' AND EventType=1" query_result = wmi_obj.query(wmi_query) # Query WMI object print(query_result) #for group in conn.Win32_Group(): for group in conn.Win32_Group(): print(group.Caption) # loop #for user in group.ass

Re: [python-win32] pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.')

2021-09-16 Thread Ruggero Paolo Basile
OK well , i dint try the experiment becouse i wont modify the other host, only i have to connect to a remote host in the local lan but i cant find any parameter to connect to an host with win32security.LogonUser(). Gretings Ruggero Paolo Basile Cellulare: 3403216393 Mail

Re: [python-win32] pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.')

2021-09-16 Thread Ruggero Paolo Basile
twork. the only question now is how i have to do? before call hand = win32evtlog.OpenEventLog (server, logtype) maybe i have to create an authentication contex? i'am not skilled in that. Ruggero Paolo Basile Cellulare: 3403216393 Mail: ruggeropaolo.bas...@ora-0.it<mailto:gabriele.sal

Re: [python-win32] pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.')

2021-09-16 Thread Ruggero Paolo Basile
rint (msg) print() except Exception as err: print("Exception") print(str(err)) if __name__ == "__main__": try: print ("start") except getopt.GetoptError as err: print(str(err)) Ruggero Paolo Basile Cellulare: 340321639

[python-win32] pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.')

2021-09-15 Thread Ruggero Paolo Basile
Good morning i'am try to connect to remote host and get the eventlog from windows , but in the module i can't find a value for authentication. Have you some news? this is my error "pywintypes.error: (5, 'OpenEventLogW', 'Access is denied.')" Than