2024-02-11 10:45:39 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-02-11 11:16:38 -07:00
|
|
|
require 'net/http'
|
2024-02-11 11:05:39 -07:00
|
|
|
require_relative 'api_clients/virus_total/virus_total_client'
|
|
|
|
require_relative 'api_clients/opswat/opswat_client'
|
2024-02-11 10:45:39 -07:00
|
|
|
|
|
|
|
# Main class for sending files/links to the security vendors, and getting the response.
|
|
|
|
class VirusScanner
|
2024-02-11 11:05:39 -07:00
|
|
|
def self.scan_file_with_virustotal(file_path)
|
|
|
|
VirusTotalClient.scan_file(file_path)
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.scan_file_with_opswat(file_path)
|
|
|
|
OpswatClient.scan_file(file_path)
|
2024-02-11 10:45:39 -07:00
|
|
|
end
|
|
|
|
end
|