DOKK / manpages / debian 12 / rex / Rex::Commands::Network.3pm.en
Rex::Commands::Network(3pm) User Contributed Perl Documentation Rex::Commands::Network(3pm)

Rex::Commands::Network - Network Module

With this module you can get information of the routing table, current network connections, open ports, ...

 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;

Get routing information

Get or set the default gateway.

Get network connection information

2023-03-06 perl v5.36.0