logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Rex::Commands::Network - Network Module

Description

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

Exported Functions

route
       Get routing information

   default_gateway([$default_gw])
       Get or set the default gateway.

   netstat
       Get network connection information

perl v5.40.0                                       2025-02-06                        Rex::Commands::Network(3pm)

Name

       Rex::Commands::Network - Network Module

Synopsis

        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;

See Also