The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Whois::Proxy - an easy to use recursive whois client library

DESCRIPTION

The Net::Whois::Proxy library is an easy to use recursive whois client library that does not do any additional parsing of the whois data. It's goal is to quickly track down domain, ipv4, ipv6, and BGP Anonymous System numbers.

SYNOPSIS

 use Net::Whois::Proxy;
 my $whois = new Net::Whois::Proxy;

 my $record = $whois->whois('EXAMPLE.COM');

 print $record;

 exit;

Also see the whois.pl example script provided with the library distrobution

METHODS

new(option => value)

Create a new Net::Whois::Proxy object.

Avaliable options:

  • debug

    Accepted values:

    1 - turn on debugging, 0 - turn off debugging (default), *HANDLE - turn on debugging and send all debugging info to this file handle.

    Option description:

    Dump debugging information to STDOUT or a file handle.

  • stacked_results

    Accepted values:

    1 - turn on result stacking, 0 - turn off result stacking (default)

    Option description:

    Result stacking will result in the data found durning a whois crawl being stacked on top of each other with additional tags QUERY_#: <server name> tags beening added above each result chunk.

  • clean_stack

    Accepted values:

    1 - turn on clean result stacking (default), 0 - turn off clean result stacking

    Option description:

    Using this option will disable the QUERY_#: <server name> entries from being added to a result stack. This option is only used if the stacked_results option is enabled.

  • master_ip_whois

    Accepted values:

    IP or Fully qualified domain name of a valid whois server (default: whois.arin.net)

    Option description:

    The master IP whois server to preform initial queries against.

  • master_ip_port

    Accepted values:

    Ports 0 - 65535 (default: 43)

    Option description:

    The port number to use when querying the master IP whois server when preforming initial queries.

  • master_domain_whois

    Accepted values:

    IP or Fully qualified domain name of a valid whois server (default: whois.internet.net)

    Option description:

    The master domain whois server to preform initial queries against.

  • master_domain_port

    Accepted values:

    Ports 0 - 65535 (default: 43)

    Option description:

    The port number to use when querying the master domain whois server when preforming initial queries.

  • master_whois

    Accepted values:

    IP or Fully qualified domain name of a valid whois server (default: whois.internic.net)

    Option description:

    The master whois server that should be queried if both IP and domain whois queries fail.

  • master_port

    Accepted values:

    Ports 0 - 65535 (default: 43)

    Option description:

    The port number to use when querying the master whois server.

  • query_timeout

    Accepted values:

    Time in seconds (default: 10)

    Option description:

    Sets the amount of time allowed to elaspe before assuming the server has timed out.

whois(BGP AS # or IPv6 addr or IPv4 addr or PTR or FQDN or IPv4 addr to convert)

Attempt to preform useful commands on the data provided.

If the string provided is: 'AS #' or 'AS#' preform an anonymous system whois query on the IPv4 BGP tree.

 Example:

 print $whois->whois("AS 12345");

If the string provided is an IPv6 address preform an whois query on it.

 Example:

 print $whois->whois("3ffe:b80:138c:1::59");

If the string provided is an IPv4 address preform an whois query on it.

 Example:

 print $whois->whois("63.224.69.57");

If the string provided starts with 'reverse' or 'dns' or 'rdns' and a dotted quad IPv4 address preform a PTR query.

 Example:

 print $whois->whois("reverse 63.224.69.57");

If the string provided starts with 'convert' and a dotted quad IPv4 address or long integer address, convert the address to a long integer address or a dotted quad address

 Example:

 print $whois->whois("convert 63.224.69.57");

convert_ipv4(###.###.###.### or long_int)

Take an IPv4 "dotted quad" address and convert it to long interger format, or an IPv4 long integer address and convert it to the "dotted quad" format.

whois_ipv4(IPv4_dotted_quad or IPv4_long_integer[, whois, port, timeout])

Preform a whois query on an IPv4 address of some type. Optionally query whois on port port and timeout after timeout seconds.

whois_ipv6(IPv6_address)

Preform an IPv6 whois query on IPv6_address

whois_bgp_as(ID)

Preform an whois query on an anonymous system number on the IPv4 BGP tree.

whois_domain(FQDN[, whois, port, timeout)

Preform a recursive whois lookup on a fully qualified domain name (FQDN), Optionally preform the initial query against the whois whois server on port port with the timeout timeout.

check_ipv4(IPv4_dotted_quad)

Attempt to determin if an IPv4 address is syntaxually valid.

errstr()

Return the last error message set.

whois_ptr(IPv4_dotted_quad_address);

Return the PTR / Reverse domain name of a dotted quad IPv4 address.

whois_raw(command, server, port, timeout)

Preform a raw whois with command against the whois server server on the port port with the timeout timeout/

AUTHOR

Colin Faber <cfaber@fpsn.net> http://www.fpsn.net

LICENSE

(C) Colin Faber All rights reserved. This license may be used under the terms of Perl it self.

REPORTING BUGS

Please email all bug reports to me at <cfaber@fpsn.net>. Be sure to include the version of the module you're using along with a sample script which can reproduce the bug and remember if all else fails. debug => 1 is your friend.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 167:

You forgot a '=back' before '=head2'