fix: [public-dns] Update the public-dns generator to remove non valid hostnames

Fix reported issue #214
pull/217/head
Alexandre Dulaunoy 2022-08-16 08:26:14 +02:00
parent 631b7d522e
commit cd1baa3de5
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
2 changed files with 4341 additions and 4331 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,7 +66,8 @@ def get_lists_publidns(file) -> Tuple[List, List, List]:
elif ip.version == 6:
lipv6.append(ip.compressed)
if row[1] not in (None, "", '.'):
if row[1] not in (None, '', '.', '-.'):
row[1] = row[1].rstrip('.')
lhostname.append(row[1])
except ValueError as exc:
logging.warning(str(exc))