17 lines
361 B
Python
17 lines
361 B
Python
|
|
||
|
import ipaddress
|
||
|
|
||
|
def main(ip: str) :
|
||
|
mask = [31, 30, 29, 28, 27, 26, 25, 24]
|
||
|
|
||
|
for i in mask:
|
||
|
|
||
|
net = ipaddress.ip_network(f'{ip}/{i}', strict=False)
|
||
|
print(net)
|
||
|
|
||
|
# Press the green button in the gutter to run the script.
|
||
|
if __name__ == '__main__':
|
||
|
main('192.168.11.144')
|
||
|
|
||
|
# See PyCharm help at https://www.jetbrains.com/help/pycharm/
|