| |
---|
| | |
---|
| | # Program Information |
---|
| | |
---|
| | PROGNAME = "perimiter.py" |
---|
| | RCSID = "$Id: tperimeter.py,v 1.100 2006/04/28 21:29:13 tundra Exp $" |
---|
| | RCSID = "$Id: tperimeter.py,v 1.101 2006/04/29 07:35:53 tundra Exp $" |
---|
| | |
---|
| | import os, re, sys |
---|
| | |
---|
| | ##### |
---|
| |
---|
| | 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("."): |
---|
| | if not (0 <= int(q) <= 255): |
---|
| | Error("IP Address Component Is Out Of Range (%s Not Between 0-255)" % q) |
---|
| | |
---|
| | # Make sure address is not on the forbidden list |
---|
| | |
---|
| | if address in Forbidden: |
---|
| | Error("You Are Not Permitted To Enable Access For Address: %s" % address) |
---|
| | |
---|
| | |
---|
| | ##### |
---|
| | # Output Content |
---|
| | ##### |
---|
| |
---|
| | |