summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/ios.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/ios.rb')
-rw-r--r--lib/oxidized/model/ios.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/model/ios.rb b/lib/oxidized/model/ios.rb
index aa64847..94a3ab0 100644
--- a/lib/oxidized/model/ios.rb
+++ b/lib/oxidized/model/ios.rb
@@ -27,8 +27,8 @@ class IOS < Oxidized::Model
cfg.gsub! /username (\S+) privilege (\d+) (\S+).*/, '<secret hidden>'
cfg.gsub! /^username \S+ password \d \S+/, '<secret hidden>'
cfg.gsub! /^username \S+ secret \d \S+/, '<secret hidden>'
- cfg.gsub! /^enable password \d \S+/, '<secret hidden>'
- cfg.gsub! /^enable secret \d \S+/, '<secret hidden>'
+ cfg.gsub! /^enable (password|secret) \d \S+/, '<secret hidden>'
+ cfg.gsub! /^(\s+(?:password|secret)) (?:\d )?\S+/, '\\1 <secret hidden>'
cfg.gsub! /wpa-psk ascii \d \S+/, '<secret hidden>'
cfg.gsub! /key 7 \d.+/, '<secret hidden>'
cfg.gsub! /^tacacs-server key \d \S+/, '<secret hidden>'
@@ -59,8 +59,6 @@ class IOS < Oxidized::Model
end
cfg :telnet, :ssh do
- post_login 'terminal length 0'
- post_login 'terminal width 0'
# preferred way to handle additional passwords
if vars :enable
post_login do
@@ -68,6 +66,8 @@ class IOS < Oxidized::Model
cmd vars(:enable)
end
end
+ post_login 'terminal length 0'
+ post_login 'terminal width 0'
pre_logout 'exit'
end