| |
---|
| | ANS = ";; ANSWER SECTION:" |
---|
| | AUTH = ";; AUTHORITY SECTION:" |
---|
| | DIG = "/usr/bin/dig -t ptr -x " |
---|
| | LOG = "/var/log/messages" |
---|
| | OUT = "./abusers" |
---|
| | |
---|
| | VERSION = "$Id: abck,v 1.1 2001/07/16 20:00:50 tundra Exp $" |
---|
| | OUT = "./ABUSERS" |
---|
| | |
---|
| | VERSION = "$Id: abck,v 1.2 2001/07/16 20:22:20 tundra Exp $" |
---|
| | |
---|
| | #################### |
---|
| | # Data Structures |
---|
| | #################### |
---|
| |
---|
| | for logrecord in logfile.read().splitlines(): |
---|
| | |
---|
| | # Go check the record in no command line constraint given |
---|
| | # or a constraint is given and exits in the record |
---|
| | if not sys.argv[1] or logrecord.count(sys.argv[1]): |
---|
| | if (len(sys.argv) == 1) or logrecord.count(sys.argv[1]): |
---|
| | |
---|
| | sendto = ProcessLogRecord(logrecord) |
---|
| | if sendto: |
---|
| | abuserfile.write("abnot \"" + logrecord + "\" " + |
---|
| |
---|
| | |