atenreiro / opensquat

The openSquat is an open-source tool for detecting domain look-alikes by searching for newly registered domains that might be impersonating legit domains and brands.
https://opensquat.com
GNU General Public License v3.0
685 stars 130 forks source link

(Possible bug) Double DNS reputation check #63

Closed xnomas closed 2 years ago

xnomas commented 2 years ago

Hi!

I was reading through your source code, and noticed that in the app.py file, there is a duplicate DNS reputation check in the _process_levenshtein function.

A DNS check happens, even if the flag is not set, as can be seen here:

        elif (leven_dist <= self.confidence_level) and homograph_domain:
            self.on_homograph_detected(
                keyword,
                domains,
                self.confidence[leven_dist]
                )
            self.dns_reputation(domains)

            #  DNS Validation
            if(self.dns_validation):
                self.dns_reputation(domains)

ie. if self.dns_validation is True, then dns_reputation gets called twice:]

Cheers.

atenreiro commented 2 years ago

Oh! Yes, that must be a bug 🐞😩

Thanks for reporting this, will take a look at it.

xnomas commented 2 years ago

Just deleting that one extra self.dns_reputation line should be enough :] Feels unnecessary to open a PR for that, so I'll leave it up to you! :]