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
| import os | |
| import sys | |
| import time | |
| from subprocess import Popen, DEVNULL | |
| import datetime | |
| from scapy.all import IP, UDP, NTP | |
| from netfilterqueue import NetfilterQueue | |
| def get_switch_ip(): |
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 class provides a base class for search commands that handles much of the Splunk-to-Python | |
| interaction necessary for making a search command. | |
| This is licensed under the Apache License Version 2.0 | |
| See https://www.apache.org/licenses/LICENSE-2.0.html | |
| To make a search command, you will need to: | |
| 1) Sub-class the search command (see below for an example) | |
| 2) Declare your search command in commands.conf |