from ipaddress import *
net = ip_network('143.168.72.213/255.255.255.240', 0)
max_ip = [0, 0] for ip in net:
if ip!=net[0] and ip!=net[-1]:
if int(ip) > max_ip[0]:
max_ip = [int(ip), str(ip).replace('.', '')]
print(max_ip[1])
Комментариев нет:
Отправить комментарий