IP(3pm)
πΈ NAME πΈ
Net::Whois::IP β a Perl extension for looking up the whois information for ip addresses π (this page is IP(3pm), bestie, and it's all about that whois life)
β¨ SYNOPSIS β¨
okay so here's the whole vibe, copy-paste ready:
use Net::Whois::IP qw(whoisip_query);
my $ip = "192.168.1.1";
#Response will be a reference to a hash containing all information
#provided by the whois registrar
#The array_of_responses is a reference to an array containing references
#to hashes containing each level of query done. For example,
#many records have to be searched several times to
#get to the correct information, this array contains the responses
#from each level
my ($response,$array_of_responses) = whoisip_query($ip,$optional_multiple_flag,$optional_raw_flag,$option_array_of_search_options);
#if $optional_multiple_flag is not null, all possible responses for a give record will be returned
#for example, normally only the last instance of Tech phone will be give if record
#contains more than one, however, setting this flag to a not null will return both is an array.
#The other consequence, is that all records returned become references to an array and must be
#dereferenced to utilize
#if $optional_raw_flag is not null, response will be a reference to an array containing the raw
#response from the registrar instead of a reference to a hash.
#If $option_array_of_search_options is not null, the first two entries will be used to replace
#TechPhone and OrgTechPhone is the search method. This is fairly dangerous, and can
#cause the module not to work at all if set incorrectly
#Normal unwrap of $response ($optional_multiple_flag not set)
my $response = whoisip_query($ip);
foreach (sort keys(%{$response}) ) {
print "$_ $response->{$_} \n";
}
#$optional_multiple_flag set to a value my $response = whoisip_query(
$ip,"true"); foreach ( sort keys %$response ){
print "$_ is\n";
foreach ( @{ $response->{ $_ } } ) {
print " $_\n";
} }
#$optional_raw_flag set to a value my $response = whoisip_query(
$ip,"","true"); foreach (@{$response}) {
print $_; }
#$optonal_array_of_search_options set but not $optional_multiple_flag or
$optional_raw_flag my $search_options = ["NetName","OrgName"]; my
$response = whois_query($ip,"","",$search_options); foreach (sort
keys(%{$response}) ) {
print "$_ $response->{$_} \n"; }
π DESCRIPTION π
so like, this is a Perl module that lets you do a whois lookup on ip addresses. periodt.
It's designed to recursively query the various whois providers until it gets the more detailed info β including either TechPhone or OrgTechPhone by default. but bestie, that's overrideable, so you're not locked in π
π AUTHOR π
Ben Schmitz β ben@foink.com
Big thanks to Orbitz for allowing the community access to this work π«Ά
Please email me any suggestions, complaints, etc. π§
π SEE ALSO π
perl(1)Net::Whois
and that's a wrap, bestie π this lil page came to you from perl v5.34.0, dated 2022-06-16 β iconic behavior, no cap β¨ππ¦
π¦ where this page comes from
- debian bookworm: libnet-whois-ip-perl 1.19-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-whois-ip-perl 1.19-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-whois-ip-perl 1.19-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-whois-ip-perl 1.19-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-whois-ip-perl 1.19-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms