new: [disposal-email] added

pull/100/head
Alexandre Dulaunoy 2019-03-24 12:02:30 +01:00
parent cc58581ade
commit 48a5e32d50
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
2 changed files with 3036 additions and 0 deletions

File diff suppressed because it is too large Load Diff

27
tools/generate-disposal.py Executable file
View File

@ -0,0 +1,27 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
import json
import datetime
url = 'https://raw.githubusercontent.com/martenson/disposable-email-domains/master/disposable_email_blocklist.conf'
r = requests.get(url, stream=True)
domain = []
for ip in r.iter_lines():
v = ip.decode('utf-8')
if not v.startswith("#"):
if v: domain.append(v)
warninglist = {}
warninglist['name'] = 'List of disposable email domains'
warninglist['version'] = int(datetime.date.today().strftime('%Y%m%d'))
warninglist['description'] = 'List of disposable email domains'
warninglist['list'] = sorted(set(domain))
warninglist['type'] = 'substring'
warninglist['matching_attributes'] = ["email-src", "email-dst", "whois-registrant-email", "domain|ip", "dns-soa-email"]
with open('../lists/disposable-email/lists.json', 'w') as data_file:
json.dump(warninglist, data_file, indent=4, sort_keys=True)