diff options
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/edgeos.rb | 4 | ||||
-rw-r--r-- | lib/oxidized/model/vyatta.rb | 4 |
2 files changed, 8 insertions, 0 deletions
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 <secret removed>' + cfg.gsub! /plaintext-password (\S+).*/, 'plaintext-password <secret removed>' + cfg.gsub! /password (\S+).*/, 'password <secret removed>' + cfg.gsub! /pre-shared-secret (\S+).*/, 'pre-shared-secret <secret removed>' cfg.gsub! /community (\S+) {/, 'community <hidden> {' 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 <secret removed>' + cfg.gsub! /plaintext-password (\S+).*/, 'plaintext-password <secret removed>' + cfg.gsub! /password (\S+).*/, 'password <secret removed>' + cfg.gsub! /pre-shared-secret (\S+).*/, 'pre-shared-secret <secret removed>' cfg.gsub! /community (\S+) {/, 'community <hidden> {' cfg end |