RBLClient(3pm)
π Net::RBLClient π
okay bestie, so this is a User Contributed Perl Documentation page for Net::RBLClient β that's the module, and the manpage itself is filed under RBLClient(3pm) in section 3pm. pull up a chair, we're doing DNS detective work together π΅οΈβοΈβ¨
π NAME π
Net::RBLClient β it queries a whole bunch of Realtime Blackhole Lists at the same time, in parallel, because waiting is not the vibe.
π SYNOPSIS π
use Net::RBLClient;
my $rbl = Net::RBLClient->new;
$rbl->lookup('211.101.236.160');
my @listed_by = $rbl->listed_by;
literally four lines and you're done, slay π
π¦ DESCRIPTION π¦
This module exists to figure out which RBLs are listing a particular IP address. It parallelizes the requests so you get a fast response β no cap, speed is the whole point.
so like, an RBL (Realtime Blackhole List) is a list of IP addresses that meet some criteria, e.g. being involved in Unsolicited Bulk Email. every RBL has its own criteria for adding and removing addresses β they're all different, they're all doing their own thing π
β οΈ real talk: if you wanna block email or other traffic to/from your network based on one or more RBLs, you should carefully study the behavior of those RBLs before and during such blocking. like, do your research first, bestie. this is not a vibes-only situation.
β¨ CONSTRUCTOR β¨
new( [ARGS] )
takes an optional hash of arguments β here's the whole menu, no secrets:
listsβ an arraref (yes, arraref, that's what it says π) of (sub)domains representing RBLs. each element in the array is a string similar to'relays.somerbl.org'. use this when you want to query a specific list of RBLs β if you omit this argument, a large list of RBLs gets queried instead.query_txtβ set this to true if you wantNet::RBLClientto also query for TXT records, which is where a lot of RBLs stash extra info about why an IP address got included, or links to pages that have that info. then you can grab all of that with the"txt_hash()"method. πmax_timeβ the maximum time in seconds that the lookup function should take. heads up though: the function can actually take up tomax_time + timeoutseconds.max_timeneed not be integer. and yeah, if the lookup returns because ofmax_time, some DNS replies will be missed. π- Default: 8 seconds.
timeoutβ the maximum time in seconds spent awaiting each DNS reply packet. the only reason to change this is ifmax_timeis decreased to a small value.- Default: 1 second.
max_hitsβ a hit is an affirmative response, i.e. "yes this IP address is on this list." ifmax_hitshits are received,lookup()returns immediately, which lets the calling program save time. β±οΈ- Default: 1000 (which is effectively out of the picture).
max_repliesβ a reply from an RBL could be affirmative or negative. either way it counts towardsmax_replies.Lookup()returns whenmax_repliesreplies have been received.udp_maxlenβ the maximum number of bytes read from a DNS reply packet. there's probably no reason to change this tbh.- Default: 4000
serverβ the local nameserver to use for all queries. should be either a resolvable hostname or a dotted quad IP address.- by default, the first nameserver in
/etc/resolv.confwill be used.
- by default, the first nameserver in
π METHODS π
lookup( IPADDR )β look up one IP address on all RBLs previously defined. the IP address must be expressed in dotted quad notation, like'1.2.3.4'."Lookup()"returns1.listed_by()β return an array of RBLs which block the specified IP. the RBLs are indicated via the (sub)domain used for DNS query. the calling program must first call"lookup()". don't skip that step, fr fr πlisted_hash()β return a hash whose keys are the RBLs which block the specified IP, represented as in"listed_by()". if the RBL returned an A record, the value for that key will be the IP address in the A record β typically127.0.0.1β127.0.0.4. if the RBL returned a CNAME, the value will be the hostname, typically used for a comment on why the IP address is listed. π¬txt_hash()β return a hash (or a reference to that hash if called in a scalar context) whose keys are the RBLs which block the specified IP, represented as in"listed_by()". if the RBL returned TXT records containing additional information, the value will contain this information (several TXT records from one RBL will be joined by semicolons, but this should not happen), and if not, it will beundef.
πΈ AUTHOR πΈ
Asher Blum <asher@wildspark.com> π
β CREDITS β
Martin H. Sluka <martin@sluka.de> π«Ά
π COPYRIGHT π
Copyright (C) 2002 Asher Blum. All rights reserved. This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
and that's the whole page, bestie!! π this one's running on perl v5.34.0, dated 2022-06-30 β go forth and query those RBLs, you absolute icon ππ β¨
π¦ where this page comes from
- debian bookworm: libnet-rblclient-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libnet-rblclient-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-rblclient-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-rblclient-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-rblclient-perl 0.5-4 Β· 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