result_as_norid_whois_string

Format result as old style Norid whois output.

Uses internal helper formatting functions.

rdap_ns_obj_as_norid_whois_string

Return whois formatted string.

rdap_notice_as_norid_whois_string

Return whois formatted string.

rdap_entity_obj_as_norid_whois_string

Return whois formatted string.

  $search indicates if a search is done, in which case the entity is a
  set of at least one. 

  The header if built differently dependent of $nameservers and $search.

rdap_domain_obj_as_norid_whois_string

Return whois formatted string.

  $search indicates if a search is done, in which case the domain obj is a
  set of at least one. 

  $expand indicates if extra lookup for registrar info should be made,
  since registrar info may not be included.

  The header if built differently dependent of $nameservers and $search.

rdap_events_as_norid_whois_string

Format events as norid whois string.

rdap_vcard_as_norid_whois_string

Format vcard object(s) as whois string.

Ref. https://tools.ietf.org/html/rfc6350#section-6.3.1 to see order of things.

norid_whois_parse

Convert a whois formatted result string to a whois object the same way as NOLookup::Whois::WhoisLookup does.

Returns ($wh, $do, $ho), all NOLookup::Whois::WhoisLookup objects.

rdap_get_domain_object_as_whois

Scan domain object and do the rdap2whois on it.

$result must point to a domain result.

rdap_get_entity_objects_as_whois

Scan registrant, registrar and tech entity objects and do the rdap2whois on them.

rdap_get_nameserver_objects_as_whois

Scan NS objects and do the rdap2whois on them.

NAME

NOLookup::RDAP::RDAPLookup::Whois

Offer a number of utility whois methods to simulate an rdap2whois world, building output and objects as the old whois formatted service.

SYNOPSIS

    use Encode;
    use NOLookup::RDAP::RDAPLookup::Whois;
 
    # Default API service URL
    my $SERVICE_URL = "https://rdap.norid.no";

    # Example 1: Domain name lookup
    # Decode the query when needed, like for IDNs
    # or names with national characters.

    my $q = 'norid.no';
    #$q = decode('ISO8859-1', 'øl.no');

    my $bo = NOLookup::RDAP::RDAPLookup->new(
     {
        service_url         => 'https://rdap.norid.no',
        debug               => 0,
        use_cache           => 0,
        norid_header_secret => 'secret1234',
        norid_header_proxy  => 1,
     });

    # test HEAD operation for existence
    $bo->lookup($q, 1, 0, 0);
    if ($bo->error) {
       print "HEAD: Error, error / status: ",
          $bo->error . "/" . $bo->status) . "\n";
    }

    # test GET operations
    $bo->lookup($q, 0, 0, 0);
    if ($bo->error) {
       print "GET: Error, error / status: ",
          $bo->error . "/" . $bo->status) . "\n";
    }
        
    # result of lookup is in $bo->result
    # This result contains response objects built by Net::RDAP

    my $res = $bo->result;
    print "handle: ", $bo->handle, "\n";

 * See bin/no_rdap.pl for more information on usage.

 * See various formatting/helper functions in this file for how to
   access the various objects returned by Net::RDAP.

DESCRIPTION

This module provides an object oriented API for use with the Norid RDAP service. It uses the Net::RDAP module from Cpan internally to fetch information from the Norid RDAP.

SUPPORT

For now, support questions should be sent to:

<(nospam)info(at)norid.no>

SEE ALSO

http://www.norid.no/en https://www.norid.no/en/registrar/system/tjenester/whois-das-service https://teknisk.norid.no/en/registrar/system/tjenester/rdap =head1 CAVEATS

AUTHOR

Trond Haugen, <(nospam)info(at)norid.no>

COPYRIGHT

Copyright (c) 2020- Trond Haugen <(nospam)info(at)norid.no>. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LICENSE

This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.

About the Norid RDAP API

From Norid doc:

RDAP is based on a subset of the HTTP protocol. The server accepts requests of type GET and HEAD. GET lookup is answered with data about the object in question. HEAD responds if the object exists or not. Both request types are answered with return code 200 / OK if the object exists, and return code 404 / NOT FOUND if the object does not exist, and other return code for other error types.

The server supports the following types of lookups:

    GET/HEAD https://rdap.norid.no/domain/<domenenavn>
    GET/HEAD https://rdap.norid.no/entity/<handle>
    GET/HEAD https://rdap.norid.no/registrar/<reg_handle>     (Norid extension)
      Note: Returns same result as /entity/<reg_handle>
    GET/HEAD https://rdap.norid.no/nameserver_handle/<handle> (Norid extension)

And the following searches:

    GET https://rdap.norid.no/nameservers?name=<hostname>
    GET https://rdap.norid.no/domains?identity=<identity>  (Norid extension for proxy)
    GET https://rdap.norid.no/domains?registrant=<handle>  (Norid extension for proxy)
    GET https://rdap.norid.no/entities?identity=<identity> (Norid extension for proxy)