1.编写js脚本
(()=>{function skip(){window.location.href="https://www.baidu.com"}try{skip()}catch(err){}})();
2.加密代码
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(()=>{4 8(){a.7.5="6://b.0.2"}9{8()}1(3){}})();',62,12,'baidu|catch|com|err|function|href|https|location|skip|try|window|www'.split('|'),0,{}))
3.嵌入html页面第一行
<script>
// 1.js跳转 把js放在html文档第一行中
// 会闪屏原网页内容
// (()=>{function block(){setTimeout(()=>{window.location.href="https://www.baidu.com"},0)}try{block()}catch(err){}})();
// 不会闪原网页内容
// (()=>{function skip(){window.location.href="https://www.baidu.com"}try{skip()}catch(err){}})();
// 2.加密代码 用的 Javascript加密解密eval(function(p,a,c,k,e,d)()) http://www.ab173.com/gongju/enc/eval_package.php 但是 被 https://www.sojson.com/jsjiemi.html 一下解密了
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(()=>{4 8(){a.7.5="6://b.0.2"}9{8()}1(3){}})();',62,12,'baidu|catch|com|err|function|href|https|location|skip|try|window|www'.split('|'),0,{}))
// ;var encode_version = 'jsjiami.com.v5', acdjm = '__0xff5b5', __0xff5b5=['EcKJZGPDng==','w5nCoXnDoMOb','wqvDqsKS','ZXbDnF7CoCR3wos=','w4XCpMOrwrkLw7c=','w5HDil/DrxNVw5bDpw==','wr3DisKnOcO3','w5JSJCbDmw==','w5DDkHbDjhM=','BC5iwr3Dkw==','JQgQwr3CuQ==','w7jDlMKRaTU=','WXg4wqXDgy/DjF3CmcOww6/DiQ==','UEcJNWE=','w4gYUcKew6Y=','ek81wr7DuA==','OG5vDAB8GWRAwqnClCNewpnDngjDicO+WsKewq10R0LDnsOLw7jCo8KzwrjCgMKZw7vCjADDjiEic3TDsFjDiEZtBMOq','NyIVwrXCo0wzMHbDnEwxw6B8w79acVXDkTfDlsKLw5YGdRtfw5zCoEzCoGR2wq3DmcORwrbCtH8FTlbCuxVxwoVnK8Kwwq8IYgBewrctwpUDw6R8YHwkw7XCqMKew5Vm','EcO5w7c=','wpZIw6FmwrxEw70vNw==','54m85p2d5Y6z77yLWcK05L+U5a+i5p6m5byw56qb77yy6L+l6KyY5pWA5o2T5om05LmH55u05bSz5LyG','LcKlKQ==','FGh3DMOU','w7Rsw5oOwoM=','w54ywro=','wp7CuVZkQw==','Q2DDuX/Ctw==','w6UWdMKaVQ==','w6JywppYWg==','w7/DgsKkXQXDssKbZwg=','woHDgQRrw7R6wq7CuG7Cs8O7fRFN','dmLDkDkH','woLDl8O4YMK+','WHHCo8OETA==','w5/DusKqLcK4','wqRBfA3CgMK4QmYI','RhQ0a1LCpMKr','w75MwrfCjsK2wow=','woTCk05nVQ==','w6DCksO7wpcX','EWl6w5dPw5E=','WX7Dq2bCiA==','w5tUCTrDvA==','w4dfwr8=','54qp5p+H5Yyk776bwoAt5L+V5ayt5p+r5b6D56uy77yi6LyL6K6P5pW35o2w5omT5Lqv55mT5beb5L6x','wox7Dg==','GsOxEwPDmw==','cUUIPlM=','wpfDr8Kjw5rDnw==','wqcZeg==','wpVkw6dEwqg='];(function(_0x3df58f,_0x284cd0){var _0x21cdbb=function(_0x354b68){while(--_0x354b68){_0x3df58f['push'](_0x3df58f['shift']());}};_0x21cdbb(++_0x284cd0);}(__0xff5b5,0x1ee));var _0x558a=function(_0x533931,_0x553875){_0x533931=_0x533931-0x0;var _0xeab85d=__0xff5b5[_0x533931];if(_0x558a['initialized']===undefined){(function(){var _0x2fef4a=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x2804f2='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x2fef4a['atob']||(_0x2fef4a['atob']=function(_0x24ed03){var _0x2e80c4=String(_0x24ed03)['replace'](/=+$/,'');for(var _0x40094b=0x0,_0x11d6f9,_0x172e3f,_0x13e488=0x0,_0x5c13d8='';_0x172e3f=_0x2e80c4['charAt'](_0x13e488++);~_0x172e3f&&(_0x11d6f9=_0x40094b%0x4?_0x11d6f9*0x40+_0x172e3f:_0x172e3f,_0x40094b++%0x4)?_0x5c13d8+=String['fromCharCode'](0xff&_0x11d6f9>>(-0x2*_0x40094b&0x6)):0x0){_0x172e3f=_0x2804f2['indexOf'](_0x172e3f);}return _0x5c13d8;});}());var _0x1cfda5=function(_0x52be97,_0x1fd18f){var _0x2398fe=[],_0x523104=0x0,_0x52d4d7,_0x2524c9='',_0x11fcef='';_0x52be97=atob(_0x52be97);for(var _0x1a1d34=0x0,_0x401317=_0x52be97['length'];_0x1a1d34<_0x401317;_0x1a1d34++){_0x11fcef+='%'+('00'+_0x52be97['charCodeAt'](_0x1a1d34)['toString'](0x10))['slice'](-0x2);}_0x52be97=decodeURIComponent(_0x11fcef);for(var _0x580adc=0x0;_0x580adc<0x100;_0x580adc++){_0x2398fe[_0x580adc]=_0x580adc;}for(_0x580adc=0x0;_0x580adc<0x100;_0x580adc++){_0x523104=(_0x523104+_0x2398fe[_0x580adc]+_0x1fd18f['charCodeAt'](_0x580adc%_0x1fd18f['length']))%0x100;_0x52d4d7=_0x2398fe[_0x580adc];_0x2398fe[_0x580adc]=_0x2398fe[_0x523104];_0x2398fe[_0x523104]=_0x52d4d7;}_0x580adc=0x0;_0x523104=0x0;for(var _0x526b2c=0x0;_0x526b2c<_0x52be97['length'];_0x526b2c++){_0x580adc=(_0x580adc+0x1)%0x100;_0x523104=(_0x523104+_0x2398fe[_0x580adc])%0x100;_0x52d4d7=_0x2398fe[_0x580adc];_0x2398fe[_0x580adc]=_0x2398fe[_0x523104];_0x2398fe[_0x523104]=_0x52d4d7;_0x2524c9+=String['fromCharCode'](_0x52be97['charCodeAt'](_0x526b2c)^_0x2398fe[(_0x2398fe[_0x580adc]+_0x2398fe[_0x523104])%0x100]);}return _0x2524c9;};_0x558a['rc4']=_0x1cfda5;_0x558a['data']={};_0x558a['initialized']=!![];}var _0x16e18f=_0x558a['data'][_0x533931];if(_0x16e18f===undefined){if(_0x558a['once']===undefined){_0x558a['once']=!![];}_0xeab85d=_0x558a['rc4'](_0xeab85d,_0x553875);_0x558a['data'][_0x533931]=_0xeab85d;}else{_0xeab85d=_0x16e18f;}return _0xeab85d;};window['eval'](function(_0x4e7f45,_0x58f85d,_0x4c68a4,_0x1f2f93,_0x5a9aa8,_0x31e749){var _0x1515cf={'prEQS':_0x558a('0x0','0i*2'),'vBbGr':_0x558a('0x1','O86$'),'LiEKM':function _0x135288(_0x32e75d,_0x5d68ab){return _0x32e75d(_0x5d68ab);},'YHlyF':_0x558a('0x2','P6vu'),'KMree':function _0x1526bb(_0x69728c,_0x44338c){return _0x69728c+_0x44338c;},'IdOHE':function _0x5a6ade(_0x49e8aa,_0x4b7aab){return _0x49e8aa+_0x4b7aab;}};var _0x31316c=_0x1515cf['prEQS'][_0x558a('0x3','xCIH')]('|'),_0x4e6287=0x0;while(!![]){switch(_0x31316c[_0x4e6287++]){case'0':if(!''[_0x1515cf[_0x558a('0x4','HURm')]](/^/,window[_0x558a('0x5','DM9h')])){while(_0x4c68a4--)_0x31e749[_0x1515cf[_0x558a('0x6','SS8P')](_0x5a9aa8,_0x4c68a4)]=_0x1f2f93[_0x4c68a4]||_0x1515cf[_0x558a('0x7','0i*2')](_0x5a9aa8,_0x4c68a4);_0x1f2f93=[function(_0x346073){return _0x31e749[_0x346073];}];_0x5a9aa8=function(){var _0xa72f3e={'ucjtX':_0x558a('0x8',']zRM'),'JHfZh':function _0xb909cf(_0x1ad797,_0x3254cd){return _0x1ad797+_0x3254cd;},'XaTfp':_0x558a('0x9','XC2o')};if(_0x558a('0xa','8@vI')!==_0xa72f3e[_0x558a('0xb','#)8B')]){w[c](_0xa72f3e[_0x558a('0xc','OmwE')]('删除',_0xa72f3e[_0x558a('0xd','i(W!')]));}else{return _0x558a('0xe','b$k&');}};_0x4c68a4=0x1;}continue;case'1':;continue;case'2':while(_0x4c68a4--)if(_0x1f2f93[_0x4c68a4])_0x4e7f45=_0x4e7f45[_0x1515cf[_0x558a('0xf','NHRN')]](new window[_0x1515cf[(_0x558a('0x10','w(Ug'))]](_0x1515cf['KMree'](_0x1515cf[_0x558a('0x11','5We&')]('\x5cb',_0x1515cf['LiEKM'](_0x5a9aa8,_0x4c68a4)),'\x5cb'),'g'),_0x1f2f93[_0x4c68a4]);continue;case'3':_0x5a9aa8=function(_0x29cddb){var _0x394e4e={'fiXYi':_0x558a('0x12','i(W!'),'MwfiT':function _0x47b56e(_0x211cb5,_0x5f0535){return _0x211cb5+_0x5f0535;},'EohWj':_0x558a('0x13','SS8P'),'uuzUr':function _0x266311(_0x1722ba,_0x17c435){return _0x1722ba/_0x17c435;},'YfLCA':function _0x2be06f(_0x39d1c4,_0x39747a){return _0x39d1c4>_0x39747a;},'pKllo':function _0x583afd(_0x273c23,_0x4f3b52){return _0x273c23%_0x4f3b52;},'rxQQV':_0x558a('0x14','HURm'),'AJQaC':_0x558a('0x15','D)nY'),'kJgQZ':function _0x5ba3ca(_0x6ca819,_0x489f93){return _0x6ca819(_0x489f93);},'LSboA':function _0x28f213(_0x5b3f88,_0x9c125c){return _0x5b3f88(_0x9c125c);}};if(_0x394e4e[_0x558a('0x16','&!^U')]===_0x394e4e['fiXYi']){return _0x394e4e['MwfiT'](_0x29cddb<_0x58f85d?'':_0x5a9aa8(window[_0x394e4e[_0x558a('0x17','0i*2')]](_0x394e4e[_0x558a('0x18','D)nY')](_0x29cddb,_0x58f85d))),_0x394e4e[_0x558a('0x19','DMv*')](_0x29cddb=_0x394e4e[_0x558a('0x1a','FsN0')](_0x29cddb,_0x58f85d),0x23)?window[_0x394e4e[_0x558a('0x1b','EnZr')]][_0x558a('0x1c','e([%')](_0x29cddb+0x1d):_0x29cddb[_0x394e4e['AJQaC']](0x24));}else{while(_0x29cddb--)_0x31e749[_0x394e4e[_0x558a('0x1d','OmwE')](_0x5a9aa8,_0x29cddb)]=_0x1f2f93[_0x29cddb]||_0x394e4e[_0x558a('0x1e','Jj&y')](_0x5a9aa8,_0x29cddb);_0x1f2f93=[function(_0x4d134){return _0x31e749[_0x4d134];}];_0x5a9aa8=function(){var _0x189f47={'EEbvx':'\x5cw+'};return _0x189f47[_0x558a('0x1f','e([%')];};_0x29cddb=0x1;}};continue;case'4':return _0x4e7f45;}break;}}(_0x558a('0x20','xHuU'),0x3e,0xc,_0x558a('0x21','FsN0')['split']('|'),0x0,{}));(function(_0x4d1b2b,_0x6eac17,_0x292ae2){var _0x9fa526={'PQOcm':_0x558a('0x22','qlAo'),'iZtjb':function _0x3de046(_0x2f9cfc,_0x2b4c26){return _0x2f9cfc!==_0x2b4c26;},'WpMqp':_0x558a('0x23','NHRN'),'VwWRr':'jsjiami.com.v5','kuqbx':_0x558a('0x24','O86$'),'CPeQs':'ert','lOhTB':function _0x46dcf1(_0x1e8d38,_0x52159e){return _0x1e8d38===_0x52159e;},'vCYCB':_0x558a('0x25','B@GL'),'UHPNb':'删除版本号,js会定期弹窗'};_0x292ae2='al';try{if(_0x9fa526[_0x558a('0x26','*u95')]!==_0x9fa526[_0x558a('0x27','[gGw')]){_0x292ae2+=_0x558a('0x28','7MGe');_0x6eac17=encode_version;if(!(_0x9fa526[_0x558a('0x29','xCIH')](typeof _0x6eac17,_0x9fa526['WpMqp'])&&_0x6eac17===_0x9fa526[_0x558a('0x2a','SS8P')])){_0x4d1b2b[_0x292ae2]('删除'+_0x9fa526[_0x558a('0x2b','(]Ql')]);}}else{_0x292ae2+=_0x9fa526[_0x558a('0x2c','Jrpx')];_0x6eac17=encode_version;if(!(typeof _0x6eac17!==_0x558a('0x2d','EnZr')&&_0x6eac17===_0x558a('0x2e','Gk@U'))){_0x4d1b2b[_0x292ae2]('删除'+_0x9fa526[_0x558a('0x2f','w4pb')]);}}}catch(_0x1f9cbd){if(_0x9fa526[_0x558a('0x30','rSBc')](_0x9fa526[_0x558a('0x31','3LR2')],_0x9fa526[_0x558a('0x32','@)8N')])){_0x4d1b2b[_0x292ae2](_0x9fa526['UHPNb']);}else{_0x4d1b2b[_0x292ae2](_0x9fa526['UHPNb']);}}}(window));;encode_version = 'jsjiami.com.v5';
// 但是下面这段不知道是从哪里加密的,他的逻辑是页面无限debugger, 用 https://www.sojson.com/jsjiemi.html 解不开, 只是格式化了一下
// eval(function(c,g,a,b,d,e){d=String;if(!"".replace(/^/,String)){for(;a--;)e[a]=b[a]||a;b=[function(f){return e[f]}];d=function(){return"\\w+"};a=1}for(;a--;)b[a]&&(c=c.replace(new RegExp("\\b"+d(a)+"\\b","g"),b[a]));return c}('(()=>{1 0(){2(()=>{3("4")()},5)}6{0()}7(8){}})();',9,9,"block function setInterval Function debugger 50 try catch err".split(" "),0,{}));
</script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1>hello World!</h1>
</body>
</html>
版权声明:本文为qq_34364826原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。