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

No certificate transparency error handling leads to crash #78

Open
jj98594 opened this issue Feb 8, 2023 · 3 comments
Open

No certificate transparency error handling leads to crash #78

jj98594 opened this issue Feb 8, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@jj98594
Copy link

jj98594 commented Feb 8, 2023

This is a very useful utility, thank you. I've noticed that when using the --ct switch, the script fails on found domains that don't have TLS configured on port 443 (or at all):

[*] HTTPSConnectionPool(host='REDACTED.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f9879699bd0>: Failed to establish a new connection: [Errno 110] Connection timed out'))
Traceback (most recent call last):
File "./opensquat.py", line 75, in
args.ct
File "/tools/opensquat/opensquat/app.py", line 633, in main
return self.worker()
File "/tools/opensquat/opensquat/app.py", line 368, in worker
domains
File "/tools/opensquat/opensquat/app.py", line 439, in _process_doppelgagner_only
if self.response_contains_keyword(keyword):
File "/tools/opensquat/opensquat/app.py", line 423, in response_contains_keyword
return keyword in self.response.text
AttributeError: 'Domain' object has no attribute 'response'

@atenreiro atenreiro added the bug Something isn't working label Feb 19, 2023
@atenreiro
Copy link
Owner

Hey! Thanks for reporting this potential bug. I will take a look at it.

@TerminalFi
Copy link

@atenreiro simple fix is to add the below at app.py:439

            if not reachable:
                return

@atenreiro
Copy link
Owner

@atenreiro simple fix is to add the below at app.py:439

            if not reachable:
                return

Awesome, done! Next time feel free to create a Pull, and I'll merge it 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants