Changeset 25 for trunk/dnsbl/check-iplist.pl
- Timestamp:
- 09/03/10 15:18:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/check-iplist.pl
r2 r25 9 9 my $dnsbl = new DNSBL; 10 10 11 my $dbh = $dnsbl->connect; 11 # default DB info - all other settings should be loaded from the DB. 12 my $dbhost = "localhost"; 13 my $dbname = "dnsbl"; 14 my $dbuser = "dnsbl"; 15 my $dbpass = "spambgone"; 16 17 die "Need config argument\n" if !$ARGV[0]; 18 my $cfgname = shift @ARGV; 19 20 # Load a config ref containing DB host, name, user, and pass info based on 21 # from the server name + full script web path. This allows us to host 22 # multiple instances without having to duplicate the code. 23 # This file is a Perl fragment to be processed inline. 24 if (-e "/etc/dnsbl/$cfgname.conf") { 25 my $cfg = `cat /etc/dnsbl/$cfgname.conf`; 26 ($cfg) = ($cfg =~ /^(.+)$/s); # avoid warnings, failures, and general nastiness with taint mode 27 eval $cfg; 28 } 29 30 my $dbh = $dnsbl->connect($dbhost, $dbname, $dbuser, $dbpass); 12 31 13 32 print "checking IP containment...\n";
Note:
See TracChangeset
for help on using the changeset viewer.