一个js版权替换脚本

2016-11-16 15:39:00
hainuo
原创 1610
摘要:js版权控制脚本,从WSTMall中扒出来的用于替换页面展示的脚本
``` function onloadright(){ var linklist = $(String.fromCharCode(65)); var reg , link, plink; var rmd, flag = false; var ca = new Array(97, 98, 99,100, 101, 102, 103, 104, 105, 106, 107, 108, 109,110, 111, 112, 113, 114, 115, 116, 117, 118, 119,120, 121, 122); $(String.fromCharCode(65)).each(function(){ link = $(this).attr("href"); if(!flag){ reg = new RegExp(String.fromCharCode(87,83, 84, 77, 97, 108, 108)); plink = String.fromCharCode(ca[22], 119, 119, 46, ca[22], ca[18], ca[19], ca[12], 97, ca[11],108, 46, 110, 101, ca[19]); if(String(link).indexOf(plink) != -1){ var text = $.trim($(this).html()); if ((reg.exec(text)) != null){ flag = true; } } } }); var rmd = Math.random(); rmd = Math.floor(rmd * linklist.length); if (!flag){ $(linklist[rmd]).attr("href",String.fromCharCode(104, 116, 116, 112, 58, 47, 47, 119, 119, 119,46, 119,115, 116, 109, 97, 108, 108, 46, 110, 101, 116)) ; $(linklist[rmd]).html(String.fromCharCode( 80, 111, 119, 101, 114, 101, 100,38, 110, 98, 115, 112, 59, 66, 121,38, 110, 98, 115, 112, 59,60, 115, 116, 114, 111, 110, 103, 62, 60,115, 112, 97, 110, 32, 115, 116, 121,108,101, 61, 34, 99, 111, 108, 111, 114, 58, 32, 35, 51, 51, 54, 54, 70, 70, 34, 62, 72,65, 73, 78, 85, 79,46,73,78,70,79, 60, 47, 115, 112, 97, 110, 62,60, 47, 115, 116, 114, 111, 110, 103, 62)); } } ``` 通过将字符串改为ascii码,来屏蔽大部分人的习惯 全文搜索。 比较有趣的是这个方法能够随机替换某个A链接