From: Steinar H. Gunderson Date: Wed, 29 Mar 2006 12:53:40 +0000 (+0000) Subject: Put Zyxel password in config.pm. X-Git-Url: https://git.sesse.net/?p=nms;a=commitdiff_plain;h=ce95bb11a855774a36fb21c0d16cfd0d6be3669d Put Zyxel password in config.pm. --- diff --git a/include/config.pm b/include/config.pm index af5fa79..1e5e5f2 100644 --- a/include/config.pm +++ b/include/config.pm @@ -11,4 +11,6 @@ our $db_host = "localhost"; our $db_username = "nms"; our $db_password = "nms"; +our $zyxel_password = "removed"; + 1; diff --git a/web/smanagement.pl b/web/smanagement.pl index e647458..57fa1fc 100755 --- a/web/smanagement.pl +++ b/web/smanagement.pl @@ -1,11 +1,6 @@ #!/usr/bin/perl use lib '../include'; use nms; -# -# - -my $username = ''; -my $password = 'removed'; # Seconds to wait for connection my $timeout = 15; @@ -65,7 +60,7 @@ sub switch_connect($) { #$conn->login( Prompt => '/password[: ]*$/i', # Name => $password, # Password => $password); - $conn->cmd($password); + $conn->cmd($nms::config::zyxel_password); # Get rid of banner $conn->get; return ($conn); diff --git a/web/ssendfile.pl b/web/ssendfile.pl index d64de05..0901b8b 100755 --- a/web/ssendfile.pl +++ b/web/ssendfile.pl @@ -7,7 +7,6 @@ use strict; use Net::Telnet; use POSIX; -my $password = 'removed'; my $timeout = 15; my $delaytime = 30; my $poll_frequency = 60; @@ -44,7 +43,7 @@ sub switch_connect($) { #$conn->login(»·Prompt => '/password[: ]*$/i', # Name => $password, # Password => $password); - $conn->cmd($password); + $conn->cmd($nms::config::zyxel_password); # Get rid of banner $conn->get; return ($conn); diff --git a/web/sshow.pl b/web/sshow.pl index a16da77..24ca128 100755 --- a/web/sshow.pl +++ b/web/sshow.pl @@ -1,11 +1,6 @@ #!/usr/bin/perl use lib '../include'; use nms; -# -# - -my $username = ''; -my $password = 'removed'; # Seconds to wait for connection my $timeout = 15; diff --git a/web/tempfetch.pl b/web/tempfetch.pl index 3a5c84d..76966e6 100644 --- a/web/tempfetch.pl +++ b/web/tempfetch.pl @@ -9,10 +9,8 @@ use lib '../include'; use nms; use strict; use warnings; -#require 'SNMP_Session.pm'; # Tweak timeouit og sjekk med :support||:net hva passord vil bli -my $password = 'removed'; my $timeout = 25; my $location = 'skipet'; @@ -125,7 +123,7 @@ sub switch_connect { #$conn->login( Prompt => '/password[: ]*$/i', # Name => $password, # Password => $password); - my @data = $conn->cmd($password); + my @data = $conn->cmd($nms::config::zyxel_password); # Get rid of banner $conn->get; return ($conn);