runthis Posted April 7, 2013 Share Posted April 7, 2013 If you are running a Dedicated or VPS solution this is a nice thing to add to your admin backend for some nice malware scanning on the fly. Go ahead and install clamav. (Google is thy friend). This code will scan your public_html, or folder you designate and provide you the data $scan=shell_exec("clamscan -ri /home/YOUR USER/public_html"); $scan="<pre>".$scan."</pre>"; echo $scan; The command clamscan -ri means run clamscan, check sub folders and files as well ( r ) and also only display files if found to be infected only ( i ). A full list of clamscans features via command line can be found here http://linux.die.net/man/1/clamscan Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.