Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Matching ISPs from IPs?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Roman Gaufman  
View profile  
 More options Sep 12 2012, 10:02 pm
From: Roman Gaufman <hacke...@gmail.com>
Date: Wed, 12 Sep 2012 19:02:39 -0700 (PDT)
Local: Wed, Sep 12 2012 10:02 pm
Subject: Matching ISPs from IPs?

For instance if I do:

➜  ~  whois 178.102.41.50 | tail -n 10

route:          178.96.0.0/12
descr:          T-Mobile UK
remarks:        Report any misuse to ab...@t-mobile.co.uk
origin:         AS29328
mnt-by:         TMUK-MNT
source:         RIPE # Filtered

% This query was served by the RIPE Database Query Service version 1.19.9
(WHOIS4)

or:

➜  ~  whois 86.164.99.116 | tail -n 10
% Information related to '86.128.0.0/10AS2856'

route:        86.128.0.0/10
descr:        BT Public Internet Service
origin:       AS2856
mnt-by:       BTNET-MNT
source:       RIPE # Filtered

% This query was served by the RIPE Database Query Service version 1.19.9
(WHOIS3)

I am looking for the value for "descr:" - in the first instance it is
"T-Mobile UK", in the second it is "BT Public Internet Service"

How would I match this with the whois library?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Carletti  
View profile  
 More options Sep 13 2012, 6:10 am
From: Simone Carletti <wep...@weppos.net>
Date: Thu, 13 Sep 2012 12:10:11 +0200
Local: Thurs, Sep 13 2012 6:10 am
Subject: Re: Matching ISPs from IPs?

Hi Roman,

the parser for the whois.ripe.net server is currently pretty basic. You can
read the source code here
https://github.com/weppos/whois/blob/master/lib/whois/record/parser/w...

It doesn't support the extraction of most of the properties, including
descr.

However, you can easily extract it from the raw response. Here's the Ruby
code

```
r = Whois.query '178.102.41.50'
r.to_s.scan(/descr:\s+(.+)/)
# => [["KT"], ["T-Mobile UK"]]
```

Hope this helps.

-- Simone

--
Simone Carletti
Application Developer

Site & Blog: http://www.simonecarletti.com/
LinkedIn: http://linkedin.com/in/weppos
Skype: weppos


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Gaufman  
View profile  
 More options Sep 13 2012, 7:18 am
From: Roman Gaufman <hacke...@gmail.com>
Date: Thu, 13 Sep 2012 04:18:39 -0700 (PDT)
Local: Thurs, Sep 13 2012 7:18 am
Subject: Re: Matching ISPs from IPs?

Thank you! - that works in most cases, but not with this IP:

➜  ~  whois '134.245.140.192' | tail -n 10

route:        134.245.0.0/16
descr:        UNI-KIEL
origin:       AS680
member-of:    RS-HEPNET
mnt-by:       DFN-MNT
source:       RIPE # Filtered

% This query was served by the RIPE Database Query Service version 1.19.9
(WHOIS3)

For some reason, when I do Whois.query '134.245.140.192' it only returns
part of the whois reply missing the bottom bit that contains the  ISP
information.

Any ideas?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simone Carletti  
View profile  
 More options Sep 13 2012, 7:42 am
From: Simone Carletti <wep...@weppos.net>
Date: Thu, 13 Sep 2012 13:41:39 +0200
Local: Thurs, Sep 13 2012 7:41 am
Subject: Re: Matching ISPs from IPs?

Unfortunately, I think the case falls into this known bug.
https://github.com/weppos/whois/issues/37

-- Simone

--
Simone Carletti
Application Developer

Site & Blog: http://www.simonecarletti.com/
LinkedIn: http://linkedin.com/in/weppos
Skype: weppos


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »