mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
Disable recursion for queries like "nameserver name.example.com"
Or else the program would return an error because no registrar whois server is returned by the registry.
This commit is contained in:
parent
4f374d16b0
commit
46faeee41e
4
whois.c
4
whois.c
@ -835,6 +835,10 @@ char *query_crsnic(const int sock, const char *query)
|
||||
is queried */
|
||||
if (state == 0 && strneq(buf, " Domain Name:", 15))
|
||||
state = 1;
|
||||
if (state == 0 && strneq(buf, " Server Name:", 15)) {
|
||||
referral_server = strdup("");
|
||||
state = 2;
|
||||
}
|
||||
if (state == 1 && strneq(buf, " Registrar WHOIS Server:", 26)) {
|
||||
for (p = buf; *p != ':'; p++); /* skip until the colon */
|
||||
for (p++; *p == ' '; p++); /* skip the spaces */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user