Sha256: 1cdc6304b8e08452aff46d2e7dce162ffbec6843d7643396a7e3ee34be86361b
Contents?: true
Size: 871 Bytes
Versions: 3
Compression:
Stored size: 871 Bytes
Contents
class ScreenOS < Oxidized::Model # Netscreen ScreenOS model # comment '! ' prompt /^[\w.:()-]+->\s?$/ cmd :all do |cfg| cfg.each_line.to_a[1..-2].join end cmd :secret do |cfg| cfg.gsub! /^(set admin name) .*|^(set admin password) .*/, '\\1 <removed>' cfg.gsub! /^(set admin user .* password) .* (.*)/, '\\1 <removed> \\2' cfg.gsub! /(secret|password|preshare) .*/, '\\1 <secret hidden>' cfg end cmd 'get system' do |cfg| cfg.gsub! /^Date .*\n/, '' cfg.gsub! /^Up .*\n/, '' cfg.gsub! /(current bw ).*/, '\\1 <removed>' comment cfg end cmd 'get config' do |cfg| cfg.each_line.to_a[1..-1].join end cfg :telnet do username '/^login:/' password '/^password:/' end cfg :telnet, :ssh do post_login 'set console page 0' pre_logout do send "exit\n" send "n" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.29.0 | lib/oxidized/model/screenos.rb |
oxidized-0.28.0 | lib/oxidized/model/screenos.rb |
oxidized-0.27.0 | lib/oxidized/model/screenos.rb |