Differences

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

Link to this comparison view

Both sides previous revision Previous revision
archive:mod_security-tips [2019/06/06 15:27]
qtwrk
archive:mod_security-tips [2019/06/06 15:35] (current)
Michael Alegre old revision restored (2015/10/26 20:09)
Line 12: Line 12:
 **@inspectFile support added as of LSWS 5.1.** **@inspectFile support added as of LSWS 5.1.**
  
-When use @inspectFile with 3rd-party scanner, please make sure the script returns ''​0''​ for block , and ''​1''​ for continue/​pass. +Some alternatives:
- +
-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