Upload files to "/"

This commit is contained in:
2025-09-17 11:02:18 +02:00
commit 63af3f2333
2 changed files with 20 additions and 0 deletions

11
ipbin.py Normal file
View File

@@ -0,0 +1,11 @@
import ipaddress
ip = ipaddress.IPv4Address('172.16.0.0')
bits = '{:#b}'.format(ip).strip('0b')
result = ''
for i in range(0, 32, 4):
result += bits[i:i+4]
result += ' ' if (i + 4) % 8 == 0 else ' '
print(result.strip())

9
subnet.py Normal file
View File

@@ -0,0 +1,9 @@
import ipaddress
net = ipaddress.ip_network("201.90.0.0/16")
subnets = net.subnets(new_prefix=22)
for subnet in subnets:
start = subnet.network_address
end = subnet.broadcast_address
print(f"{start} - {end}")