weppos / whois-parser

An intelligent — pure Ruby — WHOIS parser.
https://whoisrb.org
MIT License
98 stars 102 forks source link

Parsing on .fi domains fails #42

Open jamo opened 7 years ago

jamo commented 7 years ago

It seems that parsing whois format for .fi tld fails with following error:

require('whois')
require('whois-parser')
Whois.whois('ficora.fi').parser.nameservers
Whois::ParserError: Unexpected token: Nameservers

nserver............: dns2.ficora.fi [OK]
nserver............: dns1.ficora.fi [OK]
nserver............: ns-secondary.funet.fi [OK]
dnssec.............: signed delegation

Holder

name...............: Viestint�virasto
register number....: 0709019-2
address............: Tietotekniikka
address............: PL 313
address............: 00181
address............: Helsinki
country............: Finland
phone..............: +358969661
holder email.......:

Registrar

registrar..........: Viestint�virasto

>>> Last update of WHOIS database: 27.11.2016 21:30:14 (EET) <<<

Copyright (c) Finnish Communications Regulatory Authority

from <path/to/ruby.../versions/2.3.0/lib/ruby/gems/2.3.0/gems/whois-parser-1.0.0/lib/whois/scanners/base.rb:110:in `error!'
elguitar commented 5 years ago

I can confirm this. Happens with every domain. Trace:

irb(main):004:0> Whois.whois('google.fi').parser.nameservers
Traceback (most recent call last):
       16: from /usr/bin/irb:11:in `<main>'
       15: from (irb):4
       14: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parser.rb:327:in `nameservers'
       13: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parser.rb:361:in `delegate_property_to_parsers'
       12: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parsers/base.rb:240:in `nameservers'
       11: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parsers/base.rb:396:in `handle_property'
       10: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parsers/base.rb:371:in `cached_properties_fetch'
        9: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parsers/base.rb:398:in `block in handle_property'
        8: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/parsers/whois.fi.rb:104:in `block in <class:WhoisFi>'
        7: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/scannable.rb:42:in `node'
        6: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/scannable.rb:59:in `ast'
        5: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/scannable.rb:53:in `parse'
        4: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/base.rb:29:in `parse'
        3: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/base.rb:102:in `tokenize'
        2: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/base.rb:106:in `unexpected_token'
        1: from /home/elguitar/.gem/ruby/gems/whois-parser-1.1.0/lib/whois/scanners/base.rb:110:in `error!'
Whois::ParserError (Unexpected token: Nameservers)

nserver............: ns3.google.com [Technical Error]
nserver............: ns4.google.com [Technical Error]
nserver............: ns1.google.com [OK]
nserver............: ns2.google.com [OK]
dnssec.............: unsigned delegation

Holder

name...............: Google LLC
register number....: 3582691
address............: 1600 Amphitheatre Parkway
address............: 94043
address............: Mountain View
country............: United States of America
phone..............: +1.6502530000
holder email.......: 

Registrar

registrar..........: MarkMonitor Inc.
www................: www.markmonitor.com

Tech

name...............: Google LLC
email..............: ccops@markmonitor.com

>>> Last update of WHOIS database: 15.1.2019 9:15:15 (EET) <<<

Copyright (c) Finnish Communications Regulatory Authority
ottok commented 4 years ago

This issue has been open since 2016. Any pointers how to fix it for somebody who might make a PR?