io-developer / php-whois

PHP WHOIS provides parsed and raw whois lookup of domains and ASN routes. PHP 8.0 compatible (5.4+ old versions)
MIT License
437 stars 117 forks source link

Problem with .nc whois #189

Open xfouloux opened 2 years ago

xfouloux commented 2 years ago

Hello,

a whois from the .nc whois reply this few informations :

# whois lagoon.nc
OPT Whois v2.1.2

Domain                   : lagoon.nc
Created on               : 1999-08-09T00:00:00.000Z
Expires on               : 2024-08-09
Last updated on          : 2022-06-19T02:11:54.000Z

Domain server 1          : dnsp.lagoon.nc
Domain server 2          : dnss.lagoon.nc
Domain server 3          : dnst.lagoon.nc

Registrar                : NONE

a believe the regex in the json that match results from whois does not take into account replies like this, as php whois array is like this and cannot match name servers as you can see the array is empty

"parserType": "commonFlat",
        "domainName": "lagoon.nc",
        "whoisServer": "",
        "nameServers": [],
        "creationDate": 934156800,
        "expirationDate": 1723122000,
        "updatedDate": 1655604714,
        "states": [],
        "owner": "",
        "registrar": "NONE",
        "dnssec": ""

I tried to play with the regex in the json files but not luck finding which to change.

Can someone point me out or fix the code to match name servers in this case ?