From ed7c5574a197605658dfc5c8d5563d55e483eef3 Mon Sep 17 00:00:00 2001 From: Arnoud Vermeer Date: Mon, 22 Aug 2016 15:22:30 +0200 Subject: Remove secrets from A10 config and 'show running-config' doesn't have 'all-partitions' in 64-bit Advanced Core OS (ACOS) version 4.1.0-P4, build 12 (Jul-22-2016,15:49) --- lib/oxidized/model/acos.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/oxidized/model/acos.rb b/lib/oxidized/model/acos.rb index bb9846e..f4d4464 100644 --- a/lib/oxidized/model/acos.rb +++ b/lib/oxidized/model/acos.rb @@ -6,6 +6,13 @@ class ACOS < Oxidized::Model ##ACOS prompt changes depending on the state of the device prompt /^([-\w.\/:?\[\]\(\)]+[#>]\s?)$/ + cmd :secret do |cfg| + cfg.gsub!(/community read encrypted (\S+)/, 'community read encrypted ') # snmp + cfg.gsub!(/secret encrypted (\S+)/, 'secret encrypted ') # tacacs-server + cfg.gsub!(/password encrypted (\S+)/, 'password encrypted ') # user + cfg + end + cmd 'show version' do |cfg| cfg.gsub! /\s(Last configuration saved at).*/, ' \\1 ' cfg.gsub! /\s(Memory).*/, ' \\1 ' @@ -22,7 +29,7 @@ class ACOS < Oxidized::Model comment cfg end - cmd 'show running-config all-partitions' do |cfg| + cmd 'show running-config' do |cfg| cfg.gsub! /(Current configuration).*/, '\\1 ' cfg.gsub! /(Configuration last updated at).*/, '\\1 ' cfg.gsub! /(Configuration last saved at).*/, '\\1 ' -- cgit v1.2.1 From 2c4ac17756320fa4abba2eee9ad32badb15043c7 Mon Sep 17 00:00:00 2001 From: Arnoud Vermeer Date: Mon, 22 Aug 2016 15:23:59 +0200 Subject: Cisco Adaptive Security Appliance Software Version 9.4(2)6 reports TACACS config like this: aaa-server tacacs (OUTSIDE) host 192.168.1.1 key assadasda Updated the regex to be backward compatible. --- lib/oxidized/model/asa.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oxidized/model/asa.rb b/lib/oxidized/model/asa.rb index a41348e..df30059 100644 --- a/lib/oxidized/model/asa.rb +++ b/lib/oxidized/model/asa.rb @@ -15,7 +15,7 @@ class ASA < Oxidized::Model cfg.gsub! /username (\S+) password (\S+) (.*)/, 'username \1 password