mirror of
https://github.com/VitaAetaerna/SubnetExerciseGenerator.git
synced 2025-10-16 14:42:42 +02:00
Compare commits
2 Commits
a949633876
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
7bfe22aab1 | ||
|
fccd0ce51d |
6
main.py
6
main.py
@@ -1,6 +1,6 @@
|
|||||||
import math
|
import math
|
||||||
import random
|
import random
|
||||||
|
print("Made by VitaAeterna and NekoSilvertail https://github.com/VitaAetaerna/SubnetExerciseGenerator/")
|
||||||
def intToDotted(ip):
|
def intToDotted(ip):
|
||||||
# input: ip
|
# input: ip
|
||||||
# determins dotted decimal format for given ip as int
|
# determins dotted decimal format for given ip as int
|
||||||
@@ -152,4 +152,6 @@ if __name__ == '__main__':
|
|||||||
subnet=analyseSubnet(net.get("nid")+listnetwork*2**(32-newprefix), newprefix)
|
subnet=analyseSubnet(net.get("nid")+listnetwork*2**(32-newprefix), newprefix)
|
||||||
print("Network {}: NID: {} BC: {}".format(listnetwork, printDotted(subnet.get("nid")), printDotted(subnet.get("bc"))))
|
print("Network {}: NID: {} BC: {}".format(listnetwork, printDotted(subnet.get("nid")), printDotted(subnet.get("bc"))))
|
||||||
print("\nSubnets:")
|
print("\nSubnets:")
|
||||||
listSubnets(ip, prefix, newprefix)
|
listSubnets(ip, prefix, newprefix)
|
||||||
|
input("\nPress enter to exit\n")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user