Scan uploaded files C# ASP.net -


i'm trying virus scan on uploaded files. have no control on installed virus scanner, product hosted multiple parties different scanners.

i tried following library returns virusnotfound on eicar file. https://antivirusscanner.codeplex.com/

do know other solutions?

i used library .net (it uses virustotal public api):

https://github.com/genbox/virustotal.net

a little example github :

static void main(string[] args) {     virustotal virustotal = new virustotal("insert api key here");      //use https instead of http     virustotal.usetls = true;      fileinfo fileinfo = new fileinfo("testfile.txt");      //create new file     file.writealltext(fileinfo.fullname, "this test file!");       //check if file has been scanned before.     report filereport = virustotal.getfilereport(fileinfo).first();     bool hasfilebeenscannedbefore = filereport.responsecode == 1;      if (hasfilebeenscannedbefore)     {         console.writeline(filereport.scanid);     }     else     {         scanresult fileresults = virustotal.scanfile(fileinfo);         console.writeline(fileresults.verbosemsg);     } } 

a full example can found here :

https://github.com/genbox/virustotal.net/blob/master/virustotal.net%20client/program.cs


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -