2018-04-09 23:52:11 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
|
2018-04-13 21:45:20 +02:00
|
|
|
def is_blacklisted(line, blacklisted_domains):
|
|
|
|
for domain in blacklisted_domains:
|
|
|
|
if domain in line:
|
|
|
|
return True
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
2018-04-09 23:52:11 +02:00
|
|
|
with open(sys.argv[1]) as f:
|
|
|
|
blacklisted_domains = [line.rstrip('\n') for line in f]
|
|
|
|
|
|
|
|
for line in sys.stdin:
|
2018-04-13 21:45:20 +02:00
|
|
|
if not is_blacklisted(line, blacklisted_domains):
|
|
|
|
print(line, end='')
|
2018-04-09 23:52:11 +02:00
|
|
|
|
|
|
|
|