prbinu / tls-scan

An Internet scale, blazing fast SSL/TLS scanner ( non-blocking, event-driven )
https://prbinu.github.io/tls-scan
Other
286 stars 54 forks source link

Feature Requets: Error Logging #24

Closed ealashwali closed 5 years ago

ealashwali commented 5 years ago

Hi, is it possible to add a feature for logging errors when the TLS handshake fails and can not obtain results? Mainly that specifies the domain name or IP address of the requested address, the error message, date/time and save them in a file? Can this be an argument in the command (so we enable it when needed).

prbinu commented 5 years ago

I thought it is already spitting error logs into stderr. Is that not sufficient?

If not, a sample output will help (what you are observing and what you expect).

ealashwali commented 5 years ago

Thanks. It is true the errors are shown in the console. But

1) they are not saved in a file. I prefer if this becomes optional as it is not always needed. If there is no choice (argument) in the command that allows me to do this, this will be better. Another alternative is using tee but it can cause slowness, or that what happened when I tried it with long run (50 concurrent connections and read a longs list of addresses from a file), the terminal output become very slow.

2) they do not provide timestamp with the error (do you think this is a good idea? if it affects performance, may be not)

This is one example that shows how the errors are displayed:

Command:

./tls-scan --connect=qq.com --port=443 --cacert=../../../../../etc/ssl/certs/ca-certificates.crt

Output: host: qq.com; ip: ; error: Timeout

prbinu commented 5 years ago
  1. Could this be solved by redirecting ('>') stderr to a file?
  2. It is not hard to do, in timeout case, you already know the elapsed time.
ealashwali commented 5 years ago

Yes. Using > will save logs to a file, but I am looking for a way to still be able to see the progress in the terminal while having it saved in a file. However, I will close the issue.