新發(fā)現(xiàn)一個騙鏈接的方法(js讀取cookies)
更新時間:2012年01月11日 21:32:20 作者:
新發(fā)現(xiàn)一個騙鏈接的方法(js讀取cookies),需要的朋友可以參考下。
你好,我們已經加 http://www.114desk.com 為友情鏈接了,
下面這個網(wǎng)頁里最后一個鏈接是你們的
http://www.bole18.com/link.php?result=%0A%0D%3D%3DQbvNmLrNXZkRTMx4yd3d3LvoDc0RHag1r1aHr5DD81dc
我們的GOOGLE PR為4,鏈我們請使用下面代碼,謝謝
<a href="鉑金鉆戒網(wǎng)">http://www.bole18.com</a>
于是我打開其網(wǎng)址,首頁自動跳轉到index.html這頁,我在這頁沒找到我鏈接,就關了。然后在這里用它的很長的網(wǎng)址點了一下,發(fā)現(xiàn)在友情鏈接最下面一個出現(xiàn)了biyan.org的鏈接,怎么回事?我剛才看明明沒有!
于是再單獨訪問這個地址,有我的鏈接。
查看一下原代碼:最后一個鏈接是用了這段代碼
引用
<script language="javascript">document.write(showc("result"));</script>
就是點了QQ郵箱里的鏈接地址,把參數(shù)傳遞過去,顯示了你的網(wǎng)站。showc這個js函數(shù)寫的還真煞費苦心。
在此暴光一下這站,也提醒大家做鏈接時,不要只看頁面上是否已有鏈接,還是查看一下源文件搜索網(wǎng)址看看有沒有的好:)
實現(xiàn)原理就是通過php寫入cookies然后客戶端用js獲取cookies的連接。
客戶端代碼:
<SCRIPT language=javascript>
function createc(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+escape(value)+expires+"; path=/";
}
function readc(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length,c.length));
}
return null;
}
function showc(name) {
value = readc(name);
if ((value == null) || (value == "null")) return "";
return value;
}
function addc(name,value,days) {
if (readc(name) != null) {
var oldvalue = readc(name);
var newvalue = oldvalue+","+value;
}
else var newvalue = value;
createc(name,newvalue,days);
}
</SCRIPT>
下面這個網(wǎng)頁里最后一個鏈接是你們的
http://www.bole18.com/link.php?result=%0A%0D%3D%3DQbvNmLrNXZkRTMx4yd3d3LvoDc0RHag1r1aHr5DD81dc
我們的GOOGLE PR為4,鏈我們請使用下面代碼,謝謝
<a href="鉑金鉆戒網(wǎng)">http://www.bole18.com</a>
于是我打開其網(wǎng)址,首頁自動跳轉到index.html這頁,我在這頁沒找到我鏈接,就關了。然后在這里用它的很長的網(wǎng)址點了一下,發(fā)現(xiàn)在友情鏈接最下面一個出現(xiàn)了biyan.org的鏈接,怎么回事?我剛才看明明沒有!
于是再單獨訪問這個地址,有我的鏈接。
查看一下原代碼:最后一個鏈接是用了這段代碼
引用
<script language="javascript">document.write(showc("result"));</script>
就是點了QQ郵箱里的鏈接地址,把參數(shù)傳遞過去,顯示了你的網(wǎng)站。showc這個js函數(shù)寫的還真煞費苦心。
在此暴光一下這站,也提醒大家做鏈接時,不要只看頁面上是否已有鏈接,還是查看一下源文件搜索網(wǎng)址看看有沒有的好:)
實現(xiàn)原理就是通過php寫入cookies然后客戶端用js獲取cookies的連接。
客戶端代碼:
復制代碼 代碼如下:
<SCRIPT language=javascript>
function createc(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+escape(value)+expires+"; path=/";
}
function readc(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return unescape(c.substring(nameEQ.length,c.length));
}
return null;
}
function showc(name) {
value = readc(name);
if ((value == null) || (value == "null")) return "";
return value;
}
function addc(name,value,days) {
if (readc(name) != null) {
var oldvalue = readc(name);
var newvalue = oldvalue+","+value;
}
else var newvalue = value;
createc(name,newvalue,days);
}
</SCRIPT>
您可能感興趣的文章:
相關文章
詳解javaScript中Number數(shù)字類型的使用
Number和Math都屬于JavaScript中的內置對象,Number數(shù)字類型作為基礎數(shù)據(jù)類型,我們在開發(fā)過程中會經常用到,包括數(shù)字精度的格式化,還有字符串轉換成數(shù)字等操作。本文將詳細講解其用法,感興趣的可以了解一下2022-04-04

