mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
Merge pull request #10739 from Security-Onion-Solutions/yararules
include *.yara
This commit is contained in:
@@ -18,8 +18,10 @@ SORULEDIR=/nsm/rules/yara
|
|||||||
OUTPUTDIR=/opt/so/saltstack/local/salt/strelka/rules
|
OUTPUTDIR=/opt/so/saltstack/local/salt/strelka/rules
|
||||||
|
|
||||||
mkdir -p $OUTPUTDIR
|
mkdir -p $OUTPUTDIR
|
||||||
|
# remove all rules prior to copy so we can clear out old rules
|
||||||
|
rm -f $OUTPUTDIR/*
|
||||||
|
|
||||||
for i in $(find $SORULEDIR -name "*.yar"); do
|
for i in $(find $SORULEDIR -name "*.yar" -o -name "*.yara"); do
|
||||||
rule_name=$(echo $i | awk -F '/' '{print $NF}')
|
rule_name=$(echo $i | awk -F '/' '{print $NF}')
|
||||||
if [[ ! "${excluded_rules}" =~ ${rule_name} ]]; then
|
if [[ ! "${excluded_rules}" =~ ${rule_name} ]]; then
|
||||||
echo "Adding rule: $rule_name..."
|
echo "Adding rule: $rule_name..."
|
||||||
|
|||||||
Reference in New Issue
Block a user