diff options
Diffstat (limited to 'lib/oxidized/model/gaiaos.rb')
-rw-r--r-- | lib/oxidized/model/gaiaos.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/oxidized/model/gaiaos.rb b/lib/oxidized/model/gaiaos.rb index 434e774..8f13bcb 100644 --- a/lib/oxidized/model/gaiaos.rb +++ b/lib/oxidized/model/gaiaos.rb @@ -1,25 +1,23 @@ class GaiaOS < Oxidized::Model - # CheckPoint - Gaia OS Model - + # Gaia Prompt prompt /^([\[\]\w.@:-]+[#>]\s?)$/ # Comment tag comment '# ' - cmd :all do |cfg| cfg = cfg.each_line.to_a[1..-2].join end cmd :secret do |cfg| cfg.gsub! /^(set expert-password-hash ).*/, '\1<EXPERT PASSWORD REMOVED>' - cfg.gsub! /^(set user \S+ password-hash ).*/,'\1<USER PASSWORD REMOVED>' - cfg.gsub! /^(set ospf .* secret ).*/,'\1<OSPF KEY REMOVED>' - cfg.gsub! /^(set snmp community )(.*)( read-only.*)/,'\1<SNMP COMMUNITY REMOVED>\3' - cfg.gsub! /^(add snmp .* community )(.*)(\S?.*)/,'\1<SNMP COMMUNITY REMOVED>\3' - cfg.gsub! /(auth|privacy)(-pass-phrase-hashed )(\S*)/,'\1-pass-phrase-hashed <SNMP PASS-PHRASE REMOVED>' + cfg.gsub! /^(set user \S+ password-hash ).*/, '\1<USER PASSWORD REMOVED>' + cfg.gsub! /^(set ospf .* secret ).*/, '\1<OSPF KEY REMOVED>' + cfg.gsub! /^(set snmp community )(.*)( read-only.*)/, '\1<SNMP COMMUNITY REMOVED>\3' + cfg.gsub! /^(add snmp .* community )(.*)(\S?.*)/, '\1<SNMP COMMUNITY REMOVED>\3' + cfg.gsub! /(auth|privacy)(-pass-phrase-hashed )(\S*)/, '\1-pass-phrase-hashed <SNMP PASS-PHRASE REMOVED>' cfg end @@ -36,11 +34,9 @@ class GaiaOS < Oxidized::Model cfg end - cfg :ssh do # User shell must be /etc/cli.sh post_login 'set clienv rows 0' pre_logout 'exit' end - end |