Skip to content

Commit

Permalink
Adding some fixes from testing involving dictionary field names.
Browse files Browse the repository at this point in the history
  • Loading branch information
JCantu248 committed Jul 26, 2021
1 parent a1aa90b commit 5857063
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""This file defines the version of this project."""
__version__ = "0.0.6-rc.4"
__version__ = "0.0.6-rc.5"
14 changes: 8 additions & 6 deletions src/tools/gophish_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ def write_campaign_click_summary(api, assessment_id):
clicks
)
click_campaign_summary["click_rate"] = float(
click_summary["unique_user_count"]
) / float(click_summary["total_emails_sent"])
click_campaign_summary["unique_user_count"]
) / float(click_campaign_summary["total_emails_sent"])
click_campaign_summary["total_clicks"] = api.campaigns.summary(
campaign_id=campaign_id
).stats.clicked
Expand All @@ -297,17 +297,19 @@ def write_campaign_click_summary(api, assessment_id):
double_print(summary_outfile, "Campaign '%i' " % campaign_id)
double_print(
summary_outfile,
"Total emails sent: %i" % click_summary["total_emails_sent"],
"Total emails sent: %i" % click_campaign_summary["total_emails_sent"],
)
double_print(
summary_outfile,
"Unique targets who clicked: %i" % click_summary["unique_user_count"],
"Unique targets who clicked: %i"
% click_campaign_summary["unique_user_count"],
)
double_print(
summary_outfile, "Unique click rate: %5.2f%%" % click_summary["click_rate"]
summary_outfile,
"Unique click rate: %5.2f%%" % click_campaign_summary["click_rate"],
)
double_print(
summary_outfile, "Total clicks: %i" % click_summary["total_clicks"]
summary_outfile, "Total clicks: %i" % click_campaign_summary["total_clicks"]
)

summary_outfile.close()
Expand Down

0 comments on commit 5857063

Please sign in to comment.