Changeset 67 for trunk/dnsbl/delist-ip


Ignore:
Timestamp:
01/09/18 18:12:13 (6 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

Review and update copyright dates on DNSBL.pm, DNSBLweb.pm, browse.cgi,

delist-ip, dnsbl.cgi, and export-dnsbl. Also add a version requirement
on DNSBL.pm in any callers.

Update browse.cgi with limited search and some operational-sanity boundaries

instead of blindly barfing out the entire dataset, requiring code changes
to view only a subset of data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/delist-ip

    r40 r67  
    33##
    44# $Id$
    5 # Copyright 2011, 2012 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2011, 2012, 2018 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    2323use DBI;
    2424
    25 use DNSBL;
     25use DNSBL 2.2;
    2626
    2727my $dnsbl = new DNSBL;
     
    5959my $removeme = $ARGV[0];
    6060
    61 $sth = $dbh->prepare("SELECT ip,count,s4list,added FROM iplist WHERE ip=?");
     61$sth = $dbh->prepare("SELECT ip,count,s4list,added,exclude FROM iplist WHERE ip=?");
    6262$sth->execute($removeme);
    63 my ($ip,$count,$s4list,$added) = $sth->fetchrow_array;
     63my ($ip,$count,$s4list,$added,$exclude) = $sth->fetchrow_array;
    6464
    6565die "IP $removeme not found.  Exiting.\n" if !$ip;
     
    6969local $dbh->{RaiseError} = 1;
    7070eval {
    71   $sth = $dbh->prepare("INSERT INTO waslisted (ip,count,s4list,origadded) VALUES (?,?,?,?)");
    72   $sth->execute($ip,$count,$s4list,$added);
     71  $sth = $dbh->prepare("INSERT INTO waslisted (ip,count,s4list,origadded,exclude) VALUES (?,?,?,?,?)");
     72  $sth->execute($ip,$count,$s4list,$added,$exclude);
    7373  $sth = $dbh->prepare("DELETE FROM iplist WHERE ip=?");
    7474  $sth->execute($ip);
Note: See TracChangeset for help on using the changeset viewer.