Jump to content
Sign in to follow this  
runthis

Add Simple Virus Scanning with ClamAV

Recommended Posts

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...