mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-29 06:47:21 +01:00
Add support for identifying NORID (norwegian top level registry) handles.
Reviewed by: mike (with slight changes based on feedback afterwards)
This commit is contained in:
parent
93193fc76c
commit
058543317c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112617
@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$");
|
||||
#define QNICHOST_TAIL ".whois-servers.net"
|
||||
#define SNICHOST "whois.6bone.net"
|
||||
#define BNICHOST "whois.registro.br"
|
||||
#define NORIDHOST "whois.norid.no"
|
||||
#define DEFAULT_PORT "whois"
|
||||
#define WHOIS_SERVER_ID "Whois Server: "
|
||||
#define WHOIS_ORG_SERVER_ID "Registrant Street1:Whois Server:"
|
||||
@ -203,6 +204,12 @@ choose_server(char *domain)
|
||||
*pos = '\0';
|
||||
if (*domain == '\0')
|
||||
errx(EX_USAGE, "can't search for a null string");
|
||||
if (strlen(domain) > sizeof("-NORID")-1 &&
|
||||
strcasecmp(domain + strlen(domain) - sizeof("-NORID") + 1,
|
||||
"-NORID") == 0) {
|
||||
s_asprintf(&retval, "%s", NORIDHOST);
|
||||
return (retval);
|
||||
}
|
||||
while (pos > domain && *pos != '.')
|
||||
--pos;
|
||||
if (pos <= domain)
|
||||
|
Loading…
Reference in New Issue
Block a user