Python Prompts Free Prompt

Python Script to Monitor Website SSL Certificate Expiry

Create a Python script that checks SSL certificate expiry for a list of domains
☆ Save
Prompt
You are a Python developer. Write a script that connects to a list of domains, retrieves SSL certificate, and calculates days until expiry. Use ssl and socket. The script must: 1) Read domains from file, 2) For each, get cert expiry date, 3) Alert if expiry is within threshold (email), 4) Log results, 5) Run periodically via cron, 6) Handle connection errors, 7) Provide a summary report. Add comments.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.