diff --git a/feed_dns.py b/feed_dns.py index cbb5ecf..5d56898 100755 --- a/feed_dns.py +++ b/feed_dns.py @@ -144,7 +144,7 @@ class MassDnsParser(Parser): timestamp = 0 header = True for line in self.buf: - line = line[:-1] + line = line.rstrip() if not line: header = True continue diff --git a/validate_list.py b/validate_list.py index 42ff156..f35d7e0 100755 --- a/validate_list.py +++ b/validate_list.py @@ -29,7 +29,7 @@ if __name__ == '__main__': args = parser.parse_args() for line in args.input: - line = line[:-1].lower() + line = line.rstrip().lower() if (args.domain and database.Database.validate_domain(line)) or \ (args.ip4 and database.Database.validate_ip4address(line)): print(line, file=args.output)