mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Use new list verification function for 'file_path'
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
import json
|
||||
import helpers
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import csv
|
||||
|
||||
|
||||
def checkConfigRequirements(conf):
|
||||
if "file_path" not in conf or len(conf['file_path']) == 0:
|
||||
sys.exit(126)
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def searchFile(artifact, csvfiles):
|
||||
dir = os.path.dirname(os.path.realpath(__file__))
|
||||
found = []
|
||||
@@ -54,7 +46,7 @@ def prepareResults(raw):
|
||||
|
||||
|
||||
def analyze(conf, input):
|
||||
checkConfigRequirements(conf)
|
||||
helpers.verifyNonEmptyListValue(conf, 'file_path')
|
||||
meta = helpers.loadMetadata(__file__)
|
||||
data = helpers.parseArtifact(input)
|
||||
helpers.checkSupportedType(meta, data["artifactType"])
|
||||
|
||||
Reference in New Issue
Block a user