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.
|
host = data?.ReferralServer?.split('//')?.[1] |
host = data?.ReferralServer?.split('//')?.[1]
should be followed with
if (/^rwhois/.test(data?.ReferralServer)) {
break;
// or create rwhois parser
}
host = data?.ReferralServer?.split('//')?.[1]