-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support Cisco ASA and misc fixes Fixes #14 Fixes #15 Fixes #16 * Test Refactor Fixes #18 Fixes #19 * New filter cisco IOS Fixes #20 * Update .env.template
- Loading branch information
Ryan Faircloth
authored and
GitHub
committed
Jul 15, 2019
1 parent
84b1f84
commit 5c885dc
Showing
13 changed files
with
1,931 additions
and
168 deletions.
There are no files selected for viewing
This file contains 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 file contains 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 file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # =============================================================================================== | ||
| # Cisco IOS (Route/Switch) | ||
| # =============================================================================================== | ||
|
|
||
| log { | ||
|
|
||
| source(s_default-ports); | ||
|
|
||
| parser { cisco-parser(); }; | ||
|
|
||
| parser {p_add_context_splunk(key("cisco:ios")); }; | ||
| rewrite { r_set_splunk_basic(template("t_msg_only"))}; #--HEC-- | ||
| destination(d_hec); #--HEC-- | ||
|
|
||
| flags(final); | ||
| }; |
This file contains 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 file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Copyright 2019 Splunk, Inc. | ||
| # | ||
| # Use of this source code is governed by a BSD-2-clause-style | ||
| # license that can be found in the LICENSE-BSD2 file or at | ||
| # https://opensource.org/licenses/BSD-2-Clause |
This file contains 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # Copyright 2019 Splunk, Inc. | ||
| # | ||
| # Use of this source code is governed by a BSD-2-clause-style | ||
| # license that can be found in the LICENSE-BSD2 file or at | ||
| # https://opensource.org/licenses/BSD-2-Clause | ||
| import os | ||
| import random | ||
| from time import sleep | ||
|
|
||
| import pytest | ||
| import splunklib.client as client | ||
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def setup_wordlist(): | ||
| path_to_current_file = os.path.realpath(__file__) | ||
| current_directory = os.path.split(path_to_current_file)[0] | ||
| path_to_file = os.path.join(current_directory, "data/wordlist.txt") | ||
|
|
||
| wordlist = [line.rstrip('\n') for line in open(path_to_file)] | ||
| return wordlist | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def get_host_key(setup_wordlist): | ||
| part1 = random.choice(setup_wordlist) | ||
| part2 = random.choice(setup_wordlist) | ||
| host = "{}-{}".format(part1, part2) | ||
|
|
||
| return host | ||
|
|
||
|
|
||
| @pytest.fixture | ||
| def setup_splunk(): | ||
| tried = 0 | ||
| while True: | ||
| try: | ||
| c = client.connect(username="admin", password="Changed@11", host="splunk", port="8089") | ||
| break | ||
| except ConnectionRefusedError: | ||
| tried += 1 | ||
| if tried > 180: | ||
| raise | ||
| sleep(1) | ||
| return c |
Oops, something went wrong.