| | #!/usr/local/bin/python |
---|
| | #!/usr/bin/env python |
---|
| | # tperimeter.py |
---|
| | # Copyright (c) 2006-2012 TundraWare Inc. All Rights Reserved. |
---|
| | # Copyright (c) 2006-2020 TundraWare Inc. All Rights Reserved. |
---|
| | # For Updates See: http://www.tundraware.com/Software/tperimeter |
---|
| | |
---|
| | # Program Information |
---|
| | |
---|
| |
---|
| | ##### |
---|
| | |
---|
| | def Print(s): |
---|
| | |
---|
| | print "[User@%s] %s" % (requestor, s) |
---|
| | print(("[User@%s] %s" % (requestor, s))) |
---|
| | |
---|
| | ##### |
---|
| | # Error/Abort Routine |
---|
| | ##### |
---|
| |
---|
| | Print( "Please Try Again ...<br><br>") |
---|
| | sys.exit(1) |
---|
| | |
---|
| | # End of 'Error()' |
---|
| | |
---|
| | |
---|
| | |
---|
| | ##### |
---|
| | # Print The HTML Header |
---|
| | #### |
---|
| | |
---|
| | print "Content-type: text/html\n\n" |
---|
| | print("Content-type: text/html\n\n") |
---|
| | |
---|
| | ##### |
---|
| | # Process Passed Parameters |
---|
| | # Save locally in a variable of the same name |
---|
| |
---|
| | # Make sure address is in quad format |
---|
| | |
---|
| | if not re.match(IPQuad, address): |
---|
| | Error("You Must Specify Address In IP Quad Format") |
---|
| | |
---|
| | |
---|
| | |
---|
| | # Make sure each quad element is in range |
---|
| | |
---|
| | for q in address.split("."): |
---|
| |
---|
| | |