fkkarakurt/reconic

SSL exiting

Closed this issue ยท 4 comments

Hi,
When running this against some sites, I am getting exceptions when the SSL check is being run, is this expected?
So running against a site www.passax.com, the ssl check fails and the script exits.
Is this to be expected due to the way their hosting handles their SSL cert?
For example, I have a test site I use, www.galwaycomputerguru.com that is hosted by namecheap, this also throws an error and exits. Thought it was just that my system was not UTF-8 enabled, but I have since enabled and I am still getting the issue. From examining the code, I can offer this advice:

Modify your Python script to explicitly handle the encoding. The rich.console.Console class offers a force_terminal and force_encoding parameter that can be used to control how text is encoded. You can modify the initialization of the Console in the SSLCertScanner class to force the desired encoding like this:
class SSLCertScanner:
def init(self, hostname, port=443):
self.hostname = hostname
self.port = port
# Force utf-8 encoding
self.console = Console(force_terminal=True, force_encoding='utf-8')
Update the code to print the SSL certificate information to a file instead of the console. This way, you can avoid the console encoding issue entirely:
def display_results(self, ssl_info, filename='ssl_info.txt'):
with open(filename, 'w', encoding='utf-8') as f:
table = Table(show_header=True, header_style="bold green", title="[bold]SSL Certificate Information[/bold]")
table.add_column("Field", style="blue")
table.add_column("Value", style="magenta")
for key, value in ssl_info.items():
table.add_row(key, str(value))
# Use the console to render the table as a string and write it to the file
f.write(self.console.render_str(table))
When using this approach, ensure that the corresponding portion of the code in your main script (reconic.py) calls display_results properly with the filename argument if you decide to pass one, or else just use the default.

Is there scope to add fault tolerance to the script so it skips SSL if it fails?

  1. Are you sure your SSL configuration on galwaycomputerguru.com is correct? I have previously tested different sites belonging to different hosting services and did not encounter this problem.
  2. Instead of passax.com, try scanning for passax.net. Reconix checks redirects only during directory scanning. However, I may fix this in future updates.
  3. I created a code that will allow the program to continue without getting stuck in case there are problems with SSL/TLS scanning. Please update the Reconix you are using.
  4. I noticed that both of the websites you recommended have access issues. Try reviewing the hosting configurations. (This may also be a regional access problem.)

Finally, thank you for the code you suggested.

I'm marking the issue as solved.

Amazing, thank you for that.
I know you are working on speeding up the subdomain, I was just wondering if you have had a look at https://github.com/six2dez/reconftw

Amazing, thank you for that. I know you are working on speeding up the subdomain, I was just wondering if you have had a look at https://github.com/six2dez/reconftw

I'll look into this, thank you.