cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
368
Views
0
Helpful
2
Replies

Script to reload PIX

johnvojtech
Level 1
Level 1

Does someone know of or has created a script to login to a PIX and reload it without any intervention from the user? I can figure this out with Putty, but I was hoping to find a self contained script that any user can run from anywhere. The user would not know the commands used or the username/password. Any help would be great.

Thanks.

2 Replies 2

Patrick Iseli
Level 7
Level 7

Hello John,

I have not configured that but the basic problem is that in the scipt itself the username and password would anyway be in clear text, which is a bad idea.

Anyway you could use Expect or Rancid in an Linux or Unix envoronment or Perl in windows of unix system.

Links:

http://www.shrubbery.net/rancid/

http://expect.nist.gov/#examples

http://www.perl.com/download.csp#binary

Hope that gets you one step further.

sincerely

Patrick

sbianchi
Level 1
Level 1

with perl and some change (the complete code i 'had done will use a web page) will be like:

$session->login($conf{LOGIN}, $conf{PASS});

die "Non sono riusciato ad aprire il telnet\n" if(! $session);

$ok = $session->enable(Password => $conf{ENAPASS}, Level => $conf{ENALEVEL});

if ( $ok eq 0)

{

print STDERR "Enable Failed\n";

}else{

# Execute a command

@output1 = $session->cmd('configure terminal');

@output2 = $session->cmd('controller e1 1/0');

@output3 = $session->cmd('loop');

sleep(3);

@output4 = $session->cmd('no loop');

@output5 = $session->cmd('end');

print "1> @output1
\n2> @output2
\n3> @output3
\n4> @output4
\n5> @output5
\n";

print STDERR "Warning !! loop no loop\n1> @output1\n2> @output2\n3> @output3\n4> @output4\n5> @output5\n";

}

Review Cisco Networking for a $25 gift card