From 8805ae7570b3a7ee01c2839e3fb2b38a59162e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20Heum=C3=BCller?= Date: Mon, 10 Apr 2017 11:25:55 +0200 Subject: Added secret and key statements to secret removal Values changed for every show command and versioning was not possible. --- lib/oxidized/model/fortios.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model/fortios.rb') diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb index 2415537..cdaa282 100644 --- a/lib/oxidized/model/fortios.rb +++ b/lib/oxidized/model/fortios.rb @@ -15,7 +15,7 @@ class FortiOS < Oxidized::Model end cmd :secret do |cfg| - cfg.gsub! /(set (?:passwd|password|psksecret)).*/, '\\1 ' + cfg.gsub! /(set (?:passwd|password|psksecret|secret|key ENC)).*/, '\\1 ' cfg.gsub! /(set private-key).*-+END ENCRYPTED PRIVATE KEY-*"$/m , '\\1 ' cfg end -- cgit v1.2.1 From 1da216558e9392d3465dba2e6bb79d0221e43c03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20Heum=C3=BCller?= Date: Tue, 16 May 2017 14:21:04 +0200 Subject: fortios.rb fortios_autoupdate remove FDS Address The output of "diagnose autoupdate version" contains the FortiGuard Distribution Server (FDS) address. This IP address changes several times per week and therefore versioning is hardly possible. Added a line to remove the IP address when fortios_autoupdate is set true. --- lib/oxidized/model/fortios.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/oxidized/model/fortios.rb') diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb index cdaa282..0249933 100644 --- a/lib/oxidized/model/fortios.rb +++ b/lib/oxidized/model/fortios.rb @@ -38,6 +38,7 @@ class FortiOS < Oxidized::Model #do not include if variable "show_autoupdate" is set to false if defined?(vars(:fortios_autoupdate)).nil? || vars(:fortios_autoupdate) cfg << cmd('diagnose autoupdate version') do |cfg| + cfg.gsub! /(FDS Address\n---------\n).*/, '\\1IP Address removed' comment cfg.each_line.reject { |line| line.match /Last Update|Result/ }.join end end -- cgit v1.2.1