[Dshield] updates to the Abuse desk email address tables.

Doug White doug at dwhite.ws
Sun Mar 2 14:06:40 GMT 2003

I know you are busy, especially with all the new and awesome charging, and
interface of the reporting pages.

A question, which remains on the back burner for the moment, is the abuse
contact email address tables.  Several of us volunteered to assist in updating
and maintaining this table, but then heard no more about it.

This snippet of perl code will do the lookup and return an array containing the
contact addresses:

# look up contacts from abuse.net
use Net::DNS;
sub ablookup {
    my ($domain) = @_;
    my ($res, $query, @r);

    $res = new Net::DNS::Resolver;
    while(1) {
        $query = $res->search("$domain.contacts.abuse.net", "TXT");
        if ($query) {
            my $rr;

            foreach $rr ($query->answer) {
                push @r, $rr->txtdata if $rr->type eq "TXT";
            return @r;
        } else { # Net::DNS rejects special characters, strip off
                 # subdomains and see if a parent domain works
            if($domain =~ m{^[^.]+\.([^.]+\..+)}) {
                $domain = $1;
            } else {
                die "Cannot lookup contacts for $domain";

Got DSL?  Check it out!
For hosting solutions http://www.clickdoug.com
ISP rated: http://www.forta.com/cf/isp/isp.cfm?isp_id=772
If you are not satisfied with my service, my job isn't done!


More information about the list mailing list