Identifier/Plugin/DigitalOcean.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 32 CC 1 SCAR 6.9
CC
1
Cov
0%
new
2.0
name
2.0
BEGIN
2.0
CRAP 2.0
1 #===============================================================================
2 # PODNAME: Net::IP::Identifier::Plugin::DigitalOcean
3 # ABSTRACT: identify DigitalOcean owned IP addresses
4 #
5 # AUTHOR: Reid Augustin (REID)
6 # EMAIL: reid@hellosix.com
7 # CREATED: Tue Nov 11 10:29:26 PST 2014
8 #===============================================================================
9  
10 use 5.008;
11 use strict;
12 use warnings;
13  
14 package Net::IP::Identifier::Plugin::DigitalOcean;
15  
16 use Role::Tiny::With;
17 with qw( Net::IP::Identifier_Role );
18  
19 our $VERSION = '0.106'; # VERSION
20  
21 sub new {
22 my ($class, %opts) = @_;
23  
24 my $self = {};
25 bless $self, (ref $class || $class);
26  
27 # List of known DigitalOcean IP blocks as of March 2015
28 # AS62567 AS393406 AS202109 AS202018 AS201229 AS200130 AS14061 AS133165
29 $self->ips(
30 # 25 Network Blocks
31 # extending 5.101.96.0/21 to include 5.101.104.0/21
32 '5.101.96.0/20',
33 '37.139.0.0/19',
34 '45.55.0.0/16',
35 '46.101.0.0/16',
36 '80.240.128.0/20',
37 '82.196.0.0/20',
38 '95.85.0.0/18',
39 '103.253.144.0/22',
40 '104.131.0.0/16',
41 '104.236.0.0/16',
42 '107.170.0.0/16',
43 '162.243.0.0/16',
44 '178.62.0.0/17',
45 '185.14.184.0/22',
46 '188.166.0.0/16',
47 '188.226.128.0/17',
48 '192.34.56.0/21',
49 '192.81.208.0/20',
50 '192.241.128.0/17',
51 '198.199.64.0/18',
52 '198.211.96.0/19',
53 '208.68.36.0/22',
54 '2400:6180::/32',
55 '2604:a880::/32',
56 '2a03:b0c0::/32',
57 );
58 return $self;
59 }
60  
61 sub name {
62 return 'DigitalOcean';
63 }
64  
65 1;
66  
67 __END__