Virus scanning for dynamically uploaded files
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Krishnan_Balasubramanian
Posted On:   Thursday, November 28, 2002 06:29 PM

We have an application that actually allows customers to upload files to our solaris server. WE need to have a facility that would scan the file before actually uploading to the desired directory. This would allow us to reject files suspected to have viruses.Kindly help us with some info on how to achieve the above.

Re: Virus scanning for dynamically uploaded files

Posted By:   Gautam_Marwaha  
Posted On:   Sunday, December 1, 2002 11:10 PM

You could allow files to be first uploaded to temp location, start the virus scan for that particular file, read results and if they look good move the file to its proper location. Problem is how to start a virus scan for a specified file and then understand whether or not the file was infected. The answer to both lies in what virus scan you want to use - whether it provides hooks for programmatic execution using java/native code, what is the format in which it provides the scan report. A very crude approach can be to use Runtime.exec to start the virus scan for that file (assuming you can pass the file name as an argument) and read the inout stream from the Process to see what happened...pretty crude...
About | Sitemap | Contact