#!/usr/bin/perl
my $password = $ARGV[0];
my $enable_password = $ARGV[1];
my $host = $ARGV[2];
use Net::Telnet::Cisco;
my $session = Net::Telnet::Cisco->new( Host => "$ARGV[2]" );
$session->login( Password => "$ARGV[0]" );
$session->enable( "$enable_password" );
my @cmds = $session->cmd( 'show run' );
print @cmds;
$session->close;
沒有留言:
張貼留言