Feature Requests
Share ideas, discuss and vote on requests from other users in community
 

Regex availability check in whois.json

Dmytro Samoylenko shared this idea 1 year ago
Under Consideration

As stated in the docs https://docs.whmcs.com/WHOIS_Servers :


  1. [ {
    "extensions": ".org",
    "uri": "socket://whois.my-org-whois.net:96",
    "available": "NOT FOUND"
    }
    ]

  • available - This is the string that WHMCS will match against to determine an available domain. This string must only appear in the output when the domain is available.




My idea is to make additional attribute available_regex which allows a regex string as a parameter, something like:

  1. {
  2. "extensions": ".org",
  3. "uri": "socket://whois.my-org-whois.net:96",
  4. "available": "NOT FOUND",
  5. "available_regex": "NOT FOUND .+? bla bla$",
  6. }



Real life case where it may be used. Here is available domain in kiev.ua zone:

  1. $ whois not-existing-domain.kiev.ua
  2. % This is the Ukrainian Whois query server #I.
  3. % The Whois is subject to Terms of use
  4. % See https://hostmaster.ua/services/
  5. %

  6. % No entries found for not-existing-domain.kiev.ua


We see here, that string "No entries found for" can be used to check domain availability. Ok, checking another domain:

  1. $ whois 0day.kyiv.ua
  2. % This is the Ukrainian Whois query server #I.
  3. % The Whois is subject to Terms of use
  4. % See https://hostmaster.ua/services/
  5. %

  6. % No entries found for 0day.kyiv.ua

  7. % Domain name reserved for registrant 0day.kiev.ua
  8. % Доменне ім’я зарезервоване для реєстранта домену 0day.kiev.ua

  9. % Query time: 17 msec



This domain is technically available ("No entries found for" in whois output), but there is weird rule for some domain zones in .ua, that states "you can register X.kyiv.ua only if you already registered X.kiev.ua".


Alternatively, if regex is too much hasle, it may be done via something like:

  1. "not_available": "Domain name reserved for registrant "