| 1 | #=============================================================================== | ||||||||||||||||||||
| 2 | # PODNAME: Net::IP::Identifier::Plugin::Amazon | ||||||||||||||||||||
| 3 | # ABSTRACT: identify Amazon owned IP addresses | ||||||||||||||||||||
| 4 | # | ||||||||||||||||||||
| 5 | # AUTHOR: Reid Augustin (REID) | ||||||||||||||||||||
| 6 | # EMAIL: reid@hellosix.com | ||||||||||||||||||||
| 7 | # CREATED: Sun Nov 16 17:18:54 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::Amazon; | ||||||||||||||||||||
| 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
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | # List of known Amazon IP blocks as of May 2015 | ||||||||||||||||||||
| 28 | # AS9059 AS8987 AS7224 AS58588 AS39111 AS38895 AS17493 AS16509 AS14618 AS10124 | ||||||||||||||||||||
| 29 | 1 | $self->ips( | |||||||||||||||||||
| 30 | # 43 Network Blocks | ||||||||||||||||||||
| 31 | # extending 8.18.144.0/24 to include 8.18.145.0/24 | ||||||||||||||||||||
| 32 | '8.18.144.0/23', | ||||||||||||||||||||
| 33 | '23.20.0.0/14', | ||||||||||||||||||||
| 34 | '27.0.0.0/22', | ||||||||||||||||||||
| 35 | '46.51.128.0/17', | ||||||||||||||||||||
| 36 | '46.137.0.0/16', | ||||||||||||||||||||
| 37 | '50.16.0.0/14', | ||||||||||||||||||||
| 38 | '50.112.0.0/16', | ||||||||||||||||||||
| 39 | '52.0.0.0/11', | ||||||||||||||||||||
| 40 | # extending 54.64.0.0/13 to include 54.72.0.0/13 | ||||||||||||||||||||
| 41 | # extending 54.64.0.0/12 to include 54.80.0.0/12 | ||||||||||||||||||||
| 42 | '54.64.0.0/11', | ||||||||||||||||||||
| 43 | # extending 54.144.0.0/12 to include 54.160.0.0/12 | ||||||||||||||||||||
| 44 | # extending 54.144.0.0-54.175.255.255 to include 54.176.0.0/12 | ||||||||||||||||||||
| 45 | # extending 54.144.0.0-54.191.255.255 to include 54.192.0.0/12 | ||||||||||||||||||||
| 46 | # extending 54.144.0.0-54.207.255.255 to include 54.208.0.0/13 | ||||||||||||||||||||
| 47 | # extending 54.144.0.0-54.215.255.255 to include 54.216.0.0/14 | ||||||||||||||||||||
| 48 | # extending 54.144.0.0-54.219.255.255 to include 54.220.0.0/15 | ||||||||||||||||||||
| 49 | '54.144.0.0-54.221.255.255', | ||||||||||||||||||||
| 50 | # extending 54.224.0.0/12 to include 54.240.0.0/12 | ||||||||||||||||||||
| 51 | '54.224.0.0/11', | ||||||||||||||||||||
| 52 | '67.202.0.0/18', | ||||||||||||||||||||
| 53 | '72.21.192.0/19', | ||||||||||||||||||||
| 54 | '72.44.32.0/19', | ||||||||||||||||||||
| 55 | '75.101.128.0/17', | ||||||||||||||||||||
| 56 | '79.125.0.0/17', | ||||||||||||||||||||
| 57 | '87.238.80.0/21', | ||||||||||||||||||||
| 58 | '96.127.0.0/17', | ||||||||||||||||||||
| 59 | '103.246.148.0/22', | ||||||||||||||||||||
| 60 | '107.20.0.0/14', | ||||||||||||||||||||
| 61 | '122.248.192.0/18', | ||||||||||||||||||||
| 62 | '174.129.0.0/16', | ||||||||||||||||||||
| 63 | '176.32.64.0/18', | ||||||||||||||||||||
| 64 | '176.34.0.0/16', | ||||||||||||||||||||
| 65 | '178.236.0.0/20', | ||||||||||||||||||||
| 66 | '184.72.0.0/15', | ||||||||||||||||||||
| 67 | '184.169.128.0/17', | ||||||||||||||||||||
| 68 | '185.48.120.0/22', | ||||||||||||||||||||
| 69 | '199.127.232.0/22', | ||||||||||||||||||||
| 70 | '199.255.192.0/22', | ||||||||||||||||||||
| 71 | '203.83.220.0/22', | ||||||||||||||||||||
| 72 | '204.236.128.0/17', | ||||||||||||||||||||
| 73 | '204.246.160.0/19', | ||||||||||||||||||||
| 74 | '205.251.192.0/18', | ||||||||||||||||||||
| 75 | '207.171.160.0/19', | ||||||||||||||||||||
| 76 | '216.137.32.0/19', | ||||||||||||||||||||
| 77 | '216.182.224.0/20', | ||||||||||||||||||||
| 78 | '2400:6500::/32', | ||||||||||||||||||||
| 79 | '2403:b300::/32', | ||||||||||||||||||||
| 80 | '2406:da00::/24', | ||||||||||||||||||||
| 81 | '2620:107:3000::/44', | ||||||||||||||||||||
| 82 | '2620:108:7000::/44', | ||||||||||||||||||||
| 83 | '2a01:578::/32', | ||||||||||||||||||||
| 84 | ); | ||||||||||||||||||||
| 85 | 1 | return $self; | |||||||||||||||||||
| 86 | } | ||||||||||||||||||||
| 87 | |||||||||||||||||||||
| 88 | 1 | ▶ | sub name { | ||||||||||||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||
| 89 | 1 | return 'Amazon'; | |||||||||||||||||||
| 90 | } | ||||||||||||||||||||
| 91 | |||||||||||||||||||||
| 92 | 1 | 1; | |||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | __END__ | ||||||||||||||||||||