Rex::Co...Network(3)
π¦ Rex::Co...Network(3) π¦
okay bestie, this page comes to you from the User Contributed Perl Documentation corner of the universe, and it's all about Rex::Commands::Network. it's giving network-info main character energy π
NAME π
Rex::Commands::Network β Network Module. that's the name, no cap.
DESCRIPTION πΈ
with this module you can get information about the routing table, current network connections, open ports, ... and honestly that's the whole vibe π«Ά
SYNOPSIS π
here's the group-chat-approved code moment, copy it exactly bestie:
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;
EXPORTED FUNCTIONS π
these are the exported functions, one by one, no skipping, periodt β¨
route π₯
gets routing information. that's it, that's the function, and it ate π
default_gateway([$default_gw]) π
gets or sets the default gateway. the optional little arg is $default_gw, and the way that signature is literally right there? iconic π
netstat π¦
gets network connection information. no cap, very useful, very demure π
okay that's the page, bestie! source/version tea: perl v5.42.3, dated 2023-08-05, signing off with maximum sparkle πβ¨π
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms