# ✅ Step 1: Upload file berisi list domain expired (expired_domains.txt) from google.colab import files uploaded = files.upload() # Baca list domain dari file with open("expired_domains.txt", "r") as file: expired_domains = [line.strip() for line in file if line.strip()] # ✅ Step 2: Fungsi ambil subdomain dari crt.sh import requests import json def get_subdomains(domain): url = f"https://crt.sh/?q=%25.{domain}&output=json" try: response = requests.get(url, timeout=10) if response.status_code == 200: data = json.loads(response.text) subdomains = set(entry['name_value'] for entry in data) return [sd for sd in subdomains if '*' not in sd] except Exception as e: print(f"[ERROR] {domain}: {e}") return [] return [] # ✅ Step 3: Proses semua domain dan tampilkan hasil for domain in expired_domains: subdomains = get_subdomains(domain) if subdomains: print(f"\n✅ {domain} has subdomains:") for sd in subdomains: print(f" - {sd}") else: print(f"❌ {domain} has NO subdomains found.")