Skip to content

Instantly share code, notes, and snippets.

@four0four
Created July 24, 2012 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save four0four/3170998 to your computer and use it in GitHub Desktop.
Save four0four/3170998 to your computer and use it in GitHub Desktop.
Simple test "framework" for the networkClasses module/hackery
#!/usr/bin/python2
import networkClasses
test = networkClasses.Subnet("192.168.0.1","255.255.0.0")
#test = networkClasses.Subnet("192.168.0.1/16")
print ".toIPaddress(): " + str(test.toIPaddress())
print ".toBroadcast(): " + str(test.toBroadcast())
print ".toNetmask(): " + str(test.toNetmask())
print ".toSubnet(): " + str(test.toSubnet())
print ".toSubnetZeroed(): " + str(test.toSubnetZeroed())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment