This script retrieves SSL certificate information for a list of domains, storing the output in separate directories for successful connections and errors. It also supports connecting through a proxy for specific subdomains and utilizes parallel processing for efficiency.
- Retrieves SSL certificate details including subject, issuer, and validity period.
- Supports proxy connections for designated subdomains.
- Outputs results to
output/success/
for successful connections andoutput/error/
for connection errors. - Uses parallel processing to handle multiple domains simultaneously, improving speed and efficiency.
- Perl 5
- Perl modules:
IO::Socket::SSL
Net::SSLeay
Parallel::ForkManager
File::Path
(part of Perl core)
-
Install the required Perl modules:
sudo cpan install IO::Socket::SSL Net::SSLeay Parallel::ForkManager
-
Ensure you have OpenSSL installed and the development headers if needed:
- RedHat/Rockylinux:
sudo yum install openssl-devel
- Ubuntu/Debian:
sudo apt-get install libssl-dev
- RedHat/Rockylinux:
-
Prepare a file called
domains.txt
listing the domains and ports to check, one per line in the format:example.com:443 sub.example.com:443
-
Run the script:
perl ssl_certificate_checker.pl
-
Results will be saved in:
output/success/
for successful connections.output/error/
for failed connections, along with error details.
The script supports proxy connections for specific subdomains. To enable this, modify the condition within the script where sub.example.com
appears to match the desired subdomains. Configure the $proxy_host
and $proxy_port
variables for your proxy server.
The script uses parallel processing to handle multiple domains at once. You can adjust the number of parallel processes by modifying the $max_processes
variable in the script. By default, it is set to 5. This setting can help improve speed when checking multiple domains.
This project is licensed under the MIT License