GhostManager / Ghostwriter

The SpecterOps project management and reporting engine
https://ghostwriter.wiki
BSD 3-Clause "New" or "Revised" License
1.31k stars 181 forks source link

Oplog start_time and end_time format missing timezone offset. #433

Closed jd580 closed 3 months ago

jd580 commented 4 months ago

Describe the bug Error when trying to upload oplogs that have start_date and end_date fields in the recommended format of YYYY-MM-DD HH:MM:SS.

To Reproduce Steps to reproduce the behavior:

  1. Create a test_oplog.csv file with YYYY-MM-DD HH:MM:SS format with contents:
    entry_identifier,start_date,end_date,source_ip,dest_ip,tool,user_context,command,description,output,comments,operator_name,tags
    ,2024-05-10 14:33:12.57,2024-05-10 14:33:13.57,,,,,,,,,admin,
  2. Go to https:///oplog/import
  3. Select a target log.
  4. Click on 'Choose csv file' and select the test_oplog.csv file.
  5. Click 'Upload'
  6. See error: 'Great Failure There was an error in row 1: localtime() cannot be applied to a naive datetime'

Expected Behavior I would like to upload custom oplogs. I noticed adding timezone offset to the start_time and end_time field allows this to work a bit.

Screenshots great_failure

Server Specs:

Additional context Add timezone offset to avoid.

github-actions[bot] commented 3 months ago

This issue has been labeled as stale because it has been open for 30 days with no activity.