certalert-bot/rules_test.py

15 lines
332 B
Python
Raw Permalink Normal View History

2020-04-22 01:36:22 +02:00
import redis
import json
r = redis.Redis()
rules = [
{"id": "22", "value": {"t": 0, "v": ".edu", "c": 1234567}},
{"id": "27", "value": {"t": 2, "v": ".int", "c": 1234567}},
{"id": "232", "value": {"t": 0, "v": ".sy", "c": 1234567}}
]
for rule in rules:
r.rpush("toadd", json.dumps(rule))
r.rpush("todel", "22")