Encore des joujoux, c’est bientôt Noël

  

Et pour le fun et c’est aussi utile :

 use Net::Telnet::Cisco; $ip=$ARGV[0]; $username=$ARGV[1]; $passwd=$ARGV[2]; $ena_pass=$ARGV[3]; print "$ip $username $passwd $ena_passn"; my $session = Net::Telnet::Cisco->new(Host => $ip); $session->login($username, $passwd); # Enable mode if ($session->enable("$ena_pass") ) { # To a router $session->cmd('terminal length 0'); @output = $session->cmd('show running-config'); print "@outputn"; } else { warn "Can't enable: " . $session->errmsg; } $session->close; 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.