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('IGRlY2xhcmUoc3RyaWN0X3R5cGVzID0gMSk7IG5hbWVzcGFjZSBQbHVnaW5cczM..
Decoded Output download
declare(strict_types = 1); namespace Plugin\s360_easytemplate_shop5\src\Services; use JTL\Shop; use Plugin\s360_easytemplate_shop5\src\Utils\Logger; class LicenceService { protected const API_BASE_URL = 'https://licence.easytemplate360.de/api/v1/public/'; protected const API_LICENCE_PATH = 'license/'; protected const API_FONTS_PATH = 'webfonts/'; protected const API_NEWS_PATH = 'news'; protected const API_VERSIONS_PATH = 'versions'; protected const API_DIALOG_PATH = 'plugindialog/'; protected const MIN_MAJOR_VERSION = 2; protected const LICENCE_TYPE_DEV = 90; protected const LICENCE_TYPE_FREE = 95; protected const LICENCE_TYPE_TRIAL = 100; protected const LICENCE_TYPE_STARTER = 200; protected const LICENCE_TYPE_PRO = 300; protected const LICENCE_TYPE_BUSINESS = 400; protected const LICENCE_TYPE_PARTNER = 500; protected static $instance = null; protected function __construct() { } public function getFonts(): array { if (empty(AdminSessionService::get(AdminSessionService::KEY_FONTS))) { $this->remoteGetFonts(); } return AdminSessionService::get(AdminSessionService::KEY_FONTS) ?? []; } public function getSupportId(): ?string { if (empty(AdminSessionService::get(AdminSessionService::KEY_SUPPORT_ID))) { $this->remoteGetLicence(); } return AdminSessionService::get(AdminSessionService::KEY_SUPPORT_ID); } public function getLicenceId(): ?string { if (empty(AdminSessionService::get(AdminSessionService::KEY_LICENCE_ID))) { $this->remoteGetLicence(); } return AdminSessionService::get(AdminSessionService::KEY_LICENCE_ID); } public function getNews(): ?array { return $this->remoteGetNews(); } public static function getInstance(): LicenceService { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; } public function getLicence(): ?array { return $this->remoteGetLicence(); } public function getCurrentVersions(): ?array { return $this->remoteGetCurrentVersions(); } private function getHostnameNormalized() { return mb_strtolower(str_replace(['https://www.', 'http://www.', 'https://', 'http://'], '', Shop::getURL(true))); } protected function remoteGetLicence() { $requestUrl = self::API_BASE_URL . self::API_LICENCE_PATH . $this->getHostnameNormalized(); $ch = curl_init($requestUrl); $this->setCurlOptions($ch); $result = curl_exec($ch); try { $this->checkCurlErrors($ch, $result); $licences = json_decode($result, true, 512, JSON_THROW_ON_ERROR); } catch (\RuntimeException $ex) { Logger::error($ex->getMessage()); return []; } catch (\JsonException $ex) { Logger::error('ET360-LicenceService: Request to licence server did not return valid JSON for licence! JSON Error: ' . $ex->getMessage()); return []; } finally { curl_close($ch); } if (empty($licences)) { return null; } $now = time(); $validLicenses = array_filter($licences, static function($licence) use ($now) { $isActive = (int) $licence['active'] === 1; if(!$isActive) { return false; } $isUnlimited = (int) $licence['isUnlimited'] === 1; if($isUnlimited && (int)$licence['validVersion'] < self::MIN_MAJOR_VERSION) { return false; } if(!$isUnlimited && $now > (int) $licence['validUntil']) { return false; } return true; }); if (empty($validLicenses)) { return null; } $bestLicence = array_reduce($validLicenses, static function($bestLicence, $licence) { if((int)$licence['licensetype']['id'] > (int)$bestLicence['licensetype']['id']) { return $licence; } return $bestLicence; }, $validLicenses[0]); if($bestLicence !== null) { AdminSessionService::set(AdminSessionService::KEY_LICENCE, $bestLicence); AdminSessionService::set(AdminSessionService::KEY_LICENCE_ID, (string)$bestLicence['id']); AdminSessionService::set(AdminSessionService::KEY_SUPPORT_ID, (string)$bestLicence['supportId']); } return $bestLicence; } protected function remoteGetFonts(): array { $requestUrl = self::API_BASE_URL . self::API_FONTS_PATH . $this->getSupportId(); $ch = curl_init($requestUrl); $this->setCurlOptions($ch); $result = curl_exec($ch); $webfonts = []; try { $this->checkCurlErrors($ch, $result); $webfonts = json_decode($result, true, 512, JSON_THROW_ON_ERROR); } catch (\RuntimeException $ex) { Logger::error($ex->getMessage()); return []; } catch (\JsonException $ex) { Logger::error('ET360-LicenceService: Request to licence server did not return valid JSON for fonts! JSON Error: ' . $ex->getMessage()); return []; } finally { curl_close($ch); } if(!\is_array($webfonts)) { $webfonts = []; } if(!empty($webfonts)) { AdminSessionService::set(AdminSessionService::KEY_FONTS, $webfonts); } return $webfonts; } protected function remoteGetNews(): array { $requestUrl = self::API_BASE_URL . self::API_NEWS_PATH; $ch = curl_init($requestUrl); $this->setCurlOptions($ch); $result = curl_exec($ch); try { $this->checkCurlErrors($ch, $result); $news = json_decode($result, true, 512, JSON_THROW_ON_ERROR); } catch (\RuntimeException $ex) { Logger::error($ex->getMessage()); return []; } catch (\JsonException $ex) { Logger::error('ET360-LicenceService: Request to licence server did not return valid JSON for news! JSON Error: ' . $ex->getMessage()); return []; } finally { curl_close($ch); } return $news; } protected function remoteGetCurrentVersions(): ?array { $requestUrl = self::API_BASE_URL . self::API_VERSIONS_PATH; $ch = curl_init($requestUrl); $this->setCurlOptions($ch); $result = curl_exec($ch); $versions = null; try { $this->checkCurlErrors($ch, $result); $versions = json_decode($result, true, 512, JSON_THROW_ON_ERROR); } catch (\RuntimeException $ex) { Logger::error($ex->getMessage()); return null; } catch (\JsonException $ex) { Logger::error('ET360-LicenceService: Request to licence server did not return valid JSON for current versions! JSON Error: ' . $ex->getMessage()); return null; } finally { curl_close($ch); } return $versions; } public function getDialogMessages(): array { return $this->remoteGetDialogMessages(); } public function confirmDialogMessage($secret): bool { if(empty($secret)) { Logger::debug('ET360-LicenceService: Unable to confirm dialog with empty secret.'); return false; } $requestUrl = self::API_BASE_URL . self::API_DIALOG_PATH . 'agree/' . $secret; $ch = curl_init($requestUrl); $this->setCurlOptions($ch); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([])); curl_exec($ch); try { $this->checkCurlErrors($ch); } catch (\RuntimeException $ex) { Logger::error($ex->getMessage()); return false; } finally { curl_close($ch); } return true; } protected function remoteGetDialogMessages(): array { $dialogMessages = []; $licenceId = $this->getLicenceId(); if(null === $licenceId) { return []; } $requestUrl = self::API_BASE_URL . self::API_DIALOG_PATH . $this->getLicenceId(); $ch = curl_init($requestUrl); $this->setCurlOptions($ch); $result = curl_exec($ch); try { $this->checkCurlErrors($ch, $result); $dialogMessages = json_decode($result, true, 512, JSON_THROW_ON_ERROR); } catch (\RuntimeException $ex) { Logger::error($ex->getMessage()); return []; } catch (\JsonException $ex) { Logger::error('ET360-LicenceService: Request to licence server did not return valid JSON for dialog messages! JSON Error: ' . $ex->getMessage()); return []; } finally { curl_close($ch); } return $dialogMessages; } protected function checkCurlErrors($ch, $response = ''): void { $curlError = curl_error($ch); if ($curlError !== '') { throw new \RuntimeException('ET360-LicenceService: Request to licence server failed: ' . $curlError); } if ($response !== '' && !is_string($response)) { throw new \RuntimeException('ET360-LicenceService: Request to licence server failed without error, but response is not a string: "' . $response .'"'); } } protected function setCurlOptions($ch): void { curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 30); if(defined('ET360_SKIP_SSL_VALIDATION') && constant('ET360_SKIP_SSL_VALIDATION')) { Logger::warn('ET360-LicenceService: SSL VALIDATION DISABLED.'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); } } }
Did this file decode correctly?
Original Code
<?php
eval(base64_decode('IGRlY2xhcmUoc3RyaWN0X3R5cGVzID0gMSk7IG5hbWVzcGFjZSBQbHVnaW5cczM2MF9lYXN5dGVtcGxhdGVfc2hvcDVcc3JjXFNlcnZpY2VzOyB1c2UgSlRMXFNob3A7IHVzZSBQbHVnaW5cczM2MF9lYXN5dGVtcGxhdGVfc2hvcDVcc3JjXFV0aWxzXExvZ2dlcjsgY2xhc3MgTGljZW5jZVNlcnZpY2UgeyBwcm90ZWN0ZWQgY29uc3QgQVBJX0JBU0VfVVJMID0gJ2h0dHBzOi8vbGljZW5jZS5lYXN5dGVtcGxhdGUzNjAuZGUvYXBpL3YxL3B1YmxpYy8nOyBwcm90ZWN0ZWQgY29uc3QgQVBJX0xJQ0VOQ0VfUEFUSCA9ICdsaWNl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