Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

net::whois::parser(3pm) [debian man page]

Net::Whois::Parser(3pm) 				User Contributed Perl Documentation				   Net::Whois::Parser(3pm)

NAME
Net::Whois::Parser - module for parsing whois information SYNOPSIS
use Net::Whois::Parser; my $info = parse_whois( domain => $domain ); my $info = parse_whois( raw => $whois_raw_text, domain => $domain ); my $info = parse_whois( raw => $whois_raw_text, server => $whois_server ); $info = { nameservers => [ { domain => 'ns.example.com', ip => '123.123.123.123' }, { domain => 'ns.example.com' }, ], emails => [ 'admin@example.com' ], domain => 'example.com', somefield1 => 'value', somefield2 => [ 'value', 'value2' ], ... }; # Your own parsers sub my_parser { my ( $text ) = @_; return { nameservers => [ { domain => 'ns.example.com', ip => '123.123.123.123' }, { domain => 'ns.example.com' }, ], emails => [ 'admin@example.com' ], somefield => 'value', somefield2 => [ 'value', 'value2' ], }; } $Net::Whois::Parser::PARSERS{'whois.example.com'} = &my_parser; $Net::Whois::Parser::PARSERS{'DEFAULT'} = &my_default_parser; # If you want to get all values of fields from all whois answers $Net::Whois::Parser::GET_ALL_VALUES = 1; # example # Net::Whois::Raw returns 2 answers $raw = [ { text => 'key: value1' }, { text => 'key: value2'}]; $data = parse_whois(raw => $raw); # If flag is off parser returns # { key => 'value2' }; # If flag is on parser returns # { key => [ 'value1', 'value2' ] }; # If you want to convert some field name to another: $Net::Whois::Parser::FIELD_NAME_CONV{'Domain name'} = 'domain'; # If you want to format some fields. # I think it is very useful for dates. $Net::Whois::Parser::HOOKS{'expiration_date'} = [ &format_date ]; DESCRIPTION
Net::Whois::Parser module provides Whois data parsing. You can add your own parsers for any whois server. FUNCTIONS
parse_whois(%args) Returns hash of whois data. Arguments: 'domain' - domain 'raw' - raw whois text 'server' - whois server 'which_whois' - option for Net::Whois::Raw::whois. Default value is QRY_ALL CHANGES
See file "Changes" in the distribution AUTHOR
Ivan Sokolov, "<ivsokolov@cpan.org>" COPYRIGHT &; LICENSE Copyright 2009 Ivan Sokolov This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-01-20 Net::Whois::Parser(3pm)

Check Out this Related Man Page

in(3pm) 						User Contributed Perl Documentation						   in(3pm)

NAME
Net::RIPWhois::in - Perl extension for accessing inetnum objects from RIPE whois database. SYNOPSIS
use Net::RIPEWhois::in $in = new Net::RIPEWhois::in; @in = getIn($whois, $prefix, $ALLOCOPT); $whois->closeWhois(); DESCRIPTION
Get inetnum objects from RIPE whois server. Validate as allocation object. METHODS
debug Get or set the debug. $in->debug(1); set the debug. $in->debug(undef); turn off the $debug; error ($errNo, $errMsg) = $in->error; $in->(undef, undef, true); reset the error message Will get the last error no and error string; if $whois->debug is set @{$in->{'errMsgAll'}} and @{$in->{'errNoAll'}} will have the list of all errors and error numbers. new $in = new Net::RIPEWhois::in Creates a new inetnum object. ENV variables WHOISHOST and WHOISPORT getIn Return a list of inetnum objects returned by whois. $whois = new Net::RIPEWhois; @in = $in->getIn($whois, $prefix, $ALLOCOPT); Selected attributes of inetnum are stored in data structure i<inetnum>. Should always query with fast raw output used by the RIPE whois db. $in->{inetnum}{attribute} return undef on error. use $in->error() to get error no. and message. splitWhoisAns Split the response string from whois ans and return list of inetnum on sucess. @inList = $in->splitWhoisAns( $whoisAnsRef); Returns undef on error. Spliting depending on fast raw output format from whois db. Use "-F" to get fast raw output. validAlloc Check the inetnum is an alloation or not. Using netname same as regid, translated "." to "-" . mnt-by RIPE-NCC-MNT ,RIPE-NCC-HM-MNT status ALLOCATED PA, ALLOCATED PI, ALLOCATED UNSPECIFIED and not in IANA Delegated list. As specified in the specification when queried "-L" "-T" in the range database should return max 3 inetnum objects. Assignment, Allocation & IANA delegation to RIPE. Skip if it is an IANA delegation and aply the previous check. @valid = $in->validAlloc(@inlist); undef on error. checkYYYYmmDD Function used to check dates are valid or not. Converts to UTC on YYYYMMDD and concert back to date format if these to matchs treated ad valid date. $YYYYMMDD = checkYYYYmmDD($YYYYMMDD); Accepts YYMMDD and YYYYMMDD formats. YYMMDD is treated as 19YYMMDD FILES
/ncc/ip-reg/delegations perl file with list of IANA delegations. REQUIRES
perl module ipv4pack AUTHOR
Antony <antony@ripe.net> software group RIPE NCC <softies@ripe.net> SEE ALSO
perl(1), Net::RIPEWhois(3), whois(1) perl v5.10.1 2003-07-28 in(3pm)
Man Page