Package splunk
Class TestSplunkOutput
java.lang.Object
splunk.TestSplunkOutput
public class TestSplunkOutput
extends java.lang.Object
Tests the outputs produced for Splunk, using whatever data is pre-existing in the database
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
OUTPUT_DIR
The directory to output to -
Constructor Summary
Constructors Constructor Description TestSplunkOutput(ScanResponse scanResponse, ScanHost host, ScanHostResponse response, java.util.List<Vulnerability> vulns)
Instantiates a new Test splunk output using the provided responses, host, and vulnerabilities -
Method Summary
Modifier and Type Method Description static java.util.Collection
getTestParams()
Obtains the test params from the database's existing datavoid
run()
Runs the test, producing a HostOutput record.static void
write()
Writes all JsonNodes produced by all the tests to a file
-
Field Details
-
OUTPUT_DIR
public static final java.lang.String OUTPUT_DIRThe directory to output to- See Also:
- Constant Field Values
-
-
Constructor Details
-
TestSplunkOutput
public TestSplunkOutput(ScanResponse scanResponse, ScanHost host, ScanHostResponse response, java.util.List<Vulnerability> vulns)Instantiates a new Test splunk output using the provided responses, host, and vulnerabilities- Parameters:
scanResponse
- the scan responsehost
- the hostresponse
- the responsevulns
- the vulns
-
-
Method Details
-
getTestParams
public static java.util.Collection getTestParams()Obtains the test params from the database's existing data- Returns:
- the test params
-
run
public void run()Runs the test, producing a HostOutput record. The record is serialized into a JsonNode which is saved for writing to a file at the very end of all tests -
write
public static void write()Writes all JsonNodes produced by all the tests to a file
-