On Thu, Sep 13, 2012 at 1:18 PM, Roman Gaufman <hacke
...@gmail.com> wrote:
> 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?
> On Thursday, September 13, 2012 11:10:55 AM UTC+1, Simone Carletti wrote:
>> 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/whois.ripe.net.**rb<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
>> On Thu, Sep 13, 2012 at 4:02 AM, Roman Gaufman <hack...@gmail.com> wrote:
>>> 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?
>> --
>> Simone Carletti
>> Application Developer
>> Site & Blog: http://www.simonecarletti.com/
>> LinkedIn: http://linkedin.com/in/weppos
>> Skype: weppos