Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
/* Decoded by unphp.net */ eval(base64_decode("CiBjbGFzcyBIdW50ZXJPYmZ1c2NhdG9yIHsgc..
Decoded Output download
<? /* Decoded by unphp.net */
eval(base64_decode("CiBjbGFzcyBIdW50ZXJPYmZ1c2NhdG9yIHsgcHJpdmF0ZSAkY29kZTsgcHJpdmF0ZSAkbWFzazsgcHJpdmF0ZSAkaW50ZXJ2YWw7IHByaXZhdGUgJG9wdGlvbiA9IDA7IHByaXZhdGUgJGV4cGlyZVRpbWUgPSAwOyBwcml2YXRlICRkb21haW5OYW1lcyA9IGFycmF5KCk7IGZ1bmN0aW9uIF9fY29uc3RydWN0KCRDb2RlLCAkaHRtbCA9IGZhbHNlKSB7IGlmICgkaHRtbCkgeyAkQ29kZSA9ICR0aGlzLT5jbGVhbkh0bWwoJENvZGUpOyAkdGhpcy0+Y29kZSA9ICR0aGlzLT5odG1sMkpzKCRDb2RlKTsgfSBlbHNlIHsgJENvZGUgPSAkdGhpcy0+Y2xlYW5KUygkQ29kZSk7ICR0aGlzLT5jb2RlID0gJENvZGU7IH0gJHRoaXMtPm1hc2sgPSAkdGhpcy0+Z2V0TWFzaygpOyAkdGhpcy0+aW50ZXJ2YWwgPSByYW5kKDEsIDUwKTsgJHRoaXMtPm9wdGlvbiA9IHJhbmQoMiwgOCk7IH0gcHJpdmF0ZSBmdW5jdGlvbiBnZXRNYXNrKCkgeyAkY2hhcnNldCA9IHN0cl9zaHVmZmxlKCJcMTQxXHg2Mlx4NjNceDY0XHg2NVwxNDZcMTQ3XHg2OFwxNTFcMTUyXDE1M1wxNTRcMTU1XHg2ZVx4NmZceDcwXHg3MVx4NzJcMTYzXHg3NFx4NzVcMTY2XHg3N1x4NzhceDc5XHg3YVwxMDFceDQyXHg0M1wxMDRcMTA1XHg0NlwxMDdceDQ4XDExMVwxMTJceDRiXHg0Y1x4NGRcMTE2XHg0Zlx4NTBcMTIxXHg1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JceDVjXHgzMSIsICcnKTsgcmV0dXJuIHByZWdfcmVwbGFjZSgkc2VhcmNoLCAkcmVwbGFjZSwgJGNvZGUpOyB9IH0g"));
class HunterObfuscator { private $code; private $mask; private $interval; private $option = 0; private $expireTime = 0; private $domainNames = array(); function __construct($Code, $html = false) { if ($html) { $Code = $this->cleanHtml($Code); $this->code = $this->html2Js($Code); } else { $Code = $this->cleanJS($Code); $this->code = $Code; } $this->mask = $this->getMask(); $this->interval = rand(1, 50); $this->option = rand(2, 8); } private function getMask() { $charset = str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); return substr($charset, 0, 9); } private function hashIt($s) { for ($i = 0; $i < strlen($this->mask); ++$i) { $s = str_replace("{$i}", $this->mask[$i], $s); } return $s; } private function prepare() { if (count($this->domainNames) > 0) { $code = "if(window.location.hostname==='" . $this->domainNames[0] . "' "; for ($i = 1; $i < count($this->domainNames); $i++) { $code .= "|| window.location.hostname==='" . $this->domainNames[$i] . "' "; } $this->code = $code . "){" . $this->code . "}"; } if ($this->expireTime > 0) { $this->code = "if((Math.round(+new Date()/1000)) < " . $this->expireTime . "){" . $this->code . "}"; } } private function encodeIt() { $this->prepare(); $str = ''; for ($i = 0; $i < strlen($this->code); ++$i) { $str .= $this->hashIt(base_convert(ord($this->code[$i]) + $this->interval, 10, $this->option)) . $this->mask[$this->option]; } return $str; } public function Obfuscate() { $rand = rand(0, 99); $rand1 = rand(0, 99); return "var _0xc{$rand}e=["","split","0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/","slice","indexOf","","",".","pow","reduce","reverse","0"];function _0xe{$rand1}c(d,e,f){var g=_0xc{$rand}e[2][_0xc{$rand}e[1]](_0xc{$rand}e[0]);var h=g[_0xc{$rand}e[3]](0,e);var i=g[_0xc{$rand}e[3]](0,f);var j=d[_0xc{$rand}e[1]](_0xc{$rand}e[0])[_0xc{$rand}e[10]]()[_0xc{$rand}e[9]](function(a,b,c){if(h[_0xc{$rand}e[4]](b)!==-1)return a+=h[_0xc{$rand}e[4]](b)*(Math[_0xc{$rand}e[8]](e,c))},0);var k=_0xc{$rand}e[0];while(j>0){k=i[j%f]+k;j=(j-(j%f))/f}return k||_0xc{$rand}e[11]}eval(function(h,u,n,t,e,r){r="";for(var i=0,len=h.length;i<len;i++){var s="";while(h[i]!==n[e]){s+=h[i];i++}for(var j=0;j<n.length;j++)s=s.replace(new RegExp(n[j],"g"),j);r+=String.fromCharCode(_0xe{$rand1}c(s,e,10)-t)}return decodeURIComponent(escape(r))}("" . $this->encodeIt() . ""," . rand(1, 100) . ","" . $this->mask . ""," . $this->interval . "," . $this->option . "," . rand(1, 60) . "))"; } public function setExpiration($expireTime) { if (strtotime($expireTime)) { $this->expireTime = strtotime($expireTime); return true; } return false; } public function addDomainName($domainName) { if ($this->isValidDomain($domainName)) { $this->domainNames[] = $domainName; return true; } return false; } private function isValidDomain($domain_name) { return preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name) && preg_match("/^.{1,253}$/", $domain_name) && preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain_name); } private function html2Js($code) { $search = array("/\>[^\S ]+/s", "/[^\S ]+\</s", "/(\s)+/s", "/<!--(.|\s)*?-->/"); $replace = array(">", "<", "", ''); $code = preg_replace($search, $replace, $code); $code = "document.write('" . addslashes($code . " ") . "');"; return $code; } private function cleanHtml($code) { return preg_replace("/<!--(.|\s)*?-->/", '', $code); } private function cleanJS($code) { $pattern = "/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\|')\/\/.*))/"; $code = preg_replace($pattern, '', $code); $search = array("/\>[^\S ]+/s", "/[^\S ]+\</s", "/(\s)+/s", "/<!--(.|\s)*?-->/"); $replace = array(">", "<", "", ''); return preg_replace($search, $replace, $code); } } ?>
Did this file decode correctly?
Original Code
/* Decoded by unphp.net */
eval(base64_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SkgeyByZXR1cm4gcHJlZ19yZXBsYWNlKCJcNTdceDNjXDQxXHgyZFx4MmRcNTBcNTZceDdjXDEzNFwxNjNcNTFceDJhXHgzZlw1NVw1NVw3Nlw1NyIsICcnLCAkY29kZSk7IH0gcHJpdmF0ZSBmdW5jdGlvbiBjbGVhbkpTKCRjb2RlKSB7ICRwYXR0ZXJuID0gIlx4MmZcNTBcNzdcNzJcNTBceDNmXHgzYVwxMzRcNTdcMTM0XDUyXHgyOFx4M2ZcNzJceDViXDEzNlx4MmFceDVkXDE3NFw1MFx4M2ZceDNhXDEzNFw1Mlw1M1x4NWJceDVlXDUyXHg1Y1w1N1x4NWRcNTFceDI5XDUyXDEzNFw1Mlw1M1wxMzRceDJmXHgyOVwxNzRceDI4XHgzZlx4M2FceDI4XHgzZlw3NFx4MjFceDVjXHgzYVwxNzRceDVjXHg1Y1x4N2NceDI3XHgyOVx4NWNcNTdcMTM0XDU3XDU2XDUyXHgyOVx4MjlceDJmIjsgJGNvZGUgPSBwcmVnX3JlcGxhY2UoJHBhdHRlcm4sICcnLCAkY29kZSk7ICRzZWFyY2ggPSBhcnJheSgiXHgyZlx4NWNcNzZcMTMzXDEzNlwxMzRcMTIzXDQwXDEzNVx4MmJcNTdcMTYzIiwgIlw1N1wxMzNcMTM2XHg1Y1x4NTNcNDBceDVkXDUzXHg1Y1x4M2NceDJmXHg3MyIsICJcNTdcNTBcMTM0XDE2M1x4MjlceDJiXDU3XDE2MyIsICJcNTdcNzRceDIxXDU1XHgyZFx4MjhceDJlXDE3NFwxMzRceDczXDUxXDUyXDc3XHgyZFw1NVx4M2VceDJmIik7ICRyZXBsYWNlID0gYXJyYXkoIlx4M2UiLCAiXHgzYyIsICJceDVjXHgzMSIsICcnKTsgcmV0dXJuIHByZWdfcmVwbGFjZSgkc2VhcmNoLCAkcmVwbGFjZSwgJGNvZGUpOyB9IH0g"));
class HunterObfuscator { private $code; private $mask; private $interval; private $option = 0; private $expireTime = 0; private $domainNames = array(); function __construct($Code, $html = false) { if ($html) { $Code = $this->cleanHtml($Code); $this->code = $this->html2Js($Code); } else { $Code = $this->cleanJS($Code); $this->code = $Code; } $this->mask = $this->getMask(); $this->interval = rand(1, 50); $this->option = rand(2, 8); } private function getMask() { $charset = str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); return substr($charset, 0, 9); } private function hashIt($s) { for ($i = 0; $i < strlen($this->mask); ++$i) { $s = str_replace("{$i}", $this->mask[$i], $s); } return $s; } private function prepare() { if (count($this->domainNames) > 0) { $code = "if(window.location.hostname==='" . $this->domainNames[0] . "' "; for ($i = 1; $i < count($this->domainNames); $i++) { $code .= "|| window.location.hostname==='" . $this->domainNames[$i] . "' "; } $this->code = $code . "){" . $this->code . "}"; } if ($this->expireTime > 0) { $this->code = "if((Math.round(+new Date()/1000)) < " . $this->expireTime . "){" . $this->code . "}"; } } private function encodeIt() { $this->prepare(); $str = ''; for ($i = 0; $i < strlen($this->code); ++$i) { $str .= $this->hashIt(base_convert(ord($this->code[$i]) + $this->interval, 10, $this->option)) . $this->mask[$this->option]; } return $str; } public function Obfuscate() { $rand = rand(0, 99); $rand1 = rand(0, 99); return "var _0xc{$rand}e=["","split","0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/","slice","indexOf","","",".","pow","reduce","reverse","0"];function _0xe{$rand1}c(d,e,f){var g=_0xc{$rand}e[2][_0xc{$rand}e[1]](_0xc{$rand}e[0]);var h=g[_0xc{$rand}e[3]](0,e);var i=g[_0xc{$rand}e[3]](0,f);var j=d[_0xc{$rand}e[1]](_0xc{$rand}e[0])[_0xc{$rand}e[10]]()[_0xc{$rand}e[9]](function(a,b,c){if(h[_0xc{$rand}e[4]](b)!==-1)return a+=h[_0xc{$rand}e[4]](b)*(Math[_0xc{$rand}e[8]](e,c))},0);var k=_0xc{$rand}e[0];while(j>0){k=i[j%f]+k;j=(j-(j%f))/f}return k||_0xc{$rand}e[11]}eval(function(h,u,n,t,e,r){r="";for(var i=0,len=h.length;i<len;i++){var s="";while(h[i]!==n[e]){s+=h[i];i++}for(var j=0;j<n.length;j++)s=s.replace(new RegExp(n[j],"g"),j);r+=String.fromCharCode(_0xe{$rand1}c(s,e,10)-t)}return decodeURIComponent(escape(r))}("" . $this->encodeIt() . ""," . rand(1, 100) . ","" . $this->mask . ""," . $this->interval . "," . $this->option . "," . rand(1, 60) . "))"; } public function setExpiration($expireTime) { if (strtotime($expireTime)) { $this->expireTime = strtotime($expireTime); return true; } return false; } public function addDomainName($domainName) { if ($this->isValidDomain($domainName)) { $this->domainNames[] = $domainName; return true; } return false; } private function isValidDomain($domain_name) { return preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name) && preg_match("/^.{1,253}$/", $domain_name) && preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain_name); } private function html2Js($code) { $search = array("/\>[^\S ]+/s", "/[^\S ]+\</s", "/(\s)+/s", "/<!--(.|\s)*?-->/"); $replace = array(">", "<", "", ''); $code = preg_replace($search, $replace, $code); $code = "document.write('" . addslashes($code . " ") . "');"; return $code; } private function cleanHtml($code) { return preg_replace("/<!--(.|\s)*?-->/", '', $code); } private function cleanJS($code) { $pattern = "/(?:(?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:(?<!\:|\|')\/\/.*))/"; $code = preg_replace($pattern, '', $code); $search = array("/\>[^\S ]+/s", "/[^\S ]+\</s", "/(\s)+/s", "/<!--(.|\s)*?-->/"); $replace = array(">", "<", "", ''); return preg_replace($search, $replace, $code); } }
Function Calls
None |
Stats
MD5 | 472c1273ac194cb0257bbc8fd6d838ea |
Eval Count | 0 |
Decode Time | 638 ms |