Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revision Both sides next revision
archive:mod_security-tips [2015/10/26 20:09]
Michael Alegre archived
archive:mod_security-tips [2019/06/06 15:27]
qtwrk
Line 12: Line 12:
 **@inspectFile support added as of LSWS 5.1.** **@inspectFile support added as of LSWS 5.1.**
  
-Some alternatives:+When use @inspectFile with 3rd-party scanner, please make sure the script returns ''​0''​ for block , and ''​1''​ for continue/​pass. 
 + 
 +Example code from mod_security [[https://​github.com/​SpiderLabs/​ModSecurity/​wiki/​Reference-Manual-%28v2.x%29#​inspectfile|reference manual]]: 
 + 
 +<​code>​ 
 +$output = "0 Unable to parse clamscan output [$1]";​ 
 + 
 +if ($error_message =~ m/: Empty file\.?$/) { 
 +    $output = "1 empty file";​ 
 +
 +elsif ($error_message =~ m/: (.+) ERROR$/) { 
 +    $output = "0 clamscan: $1"; 
 +
 +elsif ($error_message =~ m/: (.+) FOUND$/) { 
 +    $output = "0 clamscan: $1"; 
 +
 +elsif ($error_message =~ m/: OK$/) { 
 +    $output = "1 clamscan: OK"; 
 +
 +</​code>​ 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 + 
 +==== Some Alternatives===== 
  
 <​file>​ <​file>​
  • Admin
  • Last modified: 2019/06/06 15:35
  • by Michael Alegre