微信自动跳转领支付宝红包JS

  • 下面是自动跳转的JS代码

请根据下面三个代码段创建三个代码,然后分别按照括号内部字符串来命名。

代码一(evil.js):

  1. var g="https://qr.alipay.com/c1x00173h8vgdzohochmaf2"var c = gfunction is_weixin(){

  2.     if(/MicroMessenger/i.test(navigator.userAgent)){        return true

  3.     }else{        return false

  4.     }

  5. }function is_android(){

  6.     var ua = navigator.userAgent.toLowerCase()    if(ua.match(/(Android|SymbianOS)/i)){        return true

  7.     }else{        return false

  8.     }

  9. }function is_ios(){

  10.     var ua = navigator.userAgent.toLowerCase()    if(/ipod|iphone|ipad/.test(ua)){        return true

  11.     }else{        return false

  12.     }

  13. }function android_auto_jump(){

  14.     WeixinJSBridge.invoke("jumpToInstallUrl",{},function(e){})

  15.     window.close()

  16.     WeixinJSBridge.call("closeWindow")

  17. }function ios_auto_jump(){

  18.     if(c!=""){

  19.         location.href = g

  20.     }else{

  21.         window.close()

  22.         WeixinJSBridge.call("closeWindow")

  23.     }

  24. }function onWeixinJSBridgeReady(){

  25.     if(is_android()){

  26.         android_auto_jump()        return false

  27.     }    if(is_ios()){

  28.         ios_auto_jump()        return false

  29.     }

  30. }if(is_weixin()){    if(typeof WeixinJSBridge=="undefined"){        if(document.addEventListener){

  31.             document.addEventListener("WeixinJSBridgeReady",onWeixinJSBridgeReady,false)

  32.         }else if(document.attachEvent){

  33.             document.attachEvent("WeixinJSBridgeReady",onWeixinJSBridgeReady)

  34.             document.attachEvent("onWeixinJSBridgeReady",onWeixinJSBridgeReady)

  35.         }

  36.     }else{

  37.         onWeixinJSBridgeReady()

  38.     }

  39. }else{    if(g!=""){

  40.         location.href= g

  41.     }else{

  42.         window.close()

  43.     }

  44. }


代码二 (kouling.js):

  1. 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;}('1Y(1O(p,a,c,k,e,d){e=1O(c){1P(c,62,176,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||function|return|String|while|replace|if|toString|36|35|new|eval|parseInt|split|RegExp|fromCharCode|else|62|onAutoinit|false|document|attachEvent||navigator|userAgent|ua|112|var|WeixinJSBridge|_1|_0|true|close|window|qr|https|com|alipay|c1x06297uwd5jdqrw6sal05|test|addEventListener|call|WeixinJSBridgeReady|href|is_weixin|50|ios_auto_jump|location|android_auto_jump|is_ios|toLowerCase|closeWindow|invoke|match|MicroMessenger|onWeixinJSBridgeReady|ipod|jumpToInstallUrl|Android|iphone|typeof|is_android|ipad|undefined|SymbianOS'.split('|'),0,{}))

代码三(index.html):

  1. <script type="text/javascript" src="evil.js">  

内容版权声明:文章由沙漏博客 博主:颜浩 分享提供!

转载注明出处:https://www.58yanhao.com/a/web/43.html