How to upload and scan files with anti-virus software on Java?
•
Java
I'm working on an application that needs file upload, and it also needs
I've heard of the APIs application server provided by Symantec
For example, I need to deploy applications in different places in the future So I'm thinking about putting a configuration file where I can get the available antivirus & its path
I want to use any available antivirus software on the server, use the command line, and I want to pass the file name and results
I was confused when passing files and search results
Is it possible?
Solution
Use the following code
String[] commands = new String[5]; commands[0] = "cmd"; commands[1] = "/c"; commands[2] = "C:\\Program Files\\AVG\\AVG10\\avgscanx.exe"; commands[3] = "/scan=" + filename; commands[4] = "/report=" + virusoutput; Runtime rt = Runtime.getRuntime(); Process proc = rt.exec(commands);
Commnad line will be a better choice Then read the log file to solve the problem
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码