This script checks validity of HTTPS certificate.
Input parameter is path to file which contains https urls like:
https://mail.ru
https://devman.org
https://something-else.com
Delimiter is '\n'.
Path to file with valid urls. Path to file with invalid urls.
Script reads this file and transform data to list. After that script tries to get every url data in list asynchronously with ssl verification. If verification succeeded, url writes to file with name 'Valid' in current directory, otherwise 'Unvalid'.
Script is written for python3.6.
- Clone repo
$ git clone https://github.com/paganism/check_https_validation
- Create virtual environment in repo directory
$ virtualenv -p /usr/bin/python3.6 .venv
- Activate virtual environment
$ source .venv/bin/activate
- Install requirements
$ pip install -r requirements.txt
- Run script
$ python3.6 https_validation.py --path /home/user/hosts.txt --valid valid.txt --invalid invalid.txt
After that in project directory you will see 2 output files: 'Valid' and 'Unvalid'. Don't forget to create hosts.txt or modify file from repository.
The code is written for educational purposes.