Identifier/Plugin/Comcast.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 50.0% 1 / 2 totaltotal 84.8% 28 / 33 CC 2 SCAR 2.7
CC
2
Cov
91%
new
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Identifier/Plugin/ColoCrossing.pm ↑ Summary Identifier/Plugin/DataShack.pm »
1 #===============================================================================
2 # PODNAME: Net::IP::Identifier::Plugin::Comcast
3 # ABSTRACT: identify Comcast owned IP addresses
4 #
5 # AUTHOR: Reid Augustin (REID)
6 # EMAIL: reid@hellosix.com
7 # CREATED: Thu Nov 6 11:03:17 PST 2014
8 #===============================================================================
9  
10 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 package Net::IP::Identifier::Plugin::Comcast;
15  
16 1 ▶use Role::Tiny::With;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 1 with qw( Net::IP::Identifier_Role );
18  
19 1 our $VERSION = '0.111'; # VERSION
20  
21 1 ▶sub new {
Subroutine new: called CC=2 SCAR=7.2
Pod documented
22 1 my ($class, %opts) = @_;
23  
24 1 my $self = {};
25 1 ▶ bless $self, (ref $class || $class);
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
010
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
26  
27 # List of known Comcast IP blocks as of May 2015
28 1 $self->ips(
29 # 89 Network Blocks
30 '12.41.68.0/22',
31 '12.109.232.0/22',
32 '23.24.0.0/15',
33 '23.30.0.0/15',
34 '23.68.0.0/14',
35 # extending 24.0.0.0/12 to include 24.16.0.0/13
36 '24.0.0.0-24.23.255.255',
37 # extending 24.30.0.0/18 to include 24.30.64.0/19
38 # extending 24.30.0.0-24.30.95.255 to include 24.30.96.0/19
39 '24.30.0.0/17',
40 '24.34.0.0/16',
41 # extending 24.40.0.0/18 to include 24.40.64.0/20
42 '24.40.0.0-24.40.79.255',
43 '24.60.0.0/14',
44 '24.91.0.0/16',
45 '24.98.0.0/15',
46 # extending 24.104.0.0/17 to include 24.104.128.0/19
47 '24.104.0.0-24.104.159.255',
48 '24.118.0.0/16',
49 # extending 24.124.128.0/17 to include 24.125.0.0/16
50 # extending 24.124.128.0-24.125.255.255 to include 24.126.0.0/15
51 # extending 24.124.128.0-24.127.255.255 to include 24.128.0.0/16
52 # extending 24.124.128.0-24.128.255.255 to include 24.129.0.0/17
53 '24.124.128.0-24.129.127.255',
54 '24.130.0.0/15',
55 '24.147.0.0/16',
56 '24.149.128.0/17',
57 '24.153.64.0/19',
58 '24.218.0.0/16',
59 '24.245.0.0/18',
60 '50.73.0.0/16',
61 '50.76.0.0/14',
62 '50.128.0.0/9',
63 '64.56.32.0/19',
64 '64.78.64.0/18',
65 '64.139.64.0/19',
66 '64.235.160.0/19',
67 '65.34.128.0/17',
68 # extending 65.96.0.0/16 to include 65.97.0.0/19
69 '65.96.0.0-65.97.31.255',
70 '66.30.0.0/15',
71 '66.41.0.0/16',
72 '66.56.0.0/18',
73 '66.176.0.0/15',
74 '66.208.192.0/18',
75 '66.229.0.0/16',
76 '66.240.0.0/18',
77 '67.160.0.0/11',
78 '68.32.0.0/11',
79 '68.80.0.0/13',
80 '69.136.0.0/13',
81 '69.180.0.0/15',
82 '69.240.0.0/12',
83 '70.88.0.0/14',
84 '71.24.0.0/14',
85 '71.56.0.0/13',
86 '71.192.0.0/12',
87 '71.224.0.0/12',
88 '72.55.0.0/17',
89 '73.0.0.0/8',
90 '74.16.0.0/12',
91 '74.81.128.0/19',
92 '74.92.0.0/14',
93 '74.144.0.0/12',
94 # extending 75.64.0.0/13 to include 75.72.0.0/15
95 # extending 75.64.0.0-75.73.255.255 to include 75.74.0.0/16
96 # extending 75.64.0.0-75.74.255.255 to include 75.75.0.0/17
97 # extending 75.64.0.0-75.75.127.255 to include 75.75.128.0/18
98 '75.64.0.0-75.75.191.255',
99 '75.144.0.0/13',
100 '76.16.0.0/12',
101 # extending 76.96.0.0/11 to include 76.128.0.0/11
102 '76.96.0.0-76.159.255.255',
103 # extending 96.64.0.0/11 to include 96.96.0.0/12
104 # extending 96.64.0.0-96.111.255.255 to include 96.112.0.0/13
105 # extending 96.64.0.0-96.119.255.255 to include 96.120.0.0/14
106 # extending 96.64.0.0-96.123.255.255 to include 96.124.0.0/16
107 '96.64.0.0-96.124.255.255',
108 # extending 96.128.0.0/10 to include 96.192.0.0/11
109 '96.128.0.0-96.223.255.255',
110 '98.32.0.0/11',
111 '98.192.0.0/10',
112 # extending 107.0.0.0/14 to include 107.4.0.0/15
113 '107.0.0.0-107.5.255.255',
114 '108.171.224.0/20',
115 '147.191.0.0/16',
116 '162.17.0.0/16',
117 '162.148.0.0/14',
118 '165.137.0.0/16',
119 '169.152.0.0/16',
120 '172.244.0.0/16',
121 '173.8.0.0/13',
122 '173.160.0.0/13',
123 '174.48.0.0/12',
124 '174.160.0.0/11',
125 # extending 184.108.0.0/14 to include 184.112.0.0/12
126 '184.108.0.0-184.127.255.255',
127 '198.0.0.0/16',
128 '198.137.252.0/23',
129 '198.178.8.0/21',
130 '199.182.100.0/22',
131 '206.18.184.0/24',
132 '207.223.0.0/20',
133 '208.39.128.0/18',
134 '208.110.192.0/19',
135 '209.23.192.0/18',
136 '216.45.128.0/17',
137 # extending 2001:558::/31 to include 2001:55a::/31
138 # extending 2001:558::/30 to include 2001:55c::/30
139 '2001:558::/29',
140 '2601::/20',
141 '2604:6a00::/32',
142 '2620:fd:8000::/48',
143 );
144 1 return $self;
145 }
146  
147 1 ▶sub name {
Subroutine name: called CC=1 SCAR=0.0
Pod undocumented
148 1 return 'Comcast';
149 }
150  
151 1 1;
152  
153 __END__
« Identifier/Plugin/ColoCrossing.pm ↑ Summary Identifier/Plugin/DataShack.pm »