This Python script checks the validity of Server Name Indication (SNI) hosts by establishing an SSL connection and measuring their latency. It reads a list of SNIs from a file, tests their connectivity, and saves the working SNIs to a separate file.
- Reads SNIs from
host.txt - Checks if an SNI is valid using SSL
- Measures latency for working SNIs
- Saves valid SNIs to
working_sni.txt
- Python 3
- Clone the repository:
git clone https://github.com/Sky-Mansion/sni-check.git cd sni-check - Ensure you have Python installed.
- Add a list of SNIs (one per line) in
host.txt. - Run the script:
python hostck.py
- The working SNIs will be saved in
working_sni_zoom.txt.
📂 sni-check
├── host.txt # Input file containing SNIs
├── working_sni.txt # Output file with working SNIs
├── hostck.py # Main script
├── README.md # Documentation
Testing SNI: example.com...
[✔] example.com works! Latency: 120.5ms
[✘] invalid-sni.com failed.
✅ Working SNIs saved to working_sni_zoom.txt
This project is licensed under the MIT License.
Feel free to submit issues or pull requests to improve the script!
Made with ❤️ by dilshan