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.
A sample hook script is available in the following locations for respective control panels and the sample content is also given below. You need to copy the file as “virus_hook.php” into the same directory with your customization.
cPanel :- /usr/local/cpanel/whostmgr/docroot/cgi/cpguard/scripts/virus_hook_sample.php
DirectAdmin :- /usr/local/directadmin/plugins/cpguard/cpguard/scripts/virus_hook_sample.php
$original_path = $argv; // Original path of infected file
$quarantine_path = $argv; // Path to Quarantined file or "not-quarantined" if file was not quarantined
$virus_definition = $argv; // Virus Description
Please contact our support if you need any additional details or want any additional features with the hook script.