123456789101112131415161718192021 |
- def process(self, message, context):
- if message["message_type"] == "heartbeat":
- return
- if message["message_type"] == "certificate_update":
- all_domains = message["data"]["leaf_cert"]["all_domains"]
- if ARGS.skip_lets_encrypt and "Let's Encrypt" in message["data"]["chain"][0]["subject"]["aggregated"]:
- return
- for domain in set(all_domains):
- # cut the crap
- if not domain.startswith("*.")\
- and "cloudflaressl" not in domain\
- and "xn--" not in domain\
- and domain.count("-") < 4\
- and domain.count(".") < 4:
- parts = tldextract.extract(domain)
- for permutation in get_permutations(parts.domain, parts.subdomain):
- self.q.put(BUCKET_HOST % permutation)
|