Knowledge Base

Hook Script after file detection

cPGuard allows you to run a script after detecting a bad file, in which you can run necessary actions on the affected file. In hook script, you will get the following details as arguments.

  • The original path of infected file
  • Path to Quarantined file or "not-quarantined" if the file is not quarantined
  • Virus Description

A sample hook script is available in the location "/usr/local/cpanel/whostmgr/docroot/cgi/cpguard/script/virus_hook.php" 

<?php


$original_path = $argv[1];      // Original path of infected file
$quarantine_path = $argv[2];    // Path to Quarantined file or "not-quarantined" if file was not quarantined
$virus_definition = $argv[3];   // Virus Description

?>

Please contact our support if you need any additional details or want any additional features with hook script. 

Please rate this article to help us improve our Knowledge Base.

0 0