Skip to content

Commit

Permalink
Still fixing datetime bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
JCantu248 committed Jun 22, 2021
1 parent 2898f62 commit c8d1583
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tools/gophish_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ def export_user_reports(api, assessment_id):
or datetime.strptime(click["time"].split(".")[0], "%Y-%m-%dT%H:%M:%S")
< first_report
):
first_report = datetime.strptime(
click["time"].split(".")[0], "%Y-%m-%dT%H:%M:%S"
)
first_report = click["time"]

user_report_doc["customer"] = None
user_report_doc["assessment"] = assessment_id
Expand All @@ -280,7 +278,9 @@ def export_user_reports(api, assessment_id):
campaign_id=campaign_id
).stats.clicked

with open(f"{assessment_id}_{campaign_id}_user_report_doc.json", "w") as fp:
with open(
f"/home/vnc/Desktop/{assessment_id}_{campaign_id}_user_report_doc.json", "w"

This comment has been minimized.

Copy link
@dav3r

dav3r Jun 22, 2021

Member

@JCantu248 This is wrong. Inside of our Docker container, you should be completely agnostic of paths on the external host. Anything related to directory mapping will be handled via Docker- see here for an example of that.

) as fp:
json.dump(user_report_doc, fp, indent=4)


Expand Down

0 comments on commit c8d1583

Please sign in to comment.