certalert-bot/certstream_producer.py
2020-04-22 01:36:22 +02:00

11 lines
269 B
Python
Executable File

import certstream
import redis
import sys
r = redis.Redis()
def enqueue(message, context):
for domain in message['data']['leaf_cert']['all_domains']:
r.rpush('certstream', domain)
certstream.listen_for_events(enqueue, url='wss://certstream.calidog.io/')