Rex::C...etwork(3pm)
π Rex::Commands::Network π
okay bestie, so this is Rex::Commands::Network, a lil Perl module from the User Contributed Perl Documentation collection (section 3pm, we love a classic) β¨ she's a whole vibe for anyone who's ever needed to peek at what the network is doing π
πΈ NAME πΈ
Rex::Commands::Network β it's literally the Network Module, no cap π that's the whole name, that's the whole job.
π¦ DESCRIPTION π¦
so with this module you can get info about the routing table, your current network connections, open ports, ... and like, all the rest of that good stuff π
basically: it's the gossip column for your network. it knows where your packets are going and it's not afraid to say it π«Ά
β¨ SYNOPSIS β¨
here's the whole thing in action, copy-paste energy, iconic:
use Rex::Commands::Network;
my @routes = route;
print Dumper(\@routes);
my $default_gw = default_gateway;
default_gateway "192.168.2.1";
my @netstat = netstat;
my @tcp_connections = grep { $_->{"proto"} eq "tcp" } netstat;
not me reading that and immediately going "oh she ATE" π₯ look at her getting routes AND setting a gateway AND filtering tcp connections, main character behaviour fr fr π
π EXPORTED FUNCTIONS π
π route
Get routing information πΈ
like, just... route. that's it. she gives you the routing info and you say thank you π«Ά
π default_gateway([$default_gw])
Get or set the default gateway. both! a dual threat, obsessed πβ¨
call her with no args and she gets it β call her with $default_gw and she sets it. versatile queen π
π netstat
Get network connection information π
all your connections, right there, ready for you to grep through like the little detective you are ππ
ngl bestie, that's the whole module. no hidden options, no flags, no secret lore π¦ just three functions being cute and useful at the same time. the way that's possible?? unbelievable π
and that's a wrap on Rex::Commands::Network ππ this lil page lives in perl v5.40.1 and got her lil glow-up on 2025-10-03 β¨ so when you're out here slaying with route, default_gateway and netstat, just remember her, okay? she did that π
ππ¦
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms