HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/hMailServer/PHPWebAdmin/background_ajax_virustest.php
<?php
	if (!defined('IN_WEBADMIN'))
		exit();
      
	if (hmailGetAdminLevel() != ADMIN_SERVER)
		hmailHackingAttemp(); // The user is not server administrator.
  
   $TestType = hmailGetVar("TestType", "");
   $AntiVirusSettings = $obBaseApp->Settings->AntiVirus;
   
   $result = "";
   $message = "";

   switch ($TestType)
   {
	  case "ClamWin":
		$Executable = hmailGetVar("Executable", "");
		$DatabaseFolder = hmailGetVar("DatabaseFolder", "");
		$result = $AntiVirusSettings->TestClamWinScanner($Executable, $DatabaseFolder, $message);
		break;
	  case "ClamAV":
		$Hostname = hmailGetVar("Hostname", "localhost");
		$Port = hmailGetVar("Port", 783);
		$result = $AntiVirusSettings->TestClamAVScanner($Hostname, $Port, $message);
		break;
	  case "External":
		$Executable = hmailGetVar("Executable", "");
		$ReturnValue = hmailGetVar("ReturnValue", 0);
		$result = $AntiVirusSettings->TestCustomerScanner($Executable, $ReturnValue, $message);
		break;
      default:
		die;
   }
     
   echo $result;
?>