Rex::Co...Network(3)

πŸ“¦ version 1.14.3, in nixos 26.05, nixpkgs unstable

πŸ¦‹ 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