📄 proxy.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0060)http://web.uc.sina.com.cn/proxy/proxy.html?my_uid=1596986490 -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Sina WebUC</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META http-equiv=cache-control content=max-age=3600>
<SCRIPT src="proxy_files/dojo.js" type=text/javascript></SCRIPT>
<SCRIPT src="proxy_files/cometda.js" type=text/javascript></SCRIPT>
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<DIV style="FONT-SIZE: 1px; OVERFLOW: hidden; WIDTH: 1px; HEIGHT: 1px">
<OBJECT id=lsf_obj
codeBase=http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab
height=1 width=1 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="/asset/lsf.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowScriptAccess" VALUE="always">
<embed src="/asset/lsf.swf" quality="high" bgcolor="#FFFFFF"
width="1" height="1" name="lsf_obj" align="middle" play="true"
loop="false" quality="high" allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer"> </embed>
</OBJECT></DIV>
<DIV id=test_con></DIV>
<SCRIPT type=text/javascript>var isOpera, isIE, isNc, isFF = false;if(navigator.userAgent.indexOf("Opera") != -1) { isOpera = true;}else if(navigator.userAgent.indexOf("Firefox") != -1) { isFF = true;}else if(navigator.appName == "Microsoft Internet Explorer") { isIE = true;}else if(navigator.appName == "Netscape") { isNc = true;}var g_server_path = null;var g_channel_im = "im";var g_channel_im_req = "/im/req";var g_channelId = null;var uid = null;var sso_uid = null;var lsf = null;var lsf_channel = null;var browser = null;var lsf_param = null;var SE = null;var mess_cache = new Array();var has_webuc = false;var im_link_flag = false;if (isIE) { browser = "IE";}else if (isFF) { browser = "FF";}else if (isOpera) { browser = "Opera";}else { browser = "Other";}function swf_interface(swf_name) { if (isIE) { return window[swf_name]; } else { return document[swf_name]; }}function init_proxy(my_uid) { set_test("my_uid:" + my_uid); if (!my_uid && my_uid == "null") { set_log("my_uid:null"); return false; } uid = my_uid; lsf = swf_interface("lsf_obj"); lsf_channel = "_" + browser + uid + "proxy"; set_test("swf_channel:" + lsf_channel); lsf_param = {"channel_name": lsf_channel, "callback_function": "im_srever"}; lsf_init();}function lsf_init() { try { lsf.register(lsf_param); }catch (e) { window.setTimeout("lsf_init()", 500); }}function im_srever() { try { set_log("type:" + lsf.getType(lsf_channel)); if (lsf.getType(lsf_channel) == "Server") { lsf.setVars(lsf_channel ,"has_webim", false); has_webuc = false; set_test("type:" + lsf.getType(lsf_channel)); set_test("has_webuc:" + has_webuc); set_test("has_webim:" + lsf.getVars(lsf_channel ,"has_webim")); login_webuc(); }else if (lsf.getType(lsf_channel) == "Client") { has_webuc = true; set_test("type:" + lsf.getType(lsf_channel)); set_test("has_webuc:" + has_webuc); set_test("has_webim:" + lsf.getVars(lsf_channel ,"has_webim")); logout(); set_test("logout..."); } }catch (e) {}}function login_webuc() { var webuc_url = "http://nas.uc.sina.com.cn/webuc/?returntype=json&callback=" + encodeURIComponent('init_im') + "&uid=" + uid + "&e=" + Math.random(); var _head = document.getElementsByTagName("head")[0]; var snode = document.createElement("script"); snode.setAttribute("type", "text/javascript"); snode.setAttribute("language", "javascript"); snode.setAttribute("src", webuc_url); snode.onload = function() { _head.removeChild(snode); } if(navigator.appName == "Microsoft Internet Explorer") { snode.onreadystatechange = function() { if(snode.readyState == "complete" || snode.readyState == "loaded") { _head.removeChild(snode); } } } _head.appendChild(snode);}function init_im(return_json) { if (!return_json) { set_log("imServerInfo:null"); return false; } g_channelId = return_json.channel; g_server_path = return_json.server; set_test("channelId:" + g_channelId); set_test("server_path:" + g_server_path); if (!g_channelId || g_channelId == "null") { set_log("channelId:null"); return false; } if (!g_server_path || g_server_path == "null") { set_log("serverPath:null"); return false; } var return_uid = g_channelId.split("_")[1] || null; set_test("return_uid:" + return_uid); if (return_uid && parseInt(return_uid) != parseInt(uid)) { set_log("uid:" + uid + " - return_uid:" + return_uid); return false; } set_test("连接"); set_log("connect"); login();}function login() { if (room) room._init();}function getParamValue(paramName) { var url = window.location.search; if(url.indexOf("?") != -1) { var strs = url.substr(1).split("&"); for(var i=0; i<strs.length; i++) { var ss = strs[i].split("="); if (ss[0] == paramName) return decodeURIComponent(ss[1]); } } return null;}var g_error_count = 0;var CMD = { VCARD: "vcard", ROSTER: "roster", PRIVACY: "privacy", MSG: "msg", PRESENCE: "presence", CLOSE: "close"};var PRESENCE = { invisible: "invisible", chat: "chat", available: "available", unavailable: "unavailable", away: "away", xa: "xa", dnd: "dnd"};var room = { _connected: true, _channel: g_channelId, _receive: function(message) { data_process(message.data); if (message.data.type == CMD.CLOSE) { set_log("connect:cut"); this.leave(); } }, _init: function() { this._channel = g_channelId; dojox.cometd.init(g_server_path + g_channel_im); this._connected = true; dojox.cometd.subscribe(this._channel, room, "_receive"); dojox.cometd.startBatch(); dojox.cometd.publish(g_channel_im_req, { cmd: CMD.PRESENCE, status: PRESENCE.available }); set_log("publish:available"); dojox.cometd.endBatch(); if (room._meta) { dojo.unsubscribe(room._meta, null, null); } room._meta = dojo.subscribe("/cometd/meta", this, function(e) { if (e.action == "handshake") { if (e.reestablish && e.successful) dojox.cometd.subscribe(this._channel, room, "_receive"); } else if (e.action == "connect") { this._connected = e.successful; } if (!e.successful) { if (e.cometd.lastMessage.advice.reconnect == "none") { set_log("reconnect:none"); }else { g_error_count++; if (g_error_count > 5) { set_log("connect:error"); this.leave(); } } }else { g_error_count = 0; } }); }, leave: function() { dojox.cometd.startBatch(); if (room._meta != null) { if (room._meta) { dojo.unsubscribe(room._meta); } room._meta = null; dojox.cometd.unsubscribe(this._channel, room, "_receive"); dojox.cometd.disconnect(); } dojox.cometd.endBatch(); set_test("断开连接请求已经发送..."); }, sendmsg: function(username, content) { dojox.cometd.publish(g_channel_im_req, { cmd: CMD.MSG, username:username, msg: content }); }, setPresence: function(p) { dojox.cometd.publish(g_channel_im_req, { cmd: CMD.PRESENCE, status : p }); }};function data_process(data) { try { if (!has_webuc) { if (data.type == "msg") { lsf.dispatch(lsf_channel, "webIM.get_content", data); set_test("msg:" + data.items[0].username + "->" + data.items[0].msg); mess_cache.push(data); lsf.setVars(lsf_channel, "funchao_set_mess", mess_cache); } } }catch (e) {}}function logout() { if (room && room.leave) { room.leave(); }}var logs = false;function set_test(str) { document.getElementById("test_con").innerHTML += (str + "<br/>");}function set_log(str) { if (logs) { try { var log_uid = uid == null ? "0" : uid; if (str != null) { var log_url = "http://123.103.66.25/log.jsp?uid="+ log_uid +"&content=" + str; var _head = document.getElementsByTagName("head")[0]; var snode = document.createElement("script"); snode.setAttribute("type", "text/javascript"); snode.setAttribute("language", "javascript"); snode.setAttribute("src", log_url); snode.onload = function() { _head.removeChild(snode); }; if(navigator.appName == "Microsoft Internet Explorer") { snode.onreadystatechange = function() { if(snode.readyState == "complete" || snode.readyState == "loaded") { _head.removeChild(snode); } }; } _head.appendChild(snode); } }catch (e) {} }}window.onload = function () { init_proxy(getParamValue("my_uid")); set_log("load_iframe");};window.onunload = function () { logout(); set_log("logout");};dojo.addOnUnload(room, "leave");</SCRIPT>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -