Polaroid Photo

Bilder från Daniel Nylander.se

Daniel Nylander.se

Ubuntu, Debian, Translation Project, GNU, Linux, UNIX, VoIP, IT-Säkerhet, experiment, väl valda ord och delvis sinnesnärvaro

Välj ett ämne:

mån
21
feb '05

Backupscript för Bluecoat Security Gateways

#!/usr/bin/perl

use Net::Telnet ();

$hostname=”1.2.3.4″; # Change this
$username=”xxxxx”; # Change this (normally ”admin”)
$passwd=”xxxxx”; # Change this
$enablepasswd=”your-enable-password”; # Change this
$prompt=”SG800-1>”; # This must be the same as your prompt

$t = new Net::Telnet (Errmode => ”return”, Timeout => 10, Prompt => ”/$prompt/”);
($x, $y) = $t->input_log($filename);
($x, $y) = $t->open(”$hostname”);
($x, $y) = $t->login($username, $passwd);
($x, $y) = $t->cmd(”enable”);
($x, $y) = $t->waitfor(’:’);
($x, $y) = $t->print(”$enablepasswd”);
$matchop = $t->prompt;
$prev = $t->prompt($matchop);
($a1, $a2) = $t->cmd(”upload configuration”);
($x, $y) = $t->cmd(”exit”);
$t->close($hostname);

Start discussion »

Skriv ett svar