Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscalculation of unique events #19

Open
Cycl0pe opened this issue Jul 18, 2019 · 2 comments
Open

Miscalculation of unique events #19

Cycl0pe opened this issue Jul 18, 2019 · 2 comments
Assignees

Comments

@Cycl0pe
Copy link

Cycl0pe commented Jul 18, 2019

First of all, thanks for your useful tool!

When generating a report, I noticed a little error concerning the variable "total_unique_opened".

You should take into account the fact that if someone clicks on the link in the email, he should have opened the e-mail before (That's the logic applied in Gophish) even if he did not activate the display of the tracker in the email.

You should also take into account the fact that if someone submitted data, he implicitly opened the email and clicked on the link.

Cycl0pe

@Cycl0pe Cycl0pe changed the title Total_unique_opened wrong value Miscalculation of unique events Jul 18, 2019
@chrismaddalena chrismaddalena self-assigned this Jul 23, 2019
@chrismaddalena
Copy link
Owner

You raise a good point. I can see about making modifications to the counts so certain events trigger +1 to other counts under certain conditions.

@chrismaddalena
Copy link
Owner

@Cycl0pe I'm only now able to get to this. I added in some logic to increment the "email opened" counter when a recipient has a timeline event for clicking the link but no event for loading the tracking image.

The Gophish demo database doesn't emulate that sort of behavior, so I haven't fully tested it. It's a simple change, so it should work. I'm going to put together a script to emulate events for different test cases later.

if target.email in self.targets_clicked:
    temp_dict["clicked"] = True
    self.total_unique_clicked += 1
    # Incremement the total number of opens for this target if they clicked
    # but did not display the tracking image in the email
    if target.email not in self.targets_opened:
        self.total_unique_opened += 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants