chrismaddalena / Goreport

A Python script to collect campaign data from Gophish and generate a report
BSD 3-Clause "New" or "Revised" License
179 stars 50 forks source link

Export Report in Local Time instead of UTC format #36

Open azizih4ck opened 1 year ago

azizih4ck commented 1 year ago

First of all, i am grateful to have this nice tool. Thanks to Chris.

It will be great if the report can extract and project the actual GMT local time based on the gophish server time instead of UTC time format.

Thanks.

chrismaddalena commented 11 months ago

Hey there, that may be something you can configure. It's been a long time since I've looked at Gophish, but Goreport pulls the various timestamps from the Gophish API. If you can configure Gophish to use something other than UTC, the API may then return timestamps using your desired timezone. Otherwise, Goreport doesn't know the Gophish server's timezone, but the timestamps could be converted to a desired timezone locally.

I can't make a change in the script to do that right now, but I'd accept a pull request from anyone who wants to make the necessary edits. It should be simple enough with astimezone (https://docs.python.org/3/library/datetime.html#datetime.datetime.astimezone), especially if Gophish will always return UTC.