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
#!/usr/bin/lua | |
--[[ | |
This script can be used to inspect uploaded files for viruses | |
via ClamAV. To implement, use with the following ModSecurity rule: | |
SecRule FILES_TMPNAMES "@inspectFile /opt/modsecurity/bin/modsec-clamscan.lua" "phase:2,t:none,log,deny" | |
Author: Angelo Conforti (based on Josh Amishav-Zlatin code) | |
Requires the clamav-server and clamav-scanner | |