[...] private void getAllFilesOfDir(File directory) throws IOException { Log.d("get files", "Directory: " + directory.getAbsolutePath() + "\n"); final File[] files = directory.listFiles(); if ( files != null ) { for ( File file : files ) { if ( file != null ) { if ( file.isDirectory() ) { // it is a folder... getAllFilesOfDir(file); } else { // it is a file... Log.d("files", "File: " + file.getAbsolutePath() + "\n"); System.out.println("[*] Scanning file: " + file); byte[] data = FileUtils.readFileToByteArray(file); String sha256Hex = DigestUtils.sha256Hex(data); //The VirusTotal class allows you to search for results using various hashes //and details as supported on the VirusTotal search functionality. Set<Report> reports = VirusTotal.scan(sha256Hex); //Output the details of each scan result from a vendor for (Report report : reports) { System.out.println(report.getVendor() + " - " + report.getMalwarename()); Log.e("report virus",report.getVendor() + " - " + report.getMalwarename()); } } } } } }
%s
VirusTotal.scan()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)