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/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..48be00f --- /dev/null +++ b/verify.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +"""Verify the integrity of the domain blacklist +""" + +import sys + +from publicsuffixlist import PublicSuffixList + +def main(arguments): + psl = PublicSuffixList() + with open("disposable_email_blacklist", "r") as deb: + for line in deb: + if psl.publicsuffix(line) != line: + print(f'The following line is a public suffix: {line} - please remove it from the blacklist file. See https://publicsuffix.org for details.') + + +if __name__ == "__main__": + main(sys.argv)