Created
August 19, 2017 03:36
-
-
Save kyhwana/8ce9275bc64a22963e0cb814b465e7b5 to your computer and use it in GitHub Desktop.
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
inotifywait -m /opt/dionaea/var/dionaea/binaries/ -e create | | |
while read path action file; do | |
if [[ "$file" != *"smb"* ]]; then | |
if [[ "$file" != *"httpupload"* ]]; then | |
date=`date` | |
echo "The file '$file' appeared in directory '$path' via '$action' at '$date'" | |
firejail --quiet yara -w /opt/dionaea/rules-master/malware_index.yar $path$file | |
firejail --quiet clamscan $path$file --no-summary | |
fi | |
fi | |
# do something with the file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment