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('CiBuYW1lc3BhY2UgR0FMaWJyYXJ5TGljZW5zZUFjdGl2YXRpb247IHVzZSBET0..

Decoded Output download


 namespace GALibraryLicenseActivation; use DOMDocument; use DOMXPath; 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 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 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('CiBuYW1lc3BhY2UgR0FMaWJyYXJ5TGljZW5zZUFjdGl2YXRpb247IHVzZSBET01Eb2N1bWVudDsgdXNlIERPTVhQYXRoOyBjbGFzcyBHbG9iYWxDb25maWcgeyBjb25zdCBDQyA9ICJceDZhXDE2NlwxMTFceDc5XHg3M1x4NmZcMTI0XDEzMlx4NTNcMTY1XHgzOVx4NzFcMTA2XDExNlx4MzVceDc0XHg2Nlx4MzdcMTU1XDYxXHg1OFwxNzJcMTE0XHg2M1w2NlwxNTBcMTQxXHg1MVx4NGZcMTIyXDEyN1wxNjBcNjNcMTY3XDcwXDExMlx4NDFceDUwXHg2MlwxMzFcMTI1XHgzNFx4NjVcMTU0XHg3OFx4NGJceDRkXDE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