diff -Nru libnet-abuse-utils-perl-0.26/Changes libnet-abuse-utils-perl-0.27/Changes --- libnet-abuse-utils-perl-0.26/Changes 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/Changes 2018-07-01 01:37:14.000000000 +0000 @@ -1,5 +1,8 @@ Revision history for Perl extension Net::Abuse::Utils. +0.27 2018-06-30 21:37:10 EDT + - replace unmaintained Email::Address with Email::Address::XS + 0.26 2018-06-19 22:31:16 MDT - only return abuse-mailbox from get_ipwi_contacts if we got the field diff -Nru libnet-abuse-utils-perl-0.26/cpanfile libnet-abuse-utils-perl-0.27/cpanfile --- libnet-abuse-utils-perl-0.26/cpanfile 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/cpanfile 2018-07-01 01:37:14.000000000 +0000 @@ -1,5 +1,5 @@ requires 'perl', '5.006'; -requires 'Email::Address'; +requires 'Email::Address::XS'; requires 'Net::DNS'; requires 'Net::Whois::IP', 1.11; requires 'Net::IP'; diff -Nru libnet-abuse-utils-perl-0.26/debian/changelog libnet-abuse-utils-perl-0.27/debian/changelog --- libnet-abuse-utils-perl-0.26/debian/changelog 2018-06-27 00:33:20.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/debian/changelog 2018-07-03 20:27:56.000000000 +0000 @@ -1,3 +1,15 @@ +libnet-abuse-utils-perl (0.27-1) unstable; urgency=medium + + * Team upload + + * Import upstream version 0.27 (closes: #887546) + * Update copyright years + * Switch to Email::Address::XS (build-)dependencies + * Drop version on libnet-whois-ip-perl (build-)dependency (only newer + versions in the archive) + + -- Florian Schlichting Tue, 03 Jul 2018 22:27:56 +0200 + libnet-abuse-utils-perl (0.26-1) unstable; urgency=medium [ Salvatore Bonaccorso ] diff -Nru libnet-abuse-utils-perl-0.26/debian/control libnet-abuse-utils-perl-0.27/debian/control --- libnet-abuse-utils-perl-0.26/debian/control 2018-06-27 00:31:36.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/debian/control 2018-07-03 20:26:15.000000000 +0000 @@ -5,10 +5,10 @@ Uploaders: Axel Beckert Build-Depends: debhelper (>= 11~) Build-Depends-Indep: dh-exec, - libemail-address-perl, + libemail-address-xs-perl, libnet-dns-perl, libnet-ip-perl, - libnet-whois-ip-perl (>= 1.11), + libnet-whois-ip-perl, perl Standards-Version: 4.1.4 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libnet-abuse-utils-perl @@ -18,10 +18,10 @@ Package: libnet-abuse-utils-perl Architecture: all -Depends: libemail-address-perl, +Depends: libemail-address-xs-perl, libnet-dns-perl, libnet-ip-perl, - libnet-whois-ip-perl (>= 1.11), + libnet-whois-ip-perl, ${misc:Depends}, ${perl:Depends} Description: Routines useful for processing network abuse diff -Nru libnet-abuse-utils-perl-0.26/debian/copyright libnet-abuse-utils-perl-0.27/debian/copyright --- libnet-abuse-utils-perl-0.26/debian/copyright 2016-12-10 01:26:53.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/debian/copyright 2018-07-03 20:23:59.000000000 +0000 @@ -4,7 +4,7 @@ Upstream-Name: Net-Abuse-Utils Files: * -Copyright: 2013 Mike Greb , Wes Young +Copyright: 2013-2018 Mike Greb , Wes Young License: Artistic or GPL-1+ Files: debian/* diff -Nru libnet-abuse-utils-perl-0.26/lib/Net/Abuse/Utils.pm libnet-abuse-utils-perl-0.27/lib/Net/Abuse/Utils.pm --- libnet-abuse-utils-perl-0.26/lib/Net/Abuse/Utils.pm 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/lib/Net/Abuse/Utils.pm 2018-07-01 01:37:14.000000000 +0000 @@ -7,7 +7,7 @@ use Net::DNS; use Net::Whois::IP 1.11 'whoisip_query'; -use Email::Address; +use Email::Address::XS; use Net::IP; # use Memoize; @@ -22,7 +22,7 @@ ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); -our $VERSION = '0.26'; +our $VERSION = '0.27'; $VERSION = eval $VERSION; # memoize('_return_rr'); @@ -119,10 +119,10 @@ my @fields = exists $response->{'abuse-mailbox'} ? ( 'abuse-mailbox' ) : keys %$response; foreach my $field (@fields) { - push @addresses, Email::Address->parse($response->{$field}); + push @addresses, Email::Address::XS->parse($response->{$field}); } - @addresses = map { $_->address } @addresses; + @addresses = grep { defined $_ } map { $_->address } @addresses; return _return_unique (\@addresses); } @@ -346,7 +346,7 @@ =head1 VERSION -version 0.26 +version 0.27 =head1 SYNOPSIS @@ -361,14 +361,6 @@ ASN/network info, reverse dns, and DNSBL listing status. Functions which take an IP accept either IPv6 or IPv4 IPs unless indicated otherwise. -=head1 NAME - -Net::Abuse::Utils - Routines useful for processing network abuse - -=head1 VERSION - -version 0.25 - =head1 CONFIGURATION There is a C<@RESOLVERS> package variable you can use to specify name servers @@ -466,7 +458,7 @@ This module makes use of the following modules: -L, L, L, and L +L, L, L, and L =head1 BUGS AND LIMITATIONS @@ -512,6 +504,27 @@ This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. + +=head1 AUTHORS + +=over 4 + +=item * + +mikegrb + +=item * + +Wes Young + +=back + +=head1 COPYRIGHT AND LICENSE + +This software is copyright (c) 2013-2018 by Michael Greb + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. =head1 AUTHORS diff -Nru libnet-abuse-utils-perl-0.26/Makefile.PL libnet-abuse-utils-perl-0.27/Makefile.PL --- libnet-abuse-utils-perl-0.26/Makefile.PL 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/Makefile.PL 2018-07-01 01:37:14.000000000 +0000 @@ -1,5 +1,4 @@ - -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.021. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; @@ -7,8 +6,6 @@ use ExtUtils::MakeMaker; - - my %WriteMakefileArgs = ( "ABSTRACT" => "Routines useful for processing network abuse", "AUTHOR" => "mikegrb , Wes Young ", @@ -16,17 +13,16 @@ "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Net-Abuse-Utils", - "EXE_FILES" => [], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Net::Abuse::Utils", "PREREQ_PM" => { - "Email::Address" => 0, + "Email::Address::XS" => 0, "Net::DNS" => 0, "Net::IP" => 0, "Net::Whois::IP" => "1.11" }, - "VERSION" => "0.26", + "VERSION" => "0.27", "test" => { "TESTS" => "t/*.t" } @@ -34,8 +30,7 @@ my %FallbackPrereqs = ( - "Email::Address" => 0, - "ExtUtils::MakeMaker" => 0, + "Email::Address::XS" => 0, "Net::DNS" => 0, "Net::IP" => 0, "Net::Whois::IP" => "1.11" @@ -52,6 +47,3 @@ unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); - - - diff -Nru libnet-abuse-utils-perl-0.26/MANIFEST libnet-abuse-utils-perl-0.27/MANIFEST --- libnet-abuse-utils-perl-0.26/MANIFEST 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/MANIFEST 2018-07-01 01:37:14.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.021. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. Changes LICENSE MANIFEST @@ -13,6 +13,6 @@ lib/Net/Abuse/Utils.pm t/Net-Abuse-Utils-offline.t t/Net-Abuse-Utils.t +t/author-pod-syntax.t t/pod-coverage.t t/pod.t -t/release-pod-syntax.t diff -Nru libnet-abuse-utils-perl-0.26/META.json libnet-abuse-utils-perl-0.27/META.json --- libnet-abuse-utils-perl-0.26/META.json 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/META.json 2018-07-01 01:37:14.000000000 +0000 @@ -5,23 +5,23 @@ "Wes Young " ], "dynamic_config" : 0, - "generated_by" : "Dist::Milla version v1.0.8, Dist::Zilla version 5.021, CPAN::Meta::Converter version 2.142690", + "generated_by" : "Dist::Milla version v1.0.20, Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" + "version" : 2 }, "name" : "Net-Abuse-Utils", "no_index" : { "directory" : [ - "t", - "xt", + "eg", + "examples", "inc", "share", - "eg", - "examples" + "t", + "xt" ] }, "prereqs" : { @@ -32,13 +32,13 @@ }, "develop" : { "requires" : { - "Dist::Milla" : "v1.0.8", + "Dist::Milla" : "v1.0.20", "Test::Pod" : "1.41" } }, "runtime" : { "requires" : { - "Email::Address" : "0", + "Email::Address::XS" : "0", "Net::DNS" : "0", "Net::IP" : "0", "Net::Whois::IP" : "1.11", @@ -58,11 +58,15 @@ "web" : "https://github.com/mikegrb/Net-Abuse-Utils" } }, - "version" : "0.26", + "version" : "0.27", "x_contributors" : [ "Ben Bullock ", "Elmar S. Heeb ", + "Pali ", "Wes Young " - ] + ], + "x_generated_by_perl" : "v5.26.2", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.02", + "x_static_install" : 1 } diff -Nru libnet-abuse-utils-perl-0.26/META.yml libnet-abuse-utils-perl-0.27/META.yml --- libnet-abuse-utils-perl-0.26/META.yml 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/META.yml 2018-07-01 01:37:14.000000000 +0000 @@ -7,7 +7,7 @@ configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 -generated_by: 'Dist::Milla version v1.0.8, Dist::Zilla version 5.021, CPAN::Meta::Converter version 2.142690' +generated_by: 'Dist::Milla version v1.0.20, Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -15,14 +15,14 @@ name: Net-Abuse-Utils no_index: directory: - - t - - xt - - inc - - share - eg - examples + - inc + - share + - t + - xt requires: - Email::Address: '0' + Email::Address::XS: '0' Net::DNS: '0' Net::IP: '0' Net::Whois::IP: '1.11' @@ -31,8 +31,12 @@ bugtracker: https://github.com/mikegrb/Net-Abuse-Utils/issues homepage: https://github.com/mikegrb/Net-Abuse-Utils repository: https://github.com/mikegrb/Net-Abuse-Utils.git -version: '0.26' +version: '0.27' x_contributors: - 'Ben Bullock ' - 'Elmar S. Heeb ' + - 'Pali ' - 'Wes Young ' +x_generated_by_perl: v5.26.2 +x_serialization_backend: 'YAML::Tiny version 1.73' +x_static_install: 1 diff -Nru libnet-abuse-utils-perl-0.26/README libnet-abuse-utils-perl-0.27/README --- libnet-abuse-utils-perl-0.26/README 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/README 2018-07-01 01:37:14.000000000 +0000 @@ -1,117 +1,137 @@ NAME + Net::Abuse::Utils - Routines useful for processing network abuse VERSION - version 0.26 + + version 0.27 SYNOPSIS + use Net::Abuse::Utils qw( :all ); print "IP Whois Contacts: ", join( ' ', get_ipwi_contacts($ip) ), "\n"; print "Abuse.net Contacts: ", get_abusenet_contact($domain), "\n"; DESCRIPTION + Net::Abuse::Utils provides serveral functions useful for determining information about an IP address including contact/reporting addresses, - ASN/network info, reverse dns, and DNSBL listing status. Functions which - take an IP accept either IPv6 or IPv4 IPs unless indicated otherwise. - -NAME - Net::Abuse::Utils - Routines useful for processing network abuse - -VERSION - version 0.25 + ASN/network info, reverse dns, and DNSBL listing status. Functions + which take an IP accept either IPv6 or IPv4 IPs unless indicated + otherwise. CONFIGURATION + There is a @RESOLVERS package variable you can use to specify name servers different than the systems nameservers for queries from this module. If you intend to use Google's nameservers here, please see This issue on GitHub for a note of caution - . + . FUNCTIONS + The following functions are exportable from this module. You may import - all of them into your namespace with the ":all" tag. + all of them into your namespace with the :all tag. + + get_asn_info ( IP ) - get_asn_info ( IP ) Returns a list containing (ASN, Network/Mask, CC code, RIR, modified - date) for the network announcing "IP". + date) for the network announcing IP. + + get_all_asn_info ( IP ) - get_all_asn_info ( IP ) Returns a reference to a list of listrefs containting ASN(s), Network,Mask, CC code, RIR, and modified date fall all networks - announcing "IP". + announcing IP. + + get_peer_info ( IP ) - get_peer_info ( IP ) IPv4 Only. Returns an array of hash references containing (ASN, Network/Mask, CC code, RIR, modified date) for the peers of the network - announcing "IP". + announcing IP. + + get_as_description ( ASN ) - get_as_description ( ASN ) - Returns the AS description for "ASN". + Returns the AS description for ASN. - get_as_company ( ASN ) - Similiar to "get_as_description" but attempts to clean it up some before - returning it. + get_as_company ( ASN ) + + Similiar to "get_as_description" but attempts to clean it up some + before returning it. + + get_soa_contact( IP ) - get_soa_contact( IP ) Returns the SOA contact email address for the reverse DNS /24 zone - containing "IP". + containing IP. + + get_ipwi_contacts( IP ) - get_ipwi_contacts( IP ) - Returns a list of all email addresses found in whois information for - "IP" with duplicates removed. - - get_rdns( IP ) - Returns the reverse PTR for "IP". - - get_dnsbl_listing( IP, DNSBL zone ) - IPv4 Only. Returns the listing text for "IP" for the designated DNSBL. - "DNSBL zone" should be the zone used for looking up addresses in the + Returns a list of all email addresses found in whois information for IP + with duplicates removed. + + get_rdns( IP ) + + Returns the reverse PTR for IP. + + get_dnsbl_listing( IP, DNSBL zone ) + + IPv4 Only. Returns the listing text for IP for the designated DNSBL. + DNSBL zone should be the zone used for looking up addresses in the blocking list. - get_ip_country( IP ) - Returns the 2 letter country code for "IP". + get_ip_country( IP ) + + Returns the 2 letter country code for IP. + + get_asn_country( ASN ) - get_asn_country( ASN ) - Returns the 2 letter country code for "ASN". + Returns the 2 letter country code for ASN. - get_abusenet_contact ( domain ) - Returns the abuse.net listed contact email addresses for "domain". + get_abusenet_contact ( domain ) - is_ip ( IP ) - Returns true if "IP" looks like an IP, false otherwise. + Returns the abuse.net listed contact email addresses for domain. + + is_ip ( IP ) + + Returns true if IP looks like an IP, false otherwise. + + get_domain ( IP ) - get_domain ( IP ) Takes a hostname and attempts to return the domain name. - get_malware ( md5 ) + get_malware ( md5 ) + Takes a malware md5 hash and tests it against http://www.team-cymru.org/Services/MHR. Returns a HASHREF of last_seen and detection_rate. DIAGNOSTICS + Each subroutine will return undef if unsuccessful. In the future, debugging output will be available. CONFIGURATION AND ENVIRONMENT + There are two commented out lines that can be uncommented to enable - Memoize support. I haven't yet decided whether to include this option by - default. It may be made available in the future via an import flag to - use. + Memoize support. I haven't yet decided whether to include this option + by default. It may be made available in the future via an import flag + to use. DEPENDENCIES + This module makes use of the following modules: - Net::IP, Net::DNS, Net::Whois::IP, and Email::Address + Net::IP, Net::DNS, Net::Whois::IP, and Email::Address::XS BUGS AND LIMITATIONS + There are no known bugs in this module. Please report problems to Michael Greb (mgreb@linode.com) Patches are welcome. ACKNOWLEDGEMENTS + This module was inspired by Karsten M. Self's SpamTools shell scripts, available at http://linuxmafia.com/~karsten/. @@ -123,26 +143,44 @@ module. SEE ALSO - For a detailed usage example, please see examples/ip-info.pl included in - this module's distribution. + + For a detailed usage example, please see examples/ip-info.pl included + in this module's distribution. AUTHORS - * mikegrb - * Wes Young + * mikegrb + + * Wes Young COPYRIGHT AND LICENSE + This software is copyright (c) 2013 by Mike Greb. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. AUTHORS - * mikegrb - * Wes Young + * mikegrb + + * Wes Young + +COPYRIGHT AND LICENSE + + This software is copyright (c) 2013-2018 by Michael Greb + + This is free software; you can redistribute it and/or modify it under + the same terms as the Perl 5 programming language system itself. + +AUTHORS + + * mikegrb + + * Wes Young COPYRIGHT AND LICENSE + This software is copyright (c) 2013 by =over 4. This is free software; you can redistribute it and/or modify it under diff -Nru libnet-abuse-utils-perl-0.26/t/author-pod-syntax.t libnet-abuse-utils-perl-0.27/t/author-pod-syntax.t --- libnet-abuse-utils-perl-0.26/t/author-pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/t/author-pod-syntax.t 2018-07-01 01:37:14.000000000 +0000 @@ -0,0 +1,15 @@ +#!perl + +BEGIN { + unless ($ENV{AUTHOR_TESTING}) { + print qq{1..0 # SKIP these tests are for testing by the author\n}; + exit + } +} + +# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. +use strict; use warnings; +use Test::More; +use Test::Pod 1.41; + +all_pod_files_ok(); diff -Nru libnet-abuse-utils-perl-0.26/t/release-pod-syntax.t libnet-abuse-utils-perl-0.27/t/release-pod-syntax.t --- libnet-abuse-utils-perl-0.26/t/release-pod-syntax.t 2018-06-20 04:31:21.000000000 +0000 +++ libnet-abuse-utils-perl-0.27/t/release-pod-syntax.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -#!perl - -BEGIN { - unless ($ENV{RELEASE_TESTING}) { - require Test::More; - Test::More::plan(skip_all => 'these tests are for release candidate testing'); - } -} - -# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. -use Test::More; -use Test::Pod 1.41; - -all_pod_files_ok();