еще больше IP-адресов

This commit is contained in:
2022-09-18 09:23:02 +03:00
parent 3d13b8263f
commit 0890b273be
2 changed files with 28 additions and 6 deletions

View File

@@ -20,7 +20,10 @@ def main(file_data: list):
dict[domain_or_range].append(comment)
except ValueError:
dict[socket.gethostbyname(domain_or_range) + '/32'].append(l)
hostname_data = socket.gethostbyname_ex(domain_or_range)
for ip in hostname_data[2]:
dict[ip + '/32'].append(l)
ips = list(dict.keys())