Created
October 10, 2017 00:19
-
-
Save mpurzynski/6ad07448ef001041f21735d82dc5ca49 to your computer and use it in GitHub Desktop.
filter_noise_files.bro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| # | |
| # Contributor(s): | |
| # Michal Purzynski [email protected] | |
| # | |
| module LogFilter; | |
| event bro_init() | |
| { | |
| Log::remove_default_filter(Files::LOG); | |
| Log::add_filter(Files::LOG, [$name = "files-noise", | |
| $pred(rec: Files::Info) = { | |
| local result = T; | |
| for (tx_host in rec$tx_hosts) { | |
| if (Site::is_local_addr(tx_host) == T) { | |
| if ((rec?$mime_type) && (/^application\/pkix-cert$/ in rec$mime_type)) | |
| result = F; | |
| } | |
| else | |
| result = T; | |
| } | |
| return result; | |
| } | |
| ]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment