From 577128f962f02e81ce7664e32fb97a46f2c220e8 Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Thu, 15 Mar 2018 01:54:55 -0700 Subject: add removal of secrets in edgeos, vyatta --- lib/oxidized/model/edgeos.rb | 4 ++++ lib/oxidized/model/vyatta.rb | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/edgeos.rb b/lib/oxidized/model/edgeos.rb index bb0aab5..aa7a197 100644 --- a/lib/oxidized/model/edgeos.rb +++ b/lib/oxidized/model/edgeos.rb @@ -9,6 +9,10 @@ class Edgeos < Oxidized::Model end cmd :secret do |cfg| + cfg.gsub! /encrypted-password (\S+).*/, 'encrypted-password ' + cfg.gsub! /plaintext-password (\S+).*/, 'plaintext-password ' + cfg.gsub! /password (\S+).*/, 'password ' + cfg.gsub! /pre-shared-secret (\S+).*/, 'pre-shared-secret ' cfg.gsub! /community (\S+) {/, 'community {' cfg end diff --git a/lib/oxidized/model/vyatta.rb b/lib/oxidized/model/vyatta.rb index aa0bc74..57ec9d3 100644 --- a/lib/oxidized/model/vyatta.rb +++ b/lib/oxidized/model/vyatta.rb @@ -9,6 +9,10 @@ class Vyatta < Oxidized::Model end cmd :secret do |cfg| + cfg.gsub! /encrypted-password (\S+).*/, 'encrypted-password ' + cfg.gsub! /plaintext-password (\S+).*/, 'plaintext-password ' + cfg.gsub! /password (\S+).*/, 'password ' + cfg.gsub! /pre-shared-secret (\S+).*/, 'pre-shared-secret ' cfg.gsub! /community (\S+) {/, 'community {' cfg end -- cgit v1.2.1