Tsukiyomi Posted March 21, 2007 Share Posted March 21, 2007 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. Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 21, 2007 Share Posted March 21, 2007 have a look at virus protection that can be run through the command prompt and use shell() function to execute the required command Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 21, 2007 Share Posted March 21, 2007 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. Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 21, 2007 Share Posted March 21, 2007 Doing that builds an innacurate database y ot get the content type of the file to be uploaded and just deny executables etc... Quote Link to comment Share on other sites More sharing options...
Tsukiyomi Posted March 21, 2007 Author Share Posted March 21, 2007 Use a free antivirus command line program then use the exec() function to cheek the files needed to be scanned Any suggestions for a good free virus protector that I can run with the exec() function? Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 21, 2007 Share Posted March 21, 2007 shaunrigby WHAT? Quote Link to comment Share on other sites More sharing options...
shaunrigby Posted March 21, 2007 Share Posted March 21, 2007 try AVG (http://free.grisoft.com) Not too sure how to run it through command prompt tho... Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 21, 2007 Share Posted March 21, 2007 http://www.snapfiles.com/get/fprotdos.html Quote Link to comment Share on other sites More sharing options...
Tsukiyomi Posted March 21, 2007 Author Share Posted March 21, 2007 Awesome, thank you very much. Last question (I hate to be a bother) is where would I go to learn how to get responses from this so I can know wether or not the file in question has come back with a virus? Quote Link to comment Share on other sites More sharing options...
jcbarr Posted March 21, 2007 Share Posted March 21, 2007 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. Quote Link to comment Share on other sites More sharing options...
Tsukiyomi Posted March 22, 2007 Author Share Posted March 22, 2007 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? Quote Link to comment Share on other sites More sharing options...
jcbarr Posted March 22, 2007 Share Posted March 22, 2007 That is something that you will have to look in to with the actual software itself. I guess after the scan runs you could then check to see if the file exists in the folder and if it does then it didn't get deleted and if it doesn't then it did get deleted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.