Jump to content

Scanning uploaded files


Tsukiyomi

Recommended Posts

I know this has probably been asked quite a few times, but I can never seem to find an answer with all the details.

 

I'm building a site which will allow people to upload images, word documents, music and if they pay a premium videos.

 

My concern is someone purposefully (or accidentally for that matter) uploading a file infected with a virus.

 

I want to scan all files being uploaded and only copy them to the proper directory once they check out, if they don't I want to delete them and notify the user.

 

My question is how would I go about installing and implementing a virus protector.  I'm totally fine with having to purchase software to install I just need to know what I need, where I can get it and if possible how I use it.

 

Any help would be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/43752-scanning-uploaded-files/
Share on other sites

Use a free antivirus command line program then use the exec() function to cheek the files needed to be scanned, Then move the files that have been found not to have been infected by the shell program to the correct folder then delete the virused files.

 

This is a pain in realty get a virus program for your server to delete the virus or clean it.

 

why not just run a virus cheek off a night time and clean all files if any files have a virus then delete the virus or clean them that the easy solution.

 

 

When you delete it you can have your script send an email, add an entry to the database stating that the file has been stripped due to a virus, anything, just have it execute if and only if the file is deleted by the virus scan.

 

My question though is how I get a response from the virus scanner to know what its done.  When I run the program does it automatically return a value for the action its taken or do I have to take special steps?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.