diff options
author | Ultra2D <Ultra2D@users.noreply.github.com> | 2017-02-10 10:02:32 +0100 |
---|---|---|
committer | Ultra2D <Ultra2D@users.noreply.github.com> | 2017-02-10 10:02:32 +0100 |
commit | 81ad5c8bdb6519f7c1434bb3cd21fde791259a86 (patch) | |
tree | 78bdbdaf96207c65c0fada9314f503c2920f8db5 | |
parent | 0f68436f7f41b244428c606177a9dd53541ace95 (diff) |
Remove (some) secrets from Comware config
-rw-r--r-- | lib/oxidized/model/comware.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oxidized/model/comware.rb b/lib/oxidized/model/comware.rb index 27b70ae..d926854 100644 --- a/lib/oxidized/model/comware.rb +++ b/lib/oxidized/model/comware.rb @@ -18,6 +18,12 @@ class Comware < Oxidized::Model cfg.each_line.to_a[1..-2].join end + cmd :secret do |cfg| + cfg.gsub! /^( snmp-agent community).*/, '\\1 <configuration removed>' + cfg.gsub! /^( password hash).*/, '\\1 <configuration removed>' + cfg + end + cfg :telnet do username /^Username:$/ password /^Password:$/ |