certsocietegenerale / event2timeline

Simple Microsoft Windows sessions event logs visualization
GNU General Public License v3.0
150 stars 28 forks source link

evtdata.js not written correctly #4

Open hapl0 opened 6 years ago

hapl0 commented 6 years ago

I suppose it is language related, but the JavaScript Console tells me it doesn't understand the u'string' (which seems quite normal).

So the graph doesn't display, since the file containing data is skipped.

To bypass the issue, I imported the JSON library, and changed the writing of 'lanes' and 'items' as follow :

js.write("var lanes = %s,\n" % str(list(x.encode('utf-8') for x in timeline['lanes'])))
...
js.write("items = ")
json.dump(timeline['items'],js)
js.write(",\ntimeBegin = \'%s\',\n" % timeline['time_begin'])

I am not sure it is a correct way to fix the problem, but it does the trick. I am not sure you didn't abandon the project, but just in case.

Thanks for this great tool, btw.