I am working on an application which requires file upload and it also requires to scan the file with available antivirus on server.
I have heard abt APIS available from Symantec for application server.
Situatuion is like, I need to deploy the application at different places in the future. So, I am thinking to place a configuration file from where I am going to fetch available Antivirus & its path.
I want to use any available antivirus on server and then using command line, I want to pass file name and result back.
I am confused in passing file and retrieving back results.
Is it possible?
Use VirusTotal Public API V2.0 implementation in Java and Go written by VIGHNESWAR RAO
available at https://vighnesh.me/virustotal
it has rich features to scan files, URLs, domains, IP addresses and to get a detailed report about scan.
with this API your files will be scanned with 56 antivirus engines. and all antivirus engines are run in virustotal cloud so especially you no need to maintain or run any antivirus engines.
an important feature of this API is it has methods to accept java.io.FileInputStream or java.io.File as arguments.
All API features are clearly explained with examples.
to use this api
step-1: create an account in http://virustotal.com (VirusTotal, a subsidiary of Google) and get API key(100% free)
step-2: visit https://vighnesh.me/virustotal and download required jar files
step-3: just use the methods provided by API.
you can use examples provided at https://vighnesh.me/virustotal/Java/examples.html OR https://vighnesh.me/virustotal/Go/examples.html
I just googled up and found an interesting article have a look at here
quick reference:
then
Use the following code.
Commnad line would be better option for you. then read the log file to solve the problem.