腾讯QQ内域名检测是否拦截

<?php

//动态随机IP生成
function Rand_IP()
{

  $ip2id = round(rand(600000, 2550000) / 10000); //第一种方法,直接生成
  $ip3id = round(rand(600000, 2550000) / 10000);
  $ip4id = round(rand(600000, 2550000) / 10000);
  //下面是第二种方法,在以下数据中随机抽取
  $arr_1 = array("218", "218", "66", "66", "218", "218", "60", "60", "202", "204", "66", "66", "66", "59", "61", "60", "222", "221", "66", "59", "60", "60", "66", "218", "218", "62", "63", "64", "66", "66", "122", "211");
  $randarr = mt_rand(0, count($arr_1) - 1);
  $ip1id = $arr_1[$randarr];
  return $ip1id . "." . $ip2id . "." . $ip3id . "." . $ip4id;
}


  
 function msectime() {
    list($msec, $sec) = explode(' ', microtime());
    return (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
}

       $url = 'http://jiaoyimao.yuehaojiaoyimao88.top/';
       $ch = curl_init();     // Curl 初始化
       $header = [
           'X-FORWARDED-FOR:'.Rand_IP(),
           'CLIENT-IP:'.Rand_IP(),
           'Cookie: pgv_pvid=252559264; eas_sid=K166o5J1K262x3J8B9F6y1b4t3; tvfe_boss_uuid=f970c22be1012846; RK=uIs8rBBAV3; ptcz=5b27909e6b49712e2780976bdd45a5a627175bbdc1bea4ac71916a2b5e0de983; Qs_lvt_323937=1652268065; Qs_pv_323937=4225865704793271300; ptui_loginuin=1121304292; pt_sms_phone=187******62'
       ];
       
       $u = "https://cgi.urlsec.qq.com/index.php?m=gwComplainMergeIntoWechat&a=checkBlackStatus&callback=jQuery111109316733481321513_".msectime()."&url=".$url."&_=".msectime();
       
       curl_setopt($ch, CURLOPT_URL,$u);              // 设置 Curl 目标
       curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);      // Curl 请求有返回的值
       curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);     // 设置抓取超时时间
       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);        // 跟踪重定向
       curl_setopt($ch, CURLOPT_ENCODING, "");    // 设置编码
       curl_setopt($ch, CURLOPT_REFERER, $u);   // 伪造来源网址
       curl_setopt($ch, CURLOPT_HTTPHEADER, $header);  //伪造IP
       curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36 Edg/103.0.1264.37");   // 伪造ua
       curl_setopt($ch, CURLOPT_ENCODING, 'gzip'); // 取消gzip压缩
       curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // https请求 不验证证书和hosts
       curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
       $content = curl_exec($ch);
       curl_close($ch);    // 结束 Curl
      
       $data = stripslashes( $content );
 
       preg_match('/.+\((.+)\)/',$data,$msg);

       $arr_state = json_decode($msg[1], true);
posted @ 2022-07-30 01:57  Dreams_log  阅读(445)  评论(0)    收藏  举报