Coder Social home page Coder Social logo

Comments (1)

weppos avatar weppos commented on July 29, 2024

The response from Arin contains a referral that is not responding:

getaddrinfo(rwhois.coloup.com): nodename nor servname provided, or not known

You can see the partial response by making a small change in the code:

diff --git a/lib/whois/server/adapters/base.rb b/lib/whois/server/adapters/base.rb
index 0df22bad..1d43b573 100644
--- a/lib/whois/server/adapters/base.rb
+++ b/lib/whois/server/adapters/base.rb
@@ -137,6 +137,8 @@ module Whois
           @buffer ||= []
           yield(@buffer)
           @buffer.dup
+        rescue
+          p @buffer
         ensure
           @buffer.clear
         end
irb(main):001:0> Whois::Server.guess('104.222.43.19')
=> #<Whois::Server::Adapters::Arin:0x00007fba50907420 @allocation="0.0.0.0/1", @host="whois.arin.net", @options={}, @type=:ipv4>
irb(main):002:0> Whois::Client.new(timeout: 30).lookup('104.222.43.19')
[#<struct Whois::Record::Part body="\n#\n# ARIN WHOIS data and services are subject to the Terms of Use\n# available at: https://www.arin.net/resources/registry/whois/tou/\n#\n# If you see inaccuracies in the results, please report at\n# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/\n#\n# Copyright 1997-2021, American Registry for Internet Numbers, Ltd.\n#\n\n\nNetRange:       104.222.32.0 - 104.222.47.255\nCIDR:           104.222.32.0/20\nNetName:        COLOUP\nNetHandle:      NET-104-222-32-0-1\nParent:         NET104 (NET-104-0-0-0-0)\nNetType:        Direct Allocation\nOriginAS:       AS19084\nOrganization:   ColoUp (SL-311)\nRegDate:        2014-10-13\nUpdated:        2014-10-13\nRef:            https://rdap.arin.net/registry/ip/104.222.32.0\n\n\nOrgName:        ColoUp\nOrgId:          SL-311\nAddress:        One Commerce Center - 1201 Orange St. #600\nCity:           Wilmington\nStateProv:      DE\nPostalCode:     19899\nCountry:        US\nRegDate:        2013-09-30\nUpdated:        2017-12-15\nRef:            https://rdap.arin.net/registry/entity/SL-311\n\nReferralServer:  rwhois://rwhois.coloup.com:4321\n\nOrgAbuseHandle: ABUSE4672-ARIN\nOrgAbuseName:   Abuse\nOrgAbusePhone:  +1-302-261-5353 \nOrgAbuseEmail:  [email protected]\nOrgAbuseRef:    https://rdap.arin.net/registry/entity/ABUSE4672-ARIN\n\nOrgTechHandle: NETWO6762-ARIN\nOrgTechName:   Network Operations\nOrgTechPhone:  +1-302-261-5353 \nOrgTechEmail:  [email protected]\nOrgTechRef:    https://rdap.arin.net/registry/entity/NETWO6762-ARIN\n\nOrgNOCHandle: NETWO6762-ARIN\nOrgNOCName:   Network Operations\nOrgNOCPhone:  +1-302-261-5353 \nOrgNOCEmail:  [email protected]\nOrgNOCRef:    https://rdap.arin.net/registry/entity/NETWO6762-ARIN\n\n\n#\n# ARIN WHOIS data and services are subject to the Terms of Use\n# available at: https://www.arin.net/resources/registry/whois/tou/\n#\n# If you see inaccuracies in the results, please report at\n# https://www.arin.net/resources/registry/whois/inaccuracy_reporting/\n#\n# Copyright 1997-2021, American Registry for Internet Numbers, Ltd.\n#\n\n", host="whois.arin.net">]
=> ""

Related to #186

from whois.

Related Issues (20)

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.