<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/><script> var setcookitarray =" "; Setcookitarray = "[\" http://passport.a.com/main/setcookie.do?domain=\ ", \" http://passport.a.com/main/setCookie/ Main/setcookie.do?domain=.b.cn\ ", \" http://passport.a.com/main/setcookie/main/setcookie.do?domain=.c.com\ ", \" Http://passport.a.com/main/setcookie/main/setcookie.do?domain=.d.cn\ "]"; Setcookitarray = eval (setcookitarray); var setcookitarrayln = setcookitarray.length; alert (SETCOOKITARRAYLN); var Notifyurl_list=setcookitarray; var ll = Setcookitarrayln; var params= "yqvg1ennsnnxydeq4azcap6tjhr90qceutb7[email protected][email protected]@@[email Protected]@[email protected] @tJB12hNLIG4oW0eA = = "; var failuretime=2678400; var backurl= "http://www.test.com"; Alert ("1111"); Loginall (Notifyurl_list, Ll-1, Backurl, params,failuretime); Alert ("2222"); function Loginall (notifyurl_list,num,backurl,params,failuretime) {var u = NotiFyurl_list[num]; Alert ("URL:" + (num) + "-" +u); if (typeof u! = "undefined") {//alert ("4444:" +notifyurl_list[num]); var url = notifyurl_list[num]+ "&failuretime=" +failuretime+ "&val=" +params;//alert ("URL:" +url);// Dynamically generate script Tag execution URL page var login=request ("Loginscript" +num,url); num--; if (num < 0) {window.settimeout (function () {window.location.href = Backurl; }, 2000); }else{loginall (notifyurl_list, num, Backurl, params,failuretime);} }} function request (Id,url) {oscript = document.getElementById (ID); var head = document.getElementsByTagName ("Head"). Item (0); if (oscript) {head.removechild (oscript); } Oscript = document.createelement ("script"); Oscript.setattribute ("src", url); Oscript.setattribute ("id", id); Oscript.setattribute ("type", "Text/javascript"); Oscript.setattribute ("Language", "JavaScript"); Head.apPendchild (Oscript); return oscript;} </script><body></body>
The invocation of a page is implemented primarily through recursive invocation and the dynamic creation of a script tag.
SSO a JS script that writes cookies across domains