Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x31\x28\x24\x78\x29\x7b\x72\x65\x74\x75\x72\x6e\x..
Decoded Output download
<? function f1($x){return base64_decode($x);}function f2($x,$y){return str_repeat($x,$y);}$c="G";$b=" ";$k3=file_get_contents('input');for ($i=0;$i<10;$i++){$k3=call_user_func('f'.chr(49),$k3);}print $k4."
";for ($i=0;$i<strlen($k3);$i++){$k2.=($i%2==1?$k3[$i]:"");}$k1=base64_decode($k2);$l=strlen($k1);$m=call_user_func('f'.chr(50),$c,$l);$p=call_user_func('f'.chr(50),$b,$l);for ($i=0;$i<$l;$i++){$p[$i]=chr(ord($k1[$i])^ord($m[$i]));}if ($password===$p){print file_get_contents('flag')."
";} ?>
Did this file decode correctly?
Original Code
\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x31\x28\x24\x78\x29\x7b\x72\x65\x74\x75\x72\x6e\x20\x62\x61\x73\x65\x36\x34\x5f\x64\x65\x63\x6f\x64\x65\x28\x24\x78\x29\x3b\x7d\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x32\x28\x24\x78\x2c\x24\x79\x29\x7b\x72\x65\x74\x75\x72\x6e\x20\x73\x74\x72\x5f\x72\x65\x70\x65\x61\x74\x28\x24\x78\x2c\x24\x79\x29\x3b\x7d\x24\x63\x3d\x22\x47\x22\x3b\x24\x62\x3d\x22\x20\x22\x3b\x24\x6b\x33\x3d\x66\x69\x6c\x65\x5f\x67\x65\x74\x5f\x63\x6f\x6e\x74\x65\x6e\x74\x73\x28\x27\x69\x6e\x70\x75\x74\x27\x29\x3b\x66\x6f\x72\x20\x28\x24\x69\x3d\x30\x3b\x24\x69\x3c\x31\x30\x3b\x24\x69\x2b\x2b\x29\x7b\x24\x6b\x33\x3d\x63\x61\x6c\x6c\x5f\x75\x73\x65\x72\x5f\x66\x75\x6e\x63\x28\x27\x66\x27\x2e\x63\x68\x72\x28\x34\x39\x29\x2c\x24\x6b\x33\x29\x3b\x7d\x70\x72\x69\x6e\x74\x20\x24\x6b\x34\x2e\x22\x0a\x0a\x22\x3b\x66\x6f\x72\x20\x28\x24\x69\x3d\x30\x3b\x24\x69\x3c\x73\x74\x72\x6c\x65\x6e\x28\x24\x6b\x33\x29\x3b\x24\x69\x2b\x2b\x29\x7b\x24\x6b\x32\x2e\x3d\x28\x24\x69\x25\x32\x3d\x3d\x31\x3f\x24\x6b\x33\x5b\x24\x69\x5d\x3a\x22\x22\x29\x3b\x7d\x24\x6b\x31\x3d\x62\x61\x73\x65\x36\x34\x5f\x64\x65\x63\x6f\x64\x65\x28\x24\x6b\x32\x29\x3b\x24\x6c\x3d\x73\x74\x72\x6c\x65\x6e\x28\x24\x6b\x31\x29\x3b\x24\x6d\x3d\x63\x61\x6c\x6c\x5f\x75\x73\x65\x72\x5f\x66\x75\x6e\x63\x28\x27\x66\x27\x2e\x63\x68\x72\x28\x35\x30\x29\x2c\x24\x63\x2c\x24\x6c\x29\x3b\x24\x70\x3d\x63\x61\x6c\x6c\x5f\x75\x73\x65\x72\x5f\x66\x75\x6e\x63\x28\x27\x66\x27\x2e\x63\x68\x72\x28\x35\x30\x29\x2c\x24\x62\x2c\x24\x6c\x29\x3b\x66\x6f\x72\x20\x28\x24\x69\x3d\x30\x3b\x24\x69\x3c\x24\x6c\x3b\x24\x69\x2b\x2b\x29\x7b\x24\x70\x5b\x24\x69\x5d\x3d\x63\x68\x72\x28\x6f\x72\x64\x28\x24\x6b\x31\x5b\x24\x69\x5d\x29\x5e\x6f\x72\x64\x28\x24\x6d\x5b\x24\x69\x5d\x29\x29\x3b\x7d\x69\x66\x20\x28\x24\x70\x61\x73\x73\x77\x6f\x72\x64\x3d\x3d\x3d\x24\x70\x29\x7b\x70\x72\x69\x6e\x74\x20\x66\x69\x6c\x65\x5f\x67\x65\x74\x5f\x63\x6f\x6e\x74\x65\x6e\x74\x73\x28\x27\x66\x6c\x61\x67\x27\x29\x2e\x22\x0a\x22\x3b\x7d
Function Calls
None |
Stats
MD5 | 0c513b8d335354038a99131a5f56ae0f |
Eval Count | 0 |
Decode Time | 129 ms |