ballouta Posted September 20, 2008 Share Posted September 20, 2008 Hello i prepared an upload page for some customers on my website, but how i can make sure that the files uploaded are not infected with a virus or they are not uploading bad files? How do I protect myweb ? Thank You Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/ Share on other sites More sharing options...
.josh Posted September 20, 2008 Share Posted September 20, 2008 I would suggest using a virus protection program for viruses. As far as "bad" files... what would you call "bad?" Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-646469 Share on other sites More sharing options...
ballouta Posted September 20, 2008 Author Share Posted September 20, 2008 Hi of course i have KasperInternet Security but what about the customers? what if one of them uploaded an infected file? is teh hosting company responsible about scanning uploads? i mean by 'bad' infected files or virus files! Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-646620 Share on other sites More sharing options...
Wuhtzu Posted September 20, 2008 Share Posted September 20, 2008 You can do this with a standard webhotel / shared host solution using just PHP. But infected files or intentionally malicious files can't do anything until they are executed. The file would just be lying around. Of course if you then download the files and execute them you could be harmed by milicious / infected files. So what do you users / customers upload and what do you do with the uploaded files? Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-646671 Share on other sites More sharing options...
rarebit Posted September 20, 2008 Share Posted September 20, 2008 Generally when you upload a file, you then move it and rename it. Before doing that you'd execute a system command to run ya anti-virus on the file, if result good then move and rename, otherwise throw away and insult the offender grabbing all info possible. Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-646674 Share on other sites More sharing options...
Zane Posted September 20, 2008 Share Posted September 20, 2008 this isn't the greatest information but it can't hurt http://www.phpfreaks.com/forums/index.php?topic=209414.0 pretty much you are looking for a Command Line Anti-Virus program for whatever OS your webserver is running. If you can find the perfect one....then get it and install it on your webserver and use the exec function Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-646685 Share on other sites More sharing options...
redarrow Posted September 20, 2008 Share Posted September 20, 2008 I had a problam once were i got a upload script to upload .exe files for clients, Then the idiots come along and started to add infected/virus files to the server so i was peed ...... my solution was..... i used a 3rd party dos application to cheek the files uploaded, if it foud the users file had a virus it deleted that file or put in in the chest of the 3rd party program told the current user the file was infected and deleted....... this was done using exec() php function.................. Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-646686 Share on other sites More sharing options...
ballouta Posted September 22, 2008 Author Share Posted September 22, 2008 Thank you all for help Quote Link to comment https://forums.phpfreaks.com/topic/125086-solved-virus-scan-while-uploading/#findComment-647550 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.