diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..306b569 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: python +python: + - "3.6" +script: + - python verify.py + diff --git a/disposable_email_blacklist.conf b/disposable_email_blacklist.conf index f17634a..fe136ce 100644 --- a/disposable_email_blacklist.conf +++ b/disposable_email_blacklist.conf @@ -487,7 +487,6 @@ codeandscotch.com codivide.com coieo.com coldemail.info -com.ar compareshippingrates.org completegolfswing.com comwest.de @@ -536,7 +535,6 @@ darkharvestfilms.com daryxfox.net dash-pads.com dataarca.com -datafilehost datarca.com datazo.ca davidkoh.net @@ -672,7 +670,6 @@ durandinterstellar.com duskmail.com dwse.edu.pl dyceroprojects.com -dynu.net dz17.net e-mail.com e-mail.org @@ -686,8 +683,6 @@ ebeschlussbuch.de ecallheandi.com edgex.ru edinburgh-airporthotels.com -edu.my -edu.sg edv.to ee1.pl ee2.pl @@ -1147,7 +1142,6 @@ ibnuh.bz icantbelieveineedtoexplainthisshit.com icx.in icx.ro -id.au ieatspam.eu ieatspam.info ieh-mail.de @@ -1308,7 +1302,6 @@ kopaka.net kosmetik-obatkuat.com kostenlosemailadresse.de koszmail.pl -kozow.com krd.ag krsw.tk krypton.tk @@ -1616,7 +1609,6 @@ moza.pl mozej.com mr24.co msgos.com -msk.ru mspeciosa.com msrc.ml mswork.ru @@ -1713,7 +1705,6 @@ nodezine.com nogmailspam.info noicd.com nokiamail.com -nom.za nomail.pw nomail.xl.cx nomail2me.com @@ -2151,7 +2142,6 @@ spamthisplease.com spamtrail.com spamtrap.ro spamtroll.net -spb.ru speed.1s.fr speedgaus.net spikio.com @@ -2511,7 +2501,6 @@ watchfull.net watchironman3onlinefreefullmovie.com wbml.net web-mail.pp.ua -web.id webemail.me webm4il.info webmail.igg.biz @@ -2654,7 +2643,6 @@ yyolf.net z0d.eu z1p.biz z86.ru -za.com zain.site zainmax.net zasod.com diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..3ad8980 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +publicsuffixlist diff --git a/verify.py b/verify.py new file mode 100644 index 0000000..fd6d40c --- /dev/null +++ b/verify.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +"""Verify the integrity of the domain blacklist +""" + +import io +import sys + +from publicsuffixlist import PublicSuffixList + +def main(arguments): + psl = PublicSuffixList() + suffix_detected = False + + with io.open('disposable_email_blacklist.conf', 'r') as deb: + for i, line in enumerate(deb): + current_line = line.strip() + public_suffix = psl.publicsuffix(current_line) + if public_suffix == current_line: + print(f'The line number {i+1} contains just a public suffix: {current_line}') + suffix_detected = True + if suffix_detected: + print ('At least one valid public suffix found in the blacklist, please remove it. See https://publicsuffix.org for details on why this shouldn\'t be blacklisted.') + sys.exit(1) + + +if __name__ == "__main__": + main(sys.argv)