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
730 stars 135 forks source link

Error checking for phishing #81

Open TheTrailGeek opened 1 year ago

TheTrailGeek commented 1 year ago

Getting the following error when running this command:

sudo python3 opensquat.py -c 0 --phishing phishing_domains.txt --dns --ct --subdomains --portcheck

Traceback (most recent call last): File "opensquat.py", line 65, in file_content = app.Domain().main( File "/opensquat/app.py", line 637, in main return self.worker() File "/opensquat/app.py", line 365, in worker self._process_doppelgagner_only( File "/opensquat/app.py", line 445, in _process_doppelgagner_only if not ct.CRTSH.check_certificate(domains): File "/opensquat/ct.py", line 49, in check_certificate for table in soup.find_all("table")[1]:

atenreiro commented 1 year ago

Hey! Thanks for reporting this - will take a look.

prathamxx commented 1 year ago

According to the error message you provided, there may be a problem with how the "opensquat.py" script is being run. It appears to be running into a problem specifically with web scraping or processing HTML text from a web page. Change in opensquat.py file with following code to get perfect output.

try: for table in soup.find_all("table")[1]: ... except Exception as e: print(f"Error while parsing HTML: {e}")

or you can also use the following command to solve the issue: python opensquat.py -c 0 --phishing phishing_domains.txt --dns --ct --subdomains --portcheck