diff options
author | broxio <madpenguin7@gmail.com> | 2016-05-15 06:47:09 +0800 |
---|---|---|
committer | broxio <madpenguin7@gmail.com> | 2016-05-15 06:47:09 +0800 |
commit | ed360a3ec0cc3e61d6cfc426e106b6e188561830 (patch) | |
tree | ab2ecab1e4b3e0f4831153f8427da383985115a0 /lib/oxidized | |
parent | c396eafd3dcd7f2853665a9b6771e346a8b24eac (diff) |
Update acos.rb
add post_login to send "en" to enter privilege mode with-out password
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/model/acos.rb | 10 |
1 files 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 |