Conversation
|
Comment copied over: The logic itself seems almost fine. The whole matter not straightforward though. What bugs me is that your PR is a breaking one for those who don't have a local resolver. They now need to add Formally: If possible use 5 x spaces as tab and don't add white spaces after the text |
See #2328, original PR #2295 from @w4ntun . Formally testssl.sh returned an error when it wasn't not possible to determine IP addresses through DNS resolution, even if --proxy and --ip=proxy flags are set. The main function always tried to determine IP addresses via DNS and exits with a fatal error if it cannot do it. Although the client cannot get the IP, the proxy could, so the SSL/TLS analysis is still possible. This PR allows the analysis for an HTTP service via a proxy server and the DNS traffic can be sent directly or through the proxy using the flag --ip=proxy. ATTENTION: This may be a breaking change for those who don't have a local resolver. They now have to add --ip=proxy. In addition: * help() was amended to add --ip=proxy (was only in the ~i/doc dir before) * amending ~/doc dir to document it's better to add --nodns=min when there's no local resolver
|
Hi @drwetter! Sorry for being away for a long time. I have written a cleaner version of the code according to your comments. I totally agree with you when saying that the solution is not straightforward for the user but I wanted to keep the possibility of scanning multiple IPs resolving the same hostname even using a proxy (only if local resolver is available). If the DNS resolving is done by the proxy, only one IP address will be scanned although more than one could be available. I think the behavior should be as follows:
I have included the $PROXY and $DNS_VIA_PROXY checks into I don't know if you would like to have a look at this solution or you prefer to keep the current want. If needed, I can open a new PR. All the best. |
|
Hi @w4ntun , thanks! I certainly want to have a look. I'd like though to merge this one first. |
There are different types of DNS requests: A, AAAA, TXT, MX and the one for CAA records. Please keep in mind that if |
Merged from #2295 and whitespaces corrected, for further work.
The current version of the script returns an error when it not possible to determine IP addresses through DNS resolution, even if --proxy and --ip=proxy flags are set. The main function always tries to determine IP addresses via DNS and exits with a fatal error if it cannot do it. Although the client cannot get the IP, the proxy could, so the SSL/TLS analysis is still possible.
The version proposed allows the analysis for an HTTP service via a proxy server and the DNS traffic can be sent directly or through the proxy using the flag --ip=proxy.