8000 Additional scrubbing for SonicOS v7 devices by gerard780 · Pull Request #2398 · ytti/oxidized · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Additional scrubbing for SonicOS v7 devices #2398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
2 commits merged into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- scrub PoE related messages from routeros config output (@pioto)
- support for d-link dgs-1100 series switches in dlink model (@glaubway)
- enterasys model now works with both ro and rw access (@sargon)
- Additional scrubbing for SonicOS v7 devices (@gerard780)

### Fixed

Expand Down
4 changes: 4 additions & 0 deletions lib/oxidized/model/sonicos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class SonicOS < Oxidized::Model
cfg.gsub! /bind-password \d\,(\S+)/, 'bind-password <secret hidden> \2'
cfg.gsub! /authentication sha1 \d\,(\S+)/, 'authentication sha1 <secret hidden> \2'
cfg.gsub! /encryption aes \d\,(\S+)/, 'encryption aes <secret hidden> \2'
cfg.gsub! /smtp-pass \d\,(\S+)/, 'smtp-pass <secret hidden> \2'
cfg.gsub! /pop-pass \d\,(\S+)/, 'pop-pass <secret hidden> \2'
cfg
end

Expand All @@ -38,6 +40,8 @@ class SonicOS < Oxidized::Model
def clean(cfg)
out = []
cfg.each_line do |line|
next if line =~ /date \d{4}\:\d{2}\:\d{2}/
next if line =~ /time \d{2}\:\d{2}:\d{2}/
next if line =~ /system-time \"\d{2}\/\d{2}\/\d{4} \d{2}\:\d{2}:\d{2}.\d+\"/
next if line =~ /system-uptime "(\s+up\s+\d+\s+)|(.*Days.*)"/
next if line =~ /checksum \d+/
Expand Down
0