whoiser icon indicating copy to clipboard operation
whoiser copied to clipboard

Whois for 66.44.53.7 fails with error Error: getaddrinfo ENOTFOUND rwhois.rcn.net:4321

Open ackava opened this issue 11 months ago • 0 comments

Version(s) affected: 1.18.0

Description
Whois for 66.44.53.7 fails with error Error: getaddrinfo ENOTFOUND rwhois.rcn.net:4321

How to reproduce

   console.log(await  whoiser.ip("66.44.53.7"));

Possible Solution
Reason is Referral contains rwhois which contains port and a different parser.

https://github.com/LayeredStudio/whoiser/blob/972467452eaae37001e7ab61224675be2576565d/src/whoiser.js#L252


      host = data?.ReferralServer?.split('//')?.[1]

should be followed with


      if (/^rwhois/.test(data?.ReferralServer)) {
            break;
           // or create rwhois parser
      }
      host = data?.ReferralServer?.split('//')?.[1]

ackava avatar Feb 03 '25 07:02 ackava