Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php eval(base64_decode('CiBuYW1lc3BhY2UgR0FMaWJyYXJ5TGljZW5zZUFjdGl2YXRpb247IHVzZSBET01E..

Decoded Output download


 namespace GALibraryLicenseActivation; use DOMDocument; use DOMXPath; class Properties { public static $Lic_Status = false; } if ($_SERVER["REQUEST_METHOD"] === "POST") { $Case = $_POST["Case"]; $hostname = $_POST["hostname"]; $macid = $_POST["macid"]; $DecryptInput = $_POST["DecryptInput"]; $ProductCode = $_POST["ProductCode"]; $RequestID = $_POST["RequestID"] . "Identity"; $LicenseKey = $_POST["LicenseKey"]; switch ($Case) { case 0: $validsts = Output::LicenseValid($LicenseKey, $ProductCode); if (boolval($validsts)) { $output = "License Valid"; } else { $output = "License Invalid"; } break; case 1: $output = Output::GenerateReqKey($hostname, $macid, $RequestID); break; case 2: $output = StringEncryptor::decrypt($DecryptInput, GlobalConfig::DecryptKey); break; case 3: $output = Input::Activate($LicenseKey, $ProductCode, $RequestID); break; case 4: $output = Output::ActivationValidity($LicenseKey, $ProductCode, $RequestID); break; case 5: $output = Output::LicenseValidity($LicenseKey, $ProductCode, $RequestID); break; case 6: $output = Output::MachineCode($LicenseKey, $ProductCode, $RequestID); break; case 7: $output = Output::ProductCode($LicenseKey, $ProductCode, $RequestID); break; case 8: $output = XMLHandler::getLastId(); break; case 9: $output = boolval(Output::LicenseValid($LicenseKey, $ProductCode, $RequestID)) ? "true" : "false"; break; case 10: $SearchID = str_replace("Identity", '', $RequestID); $output = boolval(XMLHandler::getLastId("Request-History", "Request", $SearchID)); default: $output = $Empty; break; } echo $output; } class CodeExtractor { private static function ConvertStartPosToNumbers($key) { try { $characters = GlobalConfig::CC; $codLen = GlobalConfig::CL; $StartposChars = substr($key, strpos($characters, $key[strlen($key) - 3]), $codLen[count($codLen) - 1]); return self::ConvertToPositions($StartposChars); } catch (Exception $e) { throw $e; } } public static function extractCodes($key, $codeLengths) { try { $extractedCodes = array(); $startPositions = self::ConvertStartPosToNumbers($key); foreach ($startPositions as $i => $startPosition) { $startPosition %= strlen($key); $length = $codeLengths[$i]; $extractedCode = substr($key, $startPosition, $length); $extractedCodes[] = $extractedCode; } return $extractedCodes; } catch (Exception $e) { throw $e; } } private static function convertToPositions($str) { try { $characters = GlobalConfig::CC; $positions = array(); for ($i = 0; $i < strlen($str); $i++) { $charPosition = strpos($characters, $str[$i]); if ($charPosition !== false) { $positions[] = $charPosition; } else { } } return $positions; } catch (Exception $e) { throw $e; } } public static function convertIntervals($letters, $YearLetters) { try { $characters = GlobalConfig::CC; $baseValue = strlen($characters); $GenYear = intval(strpos($characters, $YearLetters[0]) . strpos($characters, $YearLetters[1])); $day = 0; $month = 0; $year = 0; if (strlen($letters) >= 1) { $day = strpos($characters, $letters[0]) + 1; } if ($day == 0) { $day = date("d"); } if (strlen($letters) >= 2) { $month = strpos($characters, $letters[1]) + 1; } if ($month == 0) { $month = date("m"); } if (strlen($letters) >= 3) { $year = $GenYear + strpos($characters, $letters[3]) * $baseValue + strpos($characters, $letters[2]); } $maxDay = cal_days_in_month(CAL_GREGORIAN, $month, $year); if ($day > $maxDay) { return date_create("{$year}-{$month}-{$maxDay}"); } else { return date_create("{$year}-{$month}-{$day}"); } } catch (Exception $e) { throw $e; } } } class CodeConversion { public static function stringCompresser($inputText) { try { if ($inputText == null) { return ''; } $textToNumber = self::textToNumber($inputText); $toOctal = self::toOctal($textToNumber); $logOctal = self::logarithmOfOctal($toOctal); $roundedValue = round($logOctal, 8); $sumTextToNum = self::sumTextToNum($textToNumber); $primeNumber = 71.0; $resultStep7 = $roundedValue * $primeNumber; $convertedStep6 = self::convertToAlphabet($sumTextToNum); $convertedStep7 = self::convertToAlphabet((int) $resultStep7); return $convertedStep6 . $convertedStep7; } catch (Exception $e) { throw $e; } } private static function textToNumber($text) { try { $result = ''; for ($i = 0; $i < strlen($text); $i++) { $result .= ord($text[$i]) . " "; } return trim($result); } catch (Exception $e) { throw $e; } } private static function toOctal($input) { try { $numbers = explode(" ", $input); $result = ''; foreach ($numbers as $num) { $decimalValue = intval($num); $result .= decoct($decimalValue) . " "; } return trim($result); } catch (Exception $e) { throw $e; } } private static function logarithmOfOctal($octal) { try { $octalNumbers = explode(" ", $octal); $cumulativeLog = 0.0; foreach ($octalNumbers as $octalNum) { $octalValue = octdec($octalNum); $cumulativeLog += log($octalValue); } return $cumulativeLog; } catch (Exception $e) { throw $e; } } private static function sumTextToNum($textToNum) { try { $numbers = explode(" ", $textToNum); $sum = 0; foreach ($numbers as $num) { $sum += intval($num); } return $sum; } catch (Exception $e) { throw $e; } } private static function convertToAlphabet($value) { try { $modValue = $value % 26 + 65; return chr($modValue); } catch (Exception $e) { throw $e; } } } class Input { public static function Activate($Key, $ProductCode, $RequestID, $ConsiderReqID = false, $MacID = null, $HostName = null) { try { if (empty($ProductCode)) { echo "Invalid Data Entry - Product Code Empty"; die; } if (empty($Key)) { echo "Invalid Data Entry - License Key Empty"; die; } if (empty($RequestID)) { echo "Invalid Data Entry - Request ID Empty"; die; } Properties::$Lic_Status = false; $codeLengths = GlobalConfig::CL; $codes = CodeExtractor::ExtractCodes($Key, $codeLengths); $Request_ID = CodeConversion::StringCompresser($RequestID); if ($Request_ID != $codes[6] & $ConsiderReqID) { echo "Request ID Mismatch, License In-Valid"; die; } $MachinecodeValid = false; if (is_null($MacID) || is_null($HostName)) { $MacAddresses = SystemInfo::GetMacAddresses(); $hostName = SystemInfo::GetSystemName(); foreach ($MacAddresses as $item) { $item = str_replace("-", '', $item); $Machine_Code = CodeConversion::StringCompresser($hostName . " " . $item); if ($Machine_Code == $codes[0]) { $MachinecodeValid = true; break; } } } else { $MacAddresses = array($MacID); $hostName = $HostName; $item = str_replace("-", '', $MacID); $Machine_Code = CodeConversion::StringCompresser($hostName . " " . $item); if ($Machine_Code == $codes[0]) { $MachinecodeValid = true; } } if (!$MachinecodeValid) { echo "System Details Mismatch, License In-Valid"; die; } $Product_Code = CodeConversion::StringCompresser($ProductCode); if ($Product_Code != $codes[1]) { echo "Product Code Mismatch, License In-Valid"; die; } $Security_Key = CodeConversion::StringCompresser(StringEncryptor::decrypt(GlobalConfig::SK, GlobalConfig::DecryptKey)); if ($Security_Key != $codes[4]) { echo "Security Key Mismatch, License In-Valid"; die; } $Current = strtotime("now"); $Activ_until = strtotime(CodeExtractor::ConvertIntervals($codes[2], $codes[5])->format("Y-m-d")); $License_until = strtotime(CodeExtractor::ConvertIntervals($codes[3], $codes[5])->format("Y-m-d")); $LicenseActivated = (bool) Properties::$Lic_Status; if ($Current < $Activ_until && !$LicenseActivated && $Current < $License_until) { Properties::$Lic_Status = true; $SearchID = str_replace("Identity", '', $RequestID); $result = boolval(Output::LicenseValid($LicenseKey, $ProductCode, $RequestID)) ? "true" : "false"; XMLHandler::addAttributesById("Request-History", "Request", "id", $SearchID, array("Activated-Status" => $result, "Activated" => date("Y-m-d H:i:s"))); ob_clean(); echo "License Valid for Activation"; die; } else { echo "License Expired"; die; } } catch (Exception $ex) { echo $ex->getMessage(); die; } } public static function De_Activate($Key, $ProductCode) { Properties::$Lic_Status = false; echo "License De-Activated Successfully"; return true; } } class Output { public static $KeyValid = false; public static $KeyCodes = array(); public static $LastKey; public static $LastProductID; public static function CheckKey($Key, $ProductCode, $RequestID, $ConsiderReqID = false, $MacID = null, $HostName = null) { Output::$KeyValid = false; try { if (empty($ProductCode) || empty($Key)) { echo "Invalid Data Entry"; return false; } $KeyCodes = empty($Key) ? array_fill(0, count(GlobalConfig::CL), '') : CodeExtractor::ExtractCodes($Key, GlobalConfig::CL); $MachinecodeValid = false; if (is_null($MacID) || is_null($HostName)) { $MacAddresses = SystemInfo::GetMacAddresses(); $hostName = SystemInfo::GetSystemName(); foreach ($MacAddresses as $item) { $item = str_replace("-", '', $item); $Machine_Code = CodeConversion::StringCompresser($hostName . " " . $item); if ($Machine_Code == $KeyCodes[0]) { $MachinecodeValid = true; break; } } } else { $MacAddresses = array($MacID); $hostName = $HostName; $item = str_replace("-", '', $MacID); $Machine_Code = CodeConversion::StringCompresser($hostName . " " . $item); if ($Machine_Code == $KeyCodes[0]) { $MachinecodeValid = true; } } $Request_ID = CodeConversion::StringCompresser($RequestID); $Product_Code = CodeConversion::StringCompresser($ProductCode); $Security_Key = CodeConversion::StringCompresser(StringEncryptor::decrypt(GlobalConfig::SK, GlobalConfig::DecryptKey)); if ($MachinecodeValid && $Product_Code == $KeyCodes[1] && $Security_Key == $KeyCodes[4] && $Request_ID == $KeyCodes[6] && $ConsiderReqID) { Output::$KeyValid = true; return true; } elseif ($MachinecodeValid && $Product_Code == $KeyCodes[1] && $Security_Key == $KeyCodes[4] && !$ConsiderReqID) { Output::$KeyValid = true; return true; } else { return false; } } catch (Exception $ex) { echo $ex->getMessage(); return false; } } public static function ProductCode($Key, $ProductCode, $RequestID, $ConsiderReqID = false, $MacID = null, $HostName = null) { try { if (empty($Key)) { echo "Invalid_Key"; die; } Output::CheckKey($Key, $ProductCode, $RequestID, $ConsiderReqID, $MacID, $HostName); ob_clean(); $codes = empty($Key) ? array_fill(0, count(GlobalConfig::CL), '') : CodeExtractor::ExtractCodes($Key, GlobalConfig::CL); return Output::$KeyValid ? $codes[1] : "Invalid_Key"; } catch (Exception $e) { throw $e; } } public static function MachineCode($Key, $ProductCode, $RequestID, $ConsiderReqID = false, $MacID = null, $HostName = null) { try { if (empty($Key)) { echo "Invalid_Key"; die; } Output::CheckKey($Key, $ProductCode, $RequestID, $ConsiderReqID, $MacID, $HostName); ob_clean(); $codes = empty($Key) ? array_fill(0, count(GlobalConfig::CL), '') : CodeExtractor::ExtractCodes($Key, GlobalConfig::CL); return Output::$KeyValid ? $codes[0] : "Invalid_Key"; } catch (Exception $e) { throw $e; } } public static function ActivationValidity($Key, $ProductCode, $RequestID, $ConsiderReqID = false, $MacID = null, $HostName = null) { try { if (empty($Key)) { echo "Empty Key"; return false; } Output::CheckKey($Key, $ProductCode, $RequestID, $ConsiderReqID, $MacID, $HostName); $codes = empty($Key) ? array_fill(0, count(GlobalConfig::CL), '') : CodeExtractor::ExtractCodes($Key, GlobalConfig::CL); ob_clean(); return Output::$KeyValid ? CodeExtractor::ConvertIntervals($codes[3], $codes[5])->format("Y-m-d") : "0000-00-00"; } catch (Exception $e) { throw $e; } } public static function LicenseValidity($Key, $ProductCode, $RequestID, $ConsiderReqID = false, $MacID = null, $HostName = null) { try { if (empty($Key)) { echo "Empty Key"; return false; } Output::CheckKey($Key, $ProductCode, $RequestID, $ConsiderReqID, $MacID, $HostName); $codes = empty($Key) ? array_fill(0, count(GlobalConfig::CL), '') : CodeExtractor::ExtractCodes($Key, GlobalConfig::CL); ob_clean(); return Output::$KeyValid ? CodeExtractor::ConvertIntervals($codes[2], $codes[5])->format("Y-m-d") : "0000-00-00"; } catch (Exception $e) { throw $e; } } public static function LicenseValid($Key, $ProductCode, $Request_ID, $ConsiderReqID = false, $MacID = null, $HostName = null) { if (empty($Key)) { return false; } try { $Current = strtotime("now"); $Activ_until = strtotime(self::ActivationValidity($Key, $ProductCode, $Request_ID)); $License_until = strtotime(self::LicenseValidity($Key, $ProductCode, $Request_ID)); $LicenseActivated = boolval(Properties::$Lic_Status); $Checkresult = Output::CheckKey($Key, $ProductCode, $Request_ID, $ConsiderReqID, $MacID, $HostName); if ($Current < $Activ_until && $Current < $License_until && boolval($Checkresult)) { return true; } else { return false; } } catch (Exception $Ex) { echo $Ex->getMessage(); return false; } } public static function GetMacDetails() { return SystemInfo::GetMacAddresses(); } public static function GetHostName() { return SystemInfo::getSystemName(); } public static function GenerateReqKey($hostname, $macid, $ReqID = null) { try { if ($ReqID === null) { $PreviousID = XMLHandler::getLastId(); $ReqID = strval($PreviousID + 1); } $SysDetails = $hostname . " " . $macid . ($ReqID === null ? '' : " : " . $ReqID); $Output = StringEncryptor::Encrypt($SysDetails, GlobalConfig::DecryptKey); XMLHandler::xmlManager("Request-History", "Request", "({$hostname} {$macid})-{$Output}", array("id" => $ReqID, "Generated" => date("Y-m-d H:i:s"), "Activated" => '', "Activated-Status" => "false")); ob_clean(); return $Output; } catch (Exception $e) { throw $e; } } } class GlobalConfig { const CC = "jvIysoTZSu9qFN5tf7m1XzLc6haQORWp3w8JAPbYU4elxKMrGHDVnCk2gBdEi"; const SK = "bmE5TdyGOZ1YHIWqpPmt/SVxpcL1vqzNkrIQf4iBTQE="; const SecureKey = "queHgqpD4RXwPX/tx3nHA3laga28L9onlpwLetN/dN+wmd9W8YUNg0pxq+ent+5p"; const DecryptKey = "GACL003"; const CL = array(2, 2, 4, 4, 2, 2, 2, 8); const XMLFilePath = "GA_History.xml"; } class StringEncryptor { public static function encrypt($EncryptInput, $key) { try { $method = "aes-256-cbc"; $OrgKey = "G8u7r9u0pwd@Crypto"; $ivSize = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($ivSize); $encrypted = openssl_encrypt($EncryptInput, $method, hash("sha256", $OrgKey, true), OPENSSL_RAW_DATA, $iv); return base64_encode($iv . $encrypted); } catch (Exception $e) { throw $e; } } public static function decrypt($encryptedData, $key) { try { $method = "aes-256-cbc"; $OrgKey = "G8u7r9u0pwd@Crypto"; $ivSize = openssl_cipher_iv_length($method); $encryptedData = base64_decode($encryptedData); $iv = substr($encryptedData, 0, $ivSize); $encrypted = substr($encryptedData, $ivSize); return openssl_decrypt($encrypted, $method, $OrgKey, OPENSSL_RAW_DATA, $iv); } catch (Exception $e) { throw $e; } } } class SystemInfo { public static function getSystemName() { try { $maxComputerNameLength = 256; if (function_exists("gethostname")) { $name = gethostname(); return $name !== false ? $name : "Unknown"; } else { return "Function gethostname() not available"; } } catch (Exception $e) { throw $e; } } public static function getMacAddresses() { try { $output = shell_exec("getmac /fo csv /nh"); if ($output === false) { return array(); } preg_match_all("/"([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})"/", $output, $matches); $macAddresses = $matches[0]; $macAddresses = array_map(function ($mac) { return trim($mac, """); }, $macAddresses); return $macAddresses; } catch (Exception $e) { throw $e; } } } class SeriesGenerator { public static function generateNextSeries($previousSeries, $charactersToGenerate) { try { $digitsRegex = "/^\d+$/"; if (empty($previousSeries) || preg_match($digitsRegex, $previousSeries)) { $previousSeries = "AAAAAA"; } for ($i = 0; $i < $charactersToGenerate; $i++) { $previousSeries = self::generateNextCharacter($previousSeries); } return $previousSeries; } catch (Exception $ex) { return "Error generating series: " . $ex->getMessage(); } } private static function generateNextCharacter($previousSeries) { try { $seriesChars = str_split($previousSeries); for ($i = count($seriesChars) - 1; $i >= 0; $i--) { if ($seriesChars[$i] == "Z") { $seriesChars[$i] = "A"; } else { if (ctype_alpha($seriesChars[$i])) { $seriesChars[$i] = chr(ord($seriesChars[$i]) + 1); break; } } } return implode('', $seriesChars); } catch (Exception $e) { throw $e; } } } class XMLHandler { public static function xmlManager($parentPath, $childName, $childValue = null, $attributes = array()) { try { $filePath = GlobalConfig::XMLFilePath; if (!file_exists($filePath)) { XMLHandler::createNewXML($filePath, "GuruAutomation"); } $dom = XMLHandler::readXML($filePath); if ($dom) { XMLHandler::addChild($dom, $parentPath, $childName, $childValue, $attributes); XMLHandler::writeXML($dom, $filePath); } } catch (Exception $e) { throw $e; } } private static function createNewXML($filePath, $rootElementName) { try { $dom = new DOMDocument("1.0", "UTF-8"); $dom->formatOutput = true; $root = $dom->createElement($rootElementName); $dom->appendChild($root); if ($dom->save($filePath)) { echo "XML file created successfully."; } else { echo "Failed to create XML file."; } } catch (Exception $e) { throw $e; } } private static function readXML($filePath = null) { try { if (empty($filePath)) { $filePath = GlobalConfig::XMLFilePath; } $dom = new DOMDocument(); if ($dom->load($filePath)) { return $dom; } else { echo "Failed to load XML file."; return null; } } catch (Exception $e) { throw $e; } } private static function writeXML($dom, $filePath = null) { try { if (empty($filePath)) { $filePath = GlobalConfig::XMLFilePath; } $dom->formatOutput = true; if ($dom->save($filePath)) { echo "XML file written successfully."; } else { echo "Failed to write XML file."; } } catch (Exception $e) { throw $e; } } private static function addChild($dom, $parentPath, $childName, $childValue = null, $attributes = array()) { try { $xpath = new DOMXPath($dom); $parents = explode("/", $parentPath); $node = $dom->documentElement; foreach ($parents as $element) { if (!empty($element)) { $query = "./{$element}"; $parent = $xpath->query($query, $node)->item(0); if (!$parent) { $parent = $dom->createElement($element); $node->appendChild($parent); } $node = $parent; } } $child = $dom->createElement($childName, $childValue); foreach ($attributes as $key => $value) { $child->setAttribute($key, $value); } $node->appendChild($child); } catch (Exception $e) { throw $e; } } public static function getLastId($filePath = null) { try { $filePath = GlobalConfig::XMLFilePath; $dom = self::readXML($filePath); if ($dom === null) { return "00"; } $xpath = new DOMXPath($dom); $query = "//Request-History/Request[last()]"; $lastRequest = $xpath->query($query)->item(0); if ($lastRequest) { return $lastRequest->getAttribute("id"); } else { echo "No Request element found."; return null; } } catch (Exception $e) { throw $e; } } public static function addAttributesById($parentPath, $childName, $FindName, $FindValue, $attributes) { try { $dom = self::readXML(); $xpath = new DOMXPath($dom); $query = "//{$parentPath}/{$childName}[@{$FindName}='{$FindValue}']"; $elements = $xpath->query($query); if ($elements === false) { return; } foreach ($elements as $element) { foreach ($attributes as $name => $value) { if ($element->hasAttribute($name)) { $element->setAttribute($name, $value); } else { $element->setAttribute($name, $value); } } } self::writeXML($dom); } catch (Exception $e) { throw $e; } } } 

Did this file decode correctly?

Original Code

<?php eval(base64_decode('CiBuYW1lc3BhY2UgR0FMaWJyYXJ5TGljZW5zZUFjdGl2YXRpb247IHVzZSBET01Eb2N1bWVudDsgdXNlIERPTVhQYXRoOyBjbGFzcyBQcm9wZXJ0aWVzIHsgcHVibGljIHN0YXRpYyAkTGljX1N0YXR1cyA9IGZhbHNlOyB9IGlmICgkX1NFUlZFUlsiXDEyMlwxMDVceDUxXHg1NVx4NDVcMTIzXDEyNFwxMzdcMTE1XHg0NVwxMjRcMTEwXHg0Zlx4NDQiXSA9PT0gIlx4NTBceDRmXHg1M1x4NTQiKSB7ICRDYXNlID0gJF9QT1NUWyJceDQzXDE0MVwxNjNceDY1Il07ICRob3N0bmFtZSA9ICRfUE9TVFsiXDE1MFx4NmZce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