GithubHelp home page GithubHelp logo

net-whois-ripe's Introduction

Hi there ๐Ÿ‘‹

I'm Arnaud ASSAD but you can also call me by my nickname : Arhuman.

I'm founder and jack of all trades at Doolta

โšก Other facts โšก:

  • I'm a proud Gopher (go lover), forever a Perl Monger (and was the 32th Saint on Perlmonks) and a learning Rustacean
  • I'm a Foss advocate from the very start (1993)
  • I was Service Manager of the French national Open Source support at Capgemini
  • I was a teacher (Perl, Security, OOP...)
  • I like to give talks
  • I like to blog
  • I like to produce podcasts about the Go langague (In French)

Arhuman's github stats

net-whois-ripe's People

Contributors

arhuman avatar moritz avatar pmgdeb avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

net-whois-ripe's Issues

t/305-APNIC.t started to fail

On my smoker systems:

Unknown method 'last_modified' for object Net::Whois::Object::Mntner::APNIC (Did the Database schema changed ?) at /home/cpansand/.cpan/build/2018012021/Net-Whois-RIPE-2.006002-0/blib/lib/Net/Whois/Generic.pm line 552.

#   Failed test 'Client performs queries without dying Can't require Net::Whois::Object::Mntner::IDNIC (No such file or directory) at /home/cpansand/.cpan/build/2018012021/Net-Whois-RIPE-2.006002-0/blib/lib/Net/Whois/Object.pm line 693, <GEN0> line 7.
# '
#   at t/305-APNIC.t line 17.

#   Failed test 'undef isa 'Net::Whois::Object::Mntner::APNIC''
#   at t/305-APNIC.t line 18.
#     undef isn't defined
Unknown method 'last_modified' for object Net::Whois::Object::InetNum::APNIC (Did the Database schema changed ?) at /home/cpansand/.cpan/build/2018012021/Net-Whois-RIPE-2.006002-0/blib/lib/Net/Whois/Generic.pm line 552.
# Looks like you failed 2 tests of 10.
t/305-APNIC.t ................. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/10 subtests 

Also, the last test reports on CPAN Testers are (at the time of this writing) all fail reports:
http://matrix.cpantesters.org/?dist=Net-Whois-RIPE%202.006002;reports=1#sl=7,1

"disconnected" is ignored in Net::Whois::Generic

the "disconnected" property is ignored in Net::Whois::Generic, so every query creates a new socket. So, with multiple queries per Net::Whois::Generic object, it gets really messy and the script fails because of too many open connections.

Unknown method 'country' for object Net::Whois::Object::Organisation (Did the Database schema changed ?)

RIPE seems to have updated its database schema to include the filed country in the organisation object:

l$ perl -Ilib -MData::Dumper  -MNet::Whois::Object -MNet::Whois::RIPE -wE 'say for Net::Whois::Object->new( Net::Whois::RIPE->new->query("ORG-nnA1-RIPE"))'
Unknown method 'country' for object Net::Whois::Object::Organisation (Did the Database schema changed ?) at -e line 1.
Net::Whois::Object::Information=HASH(0x55b39beba518)
Net::Whois::Object::Information=HASH(0x55b39beba380)
Net::Whois::Object::Information=HASH(0x55b39b6cc7f8)
Net::Whois::Object::Organisation=HASH(0x55b39b6ccfa8)
Net::Whois::Object::Information=HASH(0x55b39bea6af8)

This happens on the current master (commit aa24dcb, last tag was 2.007003) as well as on the released versions that I've tried.

This is how that object looks like (reduced to the interesting parts):

$ whois -h whois.ripe.net ORG-nnA1-RIPE|grep -A5 '^organisation:'
organisation:   ORG-nnA1-RIPE
org-name:       noris network AG
country:        DE
org-type:       LIR
address:        Thomas-Mann-Strasse 16-20
address:        90471

FAIL Installing Net::Whois::RIPE failed (Net-Whois-RIPE-2.006002.tar.gz)

Trying to install rpsltool. And using Net::Whois::RIPE as a dependency. But for some reason when running sudo cpanm Net::Whois::RIPE to install the module. I am hit with the below error.

As I am not a perl expert by any means. And not using perl based projects often. I unsure what to look for when diagnosing the error. Hence why I have crearted this issue on the bugtracker.

$ sudo cat /root/.cpanm/work/1536331547.23709/build.log
cpanm (App::cpanminus) 1.7044 on perl 5.024001 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1536331547.23709
You have make /usr/bin/make
You have LWP 6.15
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
Searching Net::Whois::RIPE () on cpanmetadb ...
--> Working on Net::Whois::RIPE
Fetching http://www.cpan.org/authors/id/A/AA/AASSAD/Net-Whois-RIPE-2.006002.tar.gz
-> OK
Unpacking Net-Whois-RIPE-2.006002.tar.gz
Entering Net-Whois-RIPE-2.006002
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.10_02)
Configuring Net-Whois-RIPE-2.006002
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::Whois::RIPE
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have Iterator 0 ... Yes (0.03)
Checking if you have Test::More 0 ... Yes (1.001014)
Building and testing Net-Whois-RIPE-2.006002
cp lib/Net/Whois/Object/FilterSet/AFRINIC.pm blib/lib/Net/Whois/Object/FilterSet/AFRINIC.pm
cp lib/Net/Whois/Object/Irt.pm blib/lib/Net/Whois/Object/Irt.pm
cp lib/Net/Whois/Object/FilterSet.pm blib/lib/Net/Whois/Object/FilterSet.pm
cp lib/Net/Whois/Object/AsBlock/AFRINIC.pm blib/lib/Net/Whois/Object/AsBlock/AFRINIC.pm
cp lib/Net/Whois/Object/Domain/AFRINIC.pm blib/lib/Net/Whois/Object/Domain/AFRINIC.pm
cp lib/Net/Whois/Object/InetNum/AFRINIC.pm blib/lib/Net/Whois/Object/InetNum/AFRINIC.pm
cp lib/Net/Whois/Object/Information.pm blib/lib/Net/Whois/Object/Information.pm
cp lib/Net/Whois/Object/AsSet.pm blib/lib/Net/Whois/Object/AsSet.pm
cp lib/Net/Whois/Object/InetNum/APNIC.pm blib/lib/Net/Whois/Object/InetNum/APNIC.pm
cp lib/Net/Whois/Object/Inet6Num/APNIC.pm blib/lib/Net/Whois/Object/Inet6Num/APNIC.pm
cp lib/Net/Whois/Object/KeyCert.pm blib/lib/Net/Whois/Object/KeyCert.pm
cp lib/Net/Whois/Object/AsSet/APNIC.pm blib/lib/Net/Whois/Object/AsSet/APNIC.pm
cp lib/Net/Whois/Object.pm blib/lib/Net/Whois/Object.pm
cp lib/Net/Whois/Object/InetRtr/AFRINIC.pm blib/lib/Net/Whois/Object/InetRtr/AFRINIC.pm
cp lib/Net/Whois/Object/Domain.pm blib/lib/Net/Whois/Object/Domain.pm
cp lib/Net/Whois/Object/Domain/APNIC.pm blib/lib/Net/Whois/Object/Domain/APNIC.pm
cp lib/Net/Whois/Object/InetRtr.pm blib/lib/Net/Whois/Object/InetRtr.pm
cp lib/Net/Whois/Object/InetNum.pm blib/lib/Net/Whois/Object/InetNum.pm
cp lib/Net/Whois/Object/AsBlock.pm blib/lib/Net/Whois/Object/AsBlock.pm
cp lib/Net/Whois/Object/AutNum/APNIC.pm blib/lib/Net/Whois/Object/AutNum/APNIC.pm
cp lib/Net/Whois/Object/Inet6Num.pm blib/lib/Net/Whois/Object/Inet6Num.pm
cp lib/Net/Whois/Object/KeyCert/APNIC.pm blib/lib/Net/Whois/Object/KeyCert/APNIC.pm
cp lib/Net/Whois/Object/AsSet/AFRINIC.pm blib/lib/Net/Whois/Object/AsSet/AFRINIC.pm
cp lib/Net/Whois/Object/AutNum/AFRINIC.pm blib/lib/Net/Whois/Object/AutNum/AFRINIC.pm
cp lib/Net/Whois/Object/Limerick.pm blib/lib/Net/Whois/Object/Limerick.pm
cp lib/Net/Whois/Object/Inet6Num/AFRINIC.pm blib/lib/Net/Whois/Object/Inet6Num/AFRINIC.pm
cp lib/Net/Whois/Object/Irt/APNIC.pm blib/lib/Net/Whois/Object/Irt/APNIC.pm
cp lib/Net/Whois/Object/Irt/AFRINIC.pm blib/lib/Net/Whois/Object/Irt/AFRINIC.pm
cp lib/Net/Whois/Object/FilterSet/APNIC.pm blib/lib/Net/Whois/Object/FilterSet/APNIC.pm
cp lib/Net/Whois/Generic.pm blib/lib/Net/Whois/Generic.pm
cp lib/Net/Whois/Object/Information/AFRINIC.pm blib/lib/Net/Whois/Object/Information/AFRINIC.pm
cp lib/Net/Whois/Object/AsBlock/APNIC.pm blib/lib/Net/Whois/Object/AsBlock/APNIC.pm
cp lib/Net/Whois/Object/KeyCert/AFRINIC.pm blib/lib/Net/Whois/Object/KeyCert/AFRINIC.pm
cp lib/Net/Whois/Object/AutNum.pm blib/lib/Net/Whois/Object/AutNum.pm
cp lib/Net/Whois/Object/PeeringSet.pm blib/lib/Net/Whois/Object/PeeringSet.pm
cp lib/Net/Whois/Object/Person/APNIC.pm blib/lib/Net/Whois/Object/Person/APNIC.pm
cp lib/Net/Whois/Object/RouteSet.pm blib/lib/Net/Whois/Object/RouteSet.pm
cp lib/Net/Whois/Object/PoeticForm/APNIC.pm blib/lib/Net/Whois/Object/PoeticForm/APNIC.pm
cp lib/Net/Whois/Object/Route6.pm blib/lib/Net/Whois/Object/Route6.pm
cp lib/Net/Whois/Object/RtrSet.pm blib/lib/Net/Whois/Object/RtrSet.pm
cp lib/Net/Whois/Object/Route6/APNIC.pm blib/lib/Net/Whois/Object/Route6/APNIC.pm
cp lib/Net/Whois/Object/Limerick/AFRINIC.pm blib/lib/Net/Whois/Object/Limerick/AFRINIC.pm
cp lib/Net/Whois/Object/Poem.pm blib/lib/Net/Whois/Object/Poem.pm
cp lib/Net/Whois/Object/Person/AFRINIC.pm blib/lib/Net/Whois/Object/Person/AFRINIC.pm
cp lib/Net/Whois/Object/Mntner.pm blib/lib/Net/Whois/Object/Mntner.pm
cp lib/Net/Whois/Object/Route/APNIC.pm blib/lib/Net/Whois/Object/Route/APNIC.pm
cp lib/Net/Whois/Object/Role.pm blib/lib/Net/Whois/Object/Role.pm
cp lib/Net/Whois/Object/Poem/APNIC.pm blib/lib/Net/Whois/Object/Poem/APNIC.pm
cp lib/Net/Whois/Object/Organisation.pm blib/lib/Net/Whois/Object/Organisation.pm
cp lib/Net/Whois/Object/Role/AFRINIC.pm blib/lib/Net/Whois/Object/Role/AFRINIC.pm
cp lib/Net/Whois/Object/PeeringSet/AFRINIC.pm blib/lib/Net/Whois/Object/PeeringSet/AFRINIC.pm
cp lib/Net/Whois/Object/Mntner/AFRINIC.pm blib/lib/Net/Whois/Object/Mntner/AFRINIC.pm
cp lib/Net/Whois/Object/Route6/AFRINIC.pm blib/lib/Net/Whois/Object/Route6/AFRINIC.pm
cp lib/Net/Whois/Object/Route/AFRINIC.pm blib/lib/Net/Whois/Object/Route/AFRINIC.pm
cp lib/Net/Whois/Object/PoeticForm.pm blib/lib/Net/Whois/Object/PoeticForm.pm
cp lib/Net/Whois/Object/RouteSet/AFRINIC.pm blib/lib/Net/Whois/Object/RouteSet/AFRINIC.pm
cp lib/Net/Whois/Object/Organisation/APNIC.pm blib/lib/Net/Whois/Object/Organisation/APNIC.pm
cp lib/Net/Whois/Object/RtrSet/AFRINIC.pm blib/lib/Net/Whois/Object/RtrSet/AFRINIC.pm
cp lib/Net/Whois/Object/PeeringSet/APNIC.pm blib/lib/Net/Whois/Object/PeeringSet/APNIC.pm
cp lib/Net/Whois/Object/RouteSet/APNIC.pm blib/lib/Net/Whois/Object/RouteSet/APNIC.pm
cp lib/Net/Whois/Object/Response.pm blib/lib/Net/Whois/Object/Response.pm
cp lib/Net/Whois/Object/Role/APNIC.pm blib/lib/Net/Whois/Object/Role/APNIC.pm
cp lib/Net/Whois/Object/Mntner/APNIC.pm blib/lib/Net/Whois/Object/Mntner/APNIC.pm
cp lib/Net/Whois/Object/RtrSet/APNIC.pm blib/lib/Net/Whois/Object/RtrSet/APNIC.pm
cp lib/Net/Whois/Object/Person.pm blib/lib/Net/Whois/Object/Person.pm
cp lib/Net/Whois/Object/Route.pm blib/lib/Net/Whois/Object/Route.pm
cp lib/Net/Whois/Object/Organisation/AFRINIC.pm blib/lib/Net/Whois/Object/Organisation/AFRINIC.pm
cp lib/Net/Whois/RIPE.pm blib/lib/Net/Whois/RIPE.pm
Manifying 28 pod documents
Manifying 28 pod documents
Manifying 12 pod documents
PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-changes.t ................ skipped: Test::CPAN::Changes required for this test
# Testing Net::Whois::RIPE 2.006002, Perl 5.024001, /usr/bin/perl
t/00-load.t ................... ok
t/01-instantiation.t .......... ok
t/02-methods.t ................ ok
t/03-objects.t ................ ok
t/04-generic.t ................ ok
t/105-AsBlock.t ............... ok
t/110-AutNum.t ................ ok
t/115-Person.t ................ ok
t/120-Role.t .................. ok
t/125-AsSet.t ................. ok
t/130-Domain.t ................ ok
t/135-InetNum.t ............... ok
t/140-Inet6Num.t .............. ok
t/145-InetRtr.t ............... ok
t/150-RtrSet.t ................ ok
t/155-Mntner.t ................ ok
t/160-KeyCert.t ............... ok
t/165-Route.t ................. ok
t/167-Route6.t ................ ok
t/170-RouteSet.t .............. ok
t/175-PeeringSet.t ............ ok
t/180-Limerick.t .............. ok
t/185-Poem.t .................. ok
t/187-PoeticForm.t ............ ok
t/190-Organisation.t .......... ok
t/195-Response.t .............. ok
t/200-Information.t ........... ok
t/205-Irt.t ................... ok
t/210-FilterSet.t ............. ok


Set TEST_MNTNER, TEST_MNTNER_PASSWORD environment vars for live testing
    TEST_MNTNER being a maintener's nic-hdl in the RIPE test database
    TEST_MNTNER_PASSWORD being its password

t/215-SyncUpdates.t ........... skipped: Set environment vars for server testing

Set TEST_MNTNER, TEST_MNTNER_PGPKEY environment vars for live testing
    TEST_MNTNER being a maintener's nic-hdl in the RIPE test database
    TEST_MNTNER_PGPKEY being the key ID of an key-cert associated with
    the maintainer object
t/216-SyncUpdates-Signed.t .... skipped: Set environment vars for server testing
t/300-AFRINIC.t ............... ok
Unknown method 'last_modified' for object Net::Whois::Object::Mntner::APNIC (Did the Database schema changed ?) at /root/.cpanm/work/1536331547.23709/Net-Whois-RIPE-2.006002/blib/lib/Net/Whois/Generic.pm line 552.

#   Failed test 'Client performs queries without dying Can't require Net::Whois::Object::Mntner::IDNIC (No such file or directory) at /root/.cpanm/work/1536331547.23709/Net-Whois-RIPE-2.006002/blib/lib/Net/Whois/Object.pm line 693, <GEN0> line 7.
# '
#   at t/305-APNIC.t line 17.

#   Failed test 'undef isa 'Net::Whois::Object::Mntner::APNIC''
#   at t/305-APNIC.t line 18.
#     undef isn't defined
Unknown method 'last_modified' for object Net::Whois::Object::InetNum::APNIC (Did the Database schema changed ?) at /root/.cpanm/work/1536331547.23709/Net-Whois-RIPE-2.006002/blib/lib/Net/Whois/Generic.pm line 552.
# Looks like you failed 2 tests of 10.
t/305-APNIC.t ................. 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/10 subtests 
t/boilerplate.t ............... skipped: Author tests not required to build this module
t/bug-disconnect.t ............ ok
t/bug-hostname-constructor.t .. ok
t/pod-coverage.t .............. skipped: Author tests not required to build this module
t/pod.t ....................... skipped: Author tests not required to build this module

Test Summary Report
-------------------
t/305-APNIC.t               (Wstat: 512 Tests: 10 Failed: 2)
  Failed tests:  3-4
  Non-zero exit status: 2
Files=39, Tests=3679,  6 wallclock secs ( 0.54 usr  0.09 sys +  3.75 cusr  0.74 csys =  5.12 CPU)
Result: FAIL
Failed 1/39 test programs. 2/3679 subtests failed.
Makefile:1238: recipe for target 'test_dynamic' failed
make: *** [test_dynamic] Error 255
-> FAIL Installing Net::Whois::RIPE failed. See /root/.cpanm/work/1536331547.23709/build.log for details. Retry with --force to force install it.

Net::Whois::Object throwing fatal error handling Verisign response

Querying with ip query 8.8.8.8 using the code snippet below causes fatal "Unrecognized Object" error.

my $whois = Net::Whois::RIPE->new( hostname => 'whois.verisign-grs.com', port => 43, recursive => 1 ); my $iterator = $whois->query('8.8.8.8'); my @objects = Net::Whois::Object->new($iterator);

Previously the old version of Net::Whois::RIPE worked:
while ( my $query = $iterator->next ) { my $attr = [ $query->attributes ]; ... }

I've added a failing test in a branch of my fork : https://github.com/hashbangperl/Net-Whois-RIPE/blob/verisign_errors/t/05-more-objects.t

Are we using the API in the wrong way, or is this no longer supported functionality?

Thanks!

Aaron

Failed hostname test in version 2.006002

[ 7s] Can't connect to "whois.radb.net:43". Reason: [IO::Socket::INET: Bad hostname 'whois.radb.net'].
[ 7s] # Looks like your test exited with 22 before it could output anything.
[ 7s] t/bug-hostname-constructor.t ..
[ 7s] Dubious, test returned 22 (wstat 5632, 0x1600)
[ 7s] Failed 2/2 subtests

PGP Signing

I'd like to implement signing of messages with gpg for the remote object updating, and ask what would be the best way to do it?

I could imagine making the syncupdates_* methods accept arguments of the form

$obj->syncupdates_create(pgpkey => $key_id);

Would you prefer that, or some other API?

hostname ignored in Net::Whois::Generic

hi,
Net::Whois::Generic->query() always calls adapt_query(), which always calls _find_rir. As a result, the "hostname" attribute in the Net::Whois::Generic object is completely ignored.

So, there should be a way to stop using _find_rir if we want to use only a specific WHOIS server.

The issue popped up because the local DNS server limits the rate of requests, and my script fails even if I specify the IP address of whois.ripe.net.

thanks

Misparse when `assignment-size` is in response

The query whois 2001:780:43:: returns, among other objects, this one:

inet6num:       2001:780:43::/48
netname:        NORIS-NBG-TRANSFER-V6-NET-2
country:        DE
admin-c:        NNN-RIPE
tech-c:         NNN-RIPE
status:         AGGREGATED-BY-LIR
assignment-size:64
mnt-by:         NORIS-MNT
created:        2017-11-09T18:19:44Z
last-modified:  2017-11-09T18:19:44Z
source:         RIPE

When feeding this into Net::Whois::Object's constructor, it creates an object with an invalid status field:

use 5.020;
use strict;
use warnings;
use Iterator;
use Net::Whois::Object;

my $input = <<EOF;
inet6num:       2001:780:43::/48
netname:        NORIS-NBG-TRANSFER-V6-NET-2
country:        DE
admin-c:        NNN-RIPE
tech-c:         NNN-RIPE
status:         AGGREGATED-BY-LIR
assignment-size:64
mnt-by:         NORIS-MNT
created:        2017-11-09T18:19:44Z
last-modified:  2017-11-09T18:19:44Z
source:         RIPE
EOF

my @list = ($input);
my $index = 0;


my $gen = sub { $list[$index++] || Iterator::is_done() };

say +(Net::Whois::Object->new( Iterator->new( $gen ) ))[0]->dump;

This produces the output

inet6num:           2001:780:43::/48
netname:            NORIS-NBG-TRANSFER-V6-NET-2
country:            DE
admin-c:            NNN-RIPE
tech-c:             NNN-RIPE
status:             ssignment-size:64
mnt-by:             NORIS-MNT
created:            2017-11-09T18:19:44Z
last-modified:      2017-11-09T18:19:44Z
source:             RIPE

Note how the status in the output is ssignment-size:64 instead of AGGREGATED-BY-LIR

I speculate this is due to missing whitespace between the key and the value, but Net::Whois::Object should be able to
parse everything that is returned by the whois RIPE db.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.