Skip to content

whois IP queries return nil properties #201

Closed
friendlycredit opened this Issue Jan 17, 2013 · 1 comment

2 participants

@friendlycredit

I'm not sure if it's a bug or that's how it supposed to be, but when I query an IP I get a result with all properties as nil. IT happens for all IPs (that I've tried), and when I just print out the whois response I do see some fields there.

For example:

> puts Whois.whois('173.194.35.161')
\#
\# Query terms are ambiguous.  The query is assumed to be:
\#     "n 173.194.35.161"
\#
\# Use "?" to get help.
\#

\#
\# The following results may also be obtained via:
\# http://whois.arin.net/rest/nets;q=173.194.35.161?showDetails=true&showARIN=false&ext=netref2
\#

NetRange:       173.194.0.0 - 173.194.255.255
CIDR:           173.194.0.0/16
OriginAS:       AS15169
NetName:        GOOGLE
NetHandle:      NET-173-194-0-0-1
Parent:         NET-173-0-0-0-0
NetType:        Direct Allocation
RegDate:        2009-08-17
Updated:        2012-02-24
Ref:            http://whois.arin.net/rest/net/NET-173-194-0-0-1

<< a lot of other text was omitted >>
> Whois.whois('173.194.35.161').properties
{:disclaimer=>nil, :domain=>nil, :domain_id=>nil, :referral_whois=>nil, :referral_url=>nil, :status=>nil, :available?=>nil, :registered?=>nil, :created_on=>nil, :updated_on=>nil, :expires_on=>nil, :registrar=>nil, :registrant_contacts=>nil, :admin_contacts=>nil, :technical_contacts=>nil, :nameservers=>nil}

The same behavior applies to all the IPs I've tried.
It looks like the data is there, is it a parsing problem?
I'm specifically interested in the CIDR, but other fields (abuse/tech details) are also nice-to-haves.

@weppos weppos was assigned Jan 17, 2013
@weppos
Owner
weppos commented Jan 17, 2013

Whois parsers for IP responses are not implemented yet.

> r = Whois.whois('173.194.35.161')
> r.parser.parsers.first.class
# => Whois::Record::Parser::Blank 

So far, I didn't have the time to implement them.

@weppos weppos closed this Jan 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.