From ed360a3ec0cc3e61d6cfc426e106b6e188561830 Mon Sep 17 00:00:00 2001 From: broxio Date: Sun, 15 May 2016 06:47:09 +0800 Subject: Update acos.rb add post_login to send "en" to enter privilege mode with-out password --- lib/oxidized/model/acos.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/oxidized/model/acos.rb b/lib/oxidized/model/acos.rb index ec3ef11..e686a59 100644 --- a/lib/oxidized/model/acos.rb +++ b/lib/oxidized/model/acos.rb @@ -56,20 +56,18 @@ class ACOS < Oxidized::Model username /login:/ password /^Password:/ end - + cfg :telnet, :ssh do # preferred way to handle additional passwords if vars :enable post_login do - send "enable\r" - send vars(:enable) + "\r" + send "enable\r\n" + send vars(:enable) + "\r\n" end end + post_login "en\r\n" post_login 'terminal length 0' post_login 'terminal width 0' - post_login 'terminal idle-timeout 10' - post_login "en\n" pre_logout "exit\nexit\nY\r\n" end - end -- cgit v1.2.1