.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::Whois::Raw 3pm" .TH Net::Whois::Raw 3pm "2012-10-07" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::Whois::Raw \-\- Get Whois information for domains .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Net::Whois::Raw; \& \& $dominfo = whois(\*(Aqperl.com\*(Aq); \& ($dominfo, $whois_server) = whois(\*(Aqfunet.fi\*(Aq); \& $reginfo = whois(\*(AqREGRU\-REG\-RIPN\*(Aq, \*(Aqwhois.ripn.net\*(Aq); \& \& $arrayref = get_whois(\*(Aqyahoo.co.uk\*(Aq, undef, \*(AqQRY_ALL\*(Aq); \& $text = get_whois(\*(Aqyahoo.co.uk\*(Aq, undef, \*(AqQRY_LAST\*(Aq); \& ($text, $srv) = get_whois(\*(Aqyahoo.co.uk\*(Aq, undef, \*(AqQRY_FIRST\*(Aq); \& \& $Net::Whois::Raw::OMIT_MSG = 1; \& # This will attempt to strip several known copyright \& # messages and disclaimers sorted by servers. \& # Default is to give the whole response. \& \& $Net::Whois::Raw::CHECK_FAIL = 1; \& # This will return undef if the response matches \& # one of the known patterns for a failed search, \& # sorted by servers. \& # Default is to give the textual response. \& \& $Net::Whois::Raw::CHECK_EXCEED = 1; \& # When this option is set, "die" will be called \& # if connection rate to specific whois server have been \& # exceeded \& \& $Net::Whois::Raw::CACHE_DIR = "/var/spool/pwhois/"; \& # Whois information will be \& # cached in this directory. Default is no cache. \& \& $Net::Whois::Raw::CACHE_TIME = 60; \& # Cache files will be cleared after not accessed \& # for a specific number of minutes. Documents will not be \& # cleared if they keep get requested for, independent \& # of disk space. \& \& $Net::Whois::Raw::TIMEOUT = 10; \& # Cancel the request if connection is not made within \& # a specific number of seconds. \& \& @Net::Whois::Raw::SRC_IPS = (11.22.33.44); \& # List of local IP addresses to \& # use for WHOIS queries. Addresses will be used used \& # successively in the successive queries \& \& $Net::Whois::Raw::POSTPROCESS{whois.crsnic.net} = \e&my_func; \& # Call to a user\-defined subroutine on whois result, \& # depending on whois\-server. \& # Above is equil to: \& # ($text, $srv) = whois(\*(Aqexample.com\*(Aq); \& # $text = my_func($text) if $srv eq \*(Aqwhois.crsnic.net\*(Aq; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Net::Whois::Raw queries \s-1WHOIS\s0 servers about domains. The module supports recursive \s-1WHOIS\s0 queries. Also queries via \s-1HTTP\s0 is supported for some TLDs. .PP Setting the variables \f(CW$OMIT_MSG\fR and \f(CW$CHECK_FAIL\fR will match the results against a set of known patterns. The first flag will try to omit the copyright message/disclaimer, the second will attempt to determine if the search failed and return undef in such a case. .PP \&\fB\s-1IMPORTANT\s0\fR: these checks merely use pattern matching; they will work on several servers but certainly not on all of them. .SH "FUNCTIONS" .IX Header "FUNCTIONS" .IP "whois( \s-1DOMAIN\s0 [, \s-1SRV\s0 [, \s-1WHICH_WHOIS\s0]] )" 3 .IX Item "whois( DOMAIN [, SRV [, WHICH_WHOIS]] )" Returns Whois information for \f(CW\*(C`DOMAIN\*(C'\fR. Without \f(CW\*(C`SRV\*(C'\fR argument default Whois server for specified domain name zone will be used. Use 'www_whois' as server name to force \&\s-1WHOIS\s0 querying via \s-1HTTP\s0 (only few TLDs are supported in \s-1HTTP\s0 queries). Caching is supported: if \f(CW$CACHE_DIR\fR variable is set and there is cached entry for that domain \- information from the cache will be used. \&\f(CW\*(C`WHICH_WHOIS\*(C'\fR argument \- look get_whois docs below. .IP "get_whois( \s-1DOMAIN\s0 [, \s-1SRV\s0 [, \s-1WHICH_WHOIS\s0]] )" 3 .IX Item "get_whois( DOMAIN [, SRV [, WHICH_WHOIS]] )" Lower-level function to query Whois information for \f(CW\*(C`DOMAIN\*(C'\fR. Caching \s-1IS\s0 \s-1NOT\s0 supported (caching is implemented only in higher-level \&\f(CW\*(C`whois\*(C'\fR function). Without \f(CW\*(C`SRV\*(C'\fR argument default Whois server for specified domain name zone will be used. \&\f(CW\*(C`WHICH_WHOIS\*(C'\fR argument is used to access a results if recursive queries; possible values: .Sp \&\f(CW\*(AqQRY_FIRST\*(Aq\fR \- returns results of the first query. Non't make recursive queries. In scalar context returns just whois text. In list context returns two values: whois text and whois server which was used to make query). .Sp \&\f(CW\*(AqQRY_LAST\*(Aq\fR \- returns results of the last query. In scalar context returns just whois text. In list context returns two values: whois text and whois server which was used to make query). This is the default option. .Sp \&\f(CW\*(AqQRY_ALL\*(Aq\fR \- returns results of the all queries of the recursive chain. Reference to array of references to hashes is returned. Hash keys: \f(CW\*(C`text\*(C'\fR \- result of whois query, \f(CW\*(C`srv\*(C'\fR \- whois server which was used to make query. .SH "USER DEFINED FUNCTIONS" .IX Header "USER DEFINED FUNCTIONS" .IP "whois_query_sockparams( \s-1DOMAIN\s0, \s-1SRV\s0 )" 3 .IX Item "whois_query_sockparams( DOMAIN, SRV )" You can set your own IO::Socket::INET params like this: .Sp .Vb 4 \& *Net::Whois::Raw::whois_query_sockparams = sub { \& my $class = shift; \& my $domain = shift; \& my $name = shift; \& \& return ( \& PeerAddr => $name, \& PeerPort => 43, \& # LocalHost => , \& # LocalPort => \& ); \& }; .Ve .IP "whois_query_socket( \s-1DOMAIN\s0, \s-1SRV\s0 )" 3 .IX Item "whois_query_socket( DOMAIN, SRV )" You can set your own IO::Socket::INET like this: .Sp .Vb 4 \& *Net::Whois::Raw::whois_query_socket = sub { \& my $class = shift; \& my $domain = shift; \& my $name = shift; \& \& $name .= \*(Aq:43\*(Aq; \& return IO::Socket::INET\->new(); \& }; .Ve .IP "whois_query_ua( \s-1DOMAIN\s0, \s-1SRV\s0 )" 3 .IX Item "whois_query_ua( DOMAIN, SRV )" You can set your own LWP::UserAgent like this: .Sp .Vb 3 \& *Net::Whois::Raw::whois_query_ua = sub { \& my $class = shift; \& my $domain = shift; \& \& return LWP::UserAgent\->new(); \& }; .Ve .SH "AUTHOR" .IX Header "AUTHOR" Original author Ariel Brosh \fBschop@cpan.org\fR, Inspired by jwhois.pl available on the net. .PP Since Ariel has passed away in September 2002: .PP Past maintainers Gabor Szabo \fBgabor@perl.org.il\fR, Corris Randall \fBcorris@cpan.org\fR .PP Current Maintainer: Walery Studennikov \fBdespair@cpan.org\fR .SH "CREDITS" .IX Header "CREDITS" See file \*(L"Changes\*(R" in the distribution for the complete list of contributors. .SH "CHANGES" .IX Header "CHANGES" See file \*(L"Changes\*(R" in the distribution .SH "NOTE" .IX Header "NOTE" Some users complained that the \fBdie\fR statements in the module make their \&\s-1CGI\s0 scripts crash. Please consult the entries on \fBeval\fR and \&\fBdie\fR on perlfunc about exception handling in Perl. .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2000\-\-2002 Ariel Brosh. Copyright 2003\-\-2003 Gabor Szabo. Copyright 2003\-\-2003 Corris Randall. Copyright 2003\-\-\fInow()\fR Walery Studennikov. .PP This package is free software. You may redistribute it or modify it under the same terms as Perl itself. .PP I apologize for any misunderstandings caused by the lack of a clear licence in previous versions. .SH "COMMERCIAL SUPPORT" .IX Header "COMMERCIAL SUPPORT" Not available anymore. .SH "LEGAL" .IX Header "LEGAL" Notice that registrars forbid querying their whois servers as a part of a search engine, or querying for a lot of domains by script. Also, omitting the copyright information (that was requested by users of this module) is forbidden by the registrars. .SH "SEE ALSO" .IX Header "SEE ALSO" pwhois, whois.