Sindbad~EG File Manager

Current Path : /opt/microsoft/omsagent/plugin/
Upload File :
Current File : //opt/microsoft/omsagent/plugin/collectantimalwareinfo.rb

require 'json'
require 'securerandom' # SecureRandom.uuid 
require 'logger'
require_relative 'collectmcafeeinfo'
require_relative 'collectsophosinfo'
require_relative 'antimalwarecommon'

ret = {}
if McAfee.detect()
    ret = McAfee.getprotectionstatus()
elsif Sophos.detect()
    ret = Sophos.getprotectionstatus()
else
    ($ProtectionStatusRank, $ProtectionStatus) = AntimalwareCommon::UnknownProtectionCode
    ($ThreatStatusRank, $ThreatStatus) = AntimalwareCommon::UnknownThreatCode
	ret["ProtectionStatusRank"] = $ProtectionStatusRank
    ret["ProtectionStatus"] = $ProtectionStatus
    ret["ProtectionStatusDetails"] = ""
    ret["DetectionId"] = SecureRandom.uuid
    ret["Threat"] = ""
    ret["ThreatStatusRank"] = $ThreatStatusRank
    ret["ThreatStatus"] = $ThreatStatus
	ret["ThreatStatusDetails"] = ""
	ret["Signature"] = ""
    ret["ScanDate"] = ""
    ret["DateCollected"] = DateTime.now.strftime("%m/%d/%Y %H:%M")
    ret["Tool"] = "No Anti-Malware Tool was detected"
    ret["AMProductVersion"] = ""
end
puts ret.to_json if !ret.nil?

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists