NAME

WebService::AbuseIPDB::CheckBlockResponse - Specific class for responses to check_block method

SYNOPSIS

The check_block method of WebService::AbuseIPDB will return an object of this class. It is a subclass of the generic WebService::AbuseIPDB::Response class.

use WebService::AbuseIPDB;

my $ipdb = WebService::AbuseIPDB->new (key => 'abc123...');
my $res = $ipdb->check_block (ip => '127.0.0.0/24');
unless ($res->successful) {
    for my $err (@{$res->errors}) {
        warn "Error $err->{status}: $err->{detail}\n";
    }
    die "Cannot continue.\n";
}
printf "%s/%s has %i possible addresses\n",
    $res->network, $res->netmask, $res->num_addr;

METHODS

The new, successful and errors methods are inherited from WebService::AbuseIPDB::Response. All other methods are accessors as listed here.

network

Returns the base IP address of this network.

netmask

Returns the netmask in dotted-quad format.

min_addr

Returns the address of the first usable address in this subnet.

max_addr

Returns the address of the last usable address in this subnet.

num_addr

Returns the maximum number of usable addresses in this subnet.

usage_type

Returns the usage type of this IP address, according to AbuseIPDB records.

reports

Returns an array of WebService::AbuseIPDB::ReportedAddress objects each of which provides a summary of the reports of one address within the subnet.

STABILITY

This is currently alpha software. Be aware that both the internals and the interface are liable to change.

AUTHOR

Pete Houston, <cpan at openstrike.co.uk>

SEE ALSO

WebService::AbuseIPDB for general use of the client, WebService::AbuseIPDB::Response for the parent class and Version 2 of the AbuseIPDB API for API details/restrictions.

LICENCE AND COPYRIGHT

Copyright © 2020 Pete Houston

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991 or at your option any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is available in the source tree; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA