Hi,
I'm trying to import events from Elasticsearch using your python script (I'm using python 3.8.8), but got an error:
C:\LogonTracer>python logontracer.py --es --es-server https://xxx:9200 --es-user xxx --es-pass xxx --es-cafile \xxx.cer -z +2 -f 2021-04-08T08:00:00 -t 2021-04-08T08:00:30[+] Script start. 2021/04/08 09:07:21[+] Neo4j Kernel version: 4.2.2[+] Time zone is 2.[+] Search ES from 2021-04-08 08:00:00.[+] Search ES to 2021-04-08 08:00:30.[+] Start searching the ES.Traceback (most recent call last):File "logontracer.py", line 1857, in <module>main()File "logontracer.py", line 1851, in mainparse_es()File "logontracer.py", line 1569, in parse_esevent_series = pd.Series([eventid, ipaddress, username, logintype, status, authname, int(stime.strftime("%s"))], index=event_set.columns)ValueError: Invalid format string
Hi, I'm trying to import events from Elasticsearch using your python script (I'm using python 3.8.8), but got an error:
C:\LogonTracer>python logontracer.py --es --es-server https://xxx:9200 --es-user xxx --es-pass xxx --es-cafile \xxx.cer -z +2 -f 2021-04-08T08:00:00 -t 2021-04-08T08:00:30
[+] Script start. 2021/04/08 09:07:21
[+] Neo4j Kernel version: 4.2.2
[+] Time zone is 2.
[+] Search ES from 2021-04-08 08:00:00.
[+] Search ES to 2021-04-08 08:00:30.
[+] Start searching the ES.
Traceback (most recent call last):
File "logontracer.py", line 1857, in <module>
main()
File "logontracer.py", line 1851, in main
parse_es()
File "logontracer.py", line 1569, in parse_es
event_series = pd.Series([eventid, ipaddress, username, logintype, status, authname, int(stime.strftime("%s"))], index=event_set.columns)
ValueError: Invalid format string
It looks like stime.strftime("%s") is not supported, see https://stackoverflow.com/questions/11743019/convert-python-datetime-to-epoch-with-strftime or https://bugs.python.org/issue12750.
Could you have a look? Best regards,