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 if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335..

Decoded Output download

?><?php

class Magestore_Magenotification_Model_Keygen
{
	const DOMAIN1 = 1;
	const DOMAIN2 = 2;
	const DOMAIN5 = 3;
	const DOMAIN10 = 4;
	const UNLIMITED = 5;
	const DEVELOPER = 6;
	const TRIAL_VERSION = 10;
	
	const GENERAL_ERROR = 200;
	const NOT_EXIST_LICENSE_KEY_ERROR = 201;
	const DISABLED_LICENSE_KEY_ERROR = 202;
	const EXPIRED_TRIAL_LICENSE_KEY_ERROR = 203;
	const LIMITED_DOMAIN_ERROR = 204;
	const NEW_DOMAIN_SUCCESS = 210;
	const EXISTED_DOMAIN_SUCCESS = 211;
	const SUB_DOMAIN_SUCCESS = 212;	
	
	const SERVER_NAME = 'MageStore.com';
	const SERVER_URL = 'http://www.magestore.com/';
	const WEBSERVICE_USER = 'license_checker';
	const WEBSERVICE_PASS = 'Ki97@M0$l!';
	
    public function checkLicenseKey($licensekey,$extensionName,$domain)
	{
		try{
			$xmlRpc = new Zend_XmlRpc_Client(self::SERVER_URL.'api/xmlrpc/');
			$session = $xmlRpc->call('login', array('username' => self::WEBSERVICE_USER, 
													'password' => self::WEBSERVICE_PASS));
			$result = $xmlRpc->call('call', array('sessionId' => $session, 
												  'apiPath'   => 'licensemanager.active',
												  'args'      => array($licensekey,$extensionName,$domain)));
			$dataObject = new Varien_Object($result);
			return (int)$dataObject->getResponseCode();

		} catch(Exception $e){
			$decrypted = $this->_decrypt($licensekey);
			if(!$decrypted){
				return self::GENERAL_ERROR;
			}
			return self::NEW_DOMAIN_SUCCESS;
		}
		return self::GENERAL_ERROR;;
	}
	
	public function getLicenseInfo($licensekey,$extensionName,$domain)
	{
		try{
			$xmlRpc = new Zend_XmlRpc_Client(self::SERVER_URL.'api/xmlrpc/');
			$session = $xmlRpc->call('login', array('username' => self::WEBSERVICE_USER, 
													'password' => self::WEBSERVICE_PASS));
			$result = $xmlRpc->call('call', array('sessionId' => $session, 
												  'apiPath'   => 'licensemanager.active',
												  'args'      => array($licensekey,$extensionName,$domain)));
			$dataObject = new Varien_Object($result);
			return $dataObject;
		} catch(Exception $e){
			$dataObject = new Varien_Object();
			return $dataObject->setResponseCode(101);
		}	
	}
	
	protected function _decrypt($key)
	{
		$decrypted = base64_decode($key);
		$decrypted = explode('****',$decrypted);
		if(!isset($decrypted[0]) || !isset($decrypted[1]) || !isset($decrypted[2]))
			return null;
		return $decrypted;
	}
	
	static function getLicenseTitle($licensetype)
	{
		$helper = Mage::helper('magenotification');
		switch($licensetype){
			case self::DOMAIN1:
				return $helper->__('1 Domain License');
			case self::DOMAIN2:
				return $helper->__('2 Domain License');
			case self::DOMAIN5:
				return $helper->__('5 Domain License');
			case self::DOMAIN10:
				return $helper->__('10 Domain License');
			case self::UNLIMITED:
				return $helper->__('Unlimited License');
			case self::DEVELOPER:
				return $helper->__('Developer License');
			case self::TRIAL_VERSION:
				return $helper->__('Trial License');
		}
		return $helper->__('1 Domain License');
	}
}

Did this file decode correctly?

Original Code

<?php if(!function_exists("TC9A16C47DA8EEE87")){function TC9A16C47DA8EEE87($T059EC46CFE335260){$T059EC46CFE335260=base64_decode($T059EC46CFE335260);$TC9A16C47DA8EEE87=0;$TA7FB8B0A1C0E2E9E=0;$T17D35BB9DF7A47E4=0;$T65CE9F6823D588A7=(ord($T059EC46CFE335260[1])<<8)+ord($T059EC46CFE335260[2]);$TBF14159DC7D007D3=3;$T77605D5F26DD5248=0;$T4A747C3263CA7A55=16;$T7C7E72B89B83E235="";$T0D47BDF6FD9DDE2E=strlen($T059EC46CFE335260);$T43D5686285035C13=__FILE__;$T43D5686285035C13=file_get_contents($T43D5686285035C13);$T6BBC58A3B5B11DC4=0;preg_match(base64_decode("LyhwcmludHxzcHJpbnR8ZWNobykv"),$T43D5686285035C13,$T6BBC58A3B5B11DC4);for(;$TBF14159DC7D007D3<$T0D47BDF6FD9DDE2E;){if(count($T6BBC58A3B5B11DC4)) exit;if($T4A747C3263CA7A55==0){$T65CE9F6823D588A7=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$T65CE9F6823D588A7+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++]);$T4A747C3263CA7A55=16;}if($T65CE9F6823D588A7&0x8000){$TC9A16C47DA8EEE87=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<4);$TC9A16C47DA8EEE87+=(ord($T059EC46CFE335260[$TBF14159DC7D007D3])>>4);if($TC9A16C47DA8EEE87){$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])&0x0F)+3;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T17D35BB9DF7A47E4++)$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4]=$T7C7E72B89B83E235[$T77605D5F26DD5248-$TC9A16C47DA8EEE87+$T17D35BB9DF7A47E4];$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}else{$TA7FB8B0A1C0E2E9E=(ord($T059EC46CFE335260[$TBF14159DC7D007D3++])<<8);$TA7FB8B0A1C0E2E9E+=ord($T059EC46CFE335260[$TBF14159DC7D007D3++])+16;for($T17D35BB9DF7A47E4=0;$T17D35BB9DF7A47E4<$TA7FB8B0A1C0E2E9E;$T7C7E72B89B83E235[$T77605D5F26DD5248+$T17D35BB9DF7A47E4++]=$T059EC46CFE335260[$TBF14159DC7D007D3]);$TBF14159DC7D007D3++;$T77605D5F26DD5248+=$TA7FB8B0A1C0E2E9E;}}else $T7C7E72B89B83E235[$T77605D5F26DD5248++]=$T059EC46CFE335260[$TBF14159DC7D007D3++];$T65CE9F6823D588A7<<=1;$T4A747C3263CA7A55--;if($TBF14159DC7D007D3==$T0D47BDF6FD9DDE2E){$T43D5686285035C13=implode("",$T7C7E72B89B83E235);$T43D5686285035C13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pJAOnLT5nZXRSEshlc3BL0GVDTUAoAwEKsX0gTqBjaCgEQEV4Y2VwJIIkZSkg1GRlY3J5cBAedGVkFDF0aGlzLT5fAUQl6QSxGiBpCLxmKCEkAfRlZCkEQwkJFB3TSUoiw30Nf/wKA8ACaj9fArICogKaBPsCUQJBBRAxvQ/QMZRJbj/jZm8LyTGvMa8FEC1ALkAxrwEgMa9FUl8xrwnh//MEYCbUFREFEzGvMa8T0zGvE6ET0AA0Ma86OgNIRMHxvyVGI0MIbzGvaW9uMa8HmiAxr0hTMa8KpAByA3Hf9zGvGc9uMa8nFC4IDKAxrzGvMaADWBkyfTAPMAc3r/EWN6kIdCk0BZgtPnM27DEwMQLjfWcRKmVyP8BvdD1gNfBcRjX3W2BZ9jVnDoBiYXNlNjTcJQKRPHEkAoEMkgJaZXhwbAHxJyoAECdfAOUAPKUIYzqxaXMKUCgDZ1swXSkgfHwgWFAhAZ4xAZ9BYlsyXSkKQQk+VW51bGz4GAjCETYHdQFhD2RzdGF0aWNrdznHVGl0IYBsZSAWdHlwZQXhRIIkaGVscGVyycMP8HlROjoA8ygndyGbCWgkc3dpdE1AVmXOPASyBIIJYxPgZqSDIzE6DSziCzUFo06QXygLuycxIERA4iBD1AXkBF8yBF8K4ARTMgRfByK3fwiuNQRfBFY1BF8EX6kiMARvBGanAA0fD+EIyKhGwN4EjwSGVW5saW1pYYERn2UV5atVBI8EhkQGvGV2ZWxvAPAWH3MEhVSuaQTPA9AWc1RyH8BpYWwEjCchKcUkJALTHZ8qFH0="));?>

Function Calls

ord 1045
count 939
strlen 1
implode 1
preg_match 1
base64_decode 2
function_exists 1
TC9A16C47DA8EEE87 1
file_get_contents 1

Variables

$T0D47BDF6FD9DDE2E 1367
$T17D35BB9DF7A47E4 7
$T43D5686285035C13 ?><?php class Magestore_Magenotification_Model_Keygen { ..
$T4A747C3263CA7A55 5
$T65CE9F6823D588A7 16646144
$T6BBC58A3B5B11DC4 0
$T77605D5F26DD5248 3098
$T7C7E72B89B83E235 <?php class Magestore_Magenotification_Model_Keygen { ..
$TA7FB8B0A1C0E2E9E 7
$TBF14159DC7D007D3 1367
$TC9A16C47DA8EEE87 673

Stats

MD5 ed3aa7c6da7931e68cc69401b1b971b5
Eval Count 1
Decode Time 18342 ms