|
20精币
某网站登录密码JS加密求解 加密是&pwd=0x5f450caecf952e3087159bcd7392d08c&code= 搜pwd 可以找到加密处&pwd='+util.encode_4399(_p,keys[_u][0])
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/** * 用户操作模块(登录、注册) * @author YJC [url=home.php?mod=space&uid=251625]@[/url] web.4399.com * @since 2013-01-08 .. 2013-07-24 */ var USER = (function (factory){ if (typeof hjs === define (factory); // Halberd-JS } else { factory (function (){}, {}, {}); } }) (function (require, exports, module){ require ( var queue = (function (intervalTime){ var queue = [], running = 0; function run (){ queue.shift () (); setTimeout (function (){ if (queue.length === 0) { running = 0; } else { run (); } }, intervalTime); } return { push: function (fn){ queue.push (fn); if (running) { return } running = 1; run (); } }; }) (200); var W = window, D = document, $ = jQuery; user_action = (function (){ // 登录模块 var lived = false, // 是否已绑定全局元素事件 other_site_inited = false, // 第三方登录是否已初始化 keys = [], // user: [key, verification_code_state] keys_time = [], // 验证码/加密信息存入时间 keys_timeout = 900000, // keys有效期 last_check = checking = recorded = false, // 标记是否已经访问 record log index = 0, // 标记当前使用哪一个登录模块 code_104 = false, // 标记上次登录是否得到104错误代码 modules = [], // 登录模块引用 login_alert, // 正在登录的提示框 first_cover = true, // 是否第一次调用cover_window vcode_img = null, // 验证码图片 extlogin_status = root_url = location.host.indexOf ( var from_www = (D.referrer && ( ! /\/ddt\//.test (location.href)) && ( D.referrer.indexOf ( D.referrer.indexOf ( D.referrer.indexOf ( D.referrer.indexOf ( ) ); function get_game_name (){ var _s = W.location.href.replace ("http://", var _1 = _s.split ( var _2 = _s.split ( if (_2[0] == var _r = _s.substr (_s.indexOf ( if (_r) return _r[2]; else if (_1[1].indexOf ( else return } else return _2[0]; } var from_se = (get_game_name () && !/pay|\/ (hd|other)\//.test (location.href) && D.referrer && ( D.referrer.indexOf ( D.referrer.indexOf ( D.referrer.indexOf ( D.referrer.indexOf ( ) ); function simple_reg (){ return (from_www) && get_game_name () != } var cid = /\bcid= (\d+)/.exec (location.search); cid = cid ? parseInt (cid[1]) : var other_login_sites = { qq: {dir: weibo: {dir: // taobao: {dir: _default: }, _last_login_tip = null, _other_login_remove = null; var _evt = {}; function event_emit (type){ if (_evt[type]) { for (var i = 0, l = _evt[type].length; i < l; i++) { _evt[type][i].apply (null, Array.prototype.slice.call (arguments, 1)); } } } function event_on (type, fn){ if (typeof fn !== return; } if ( ! _evt[type]) { _evt[type] = []; } _evt[type].push (fn); } function get_other_nick (){ var n = pnick = pnick && pnick != qnick = qnick && qnick != if (qnick) { if (pnick && pnick.indexOf (qnick) === 0) { n = pnick; } else { n = qnick; } } else { n = pnick; } if ( ! n && (uauth = util.cookie ( n = uauth.split ( } return n ? decodeURIComponent (n) : } function other_login_type (){ var type = ( (util.cookie ( if (type && other_login_sites[type]) { return type; } return } function get_login_refer (){ if (W.location.href.indexOf ( return D.referrer } return W.location.href } function img_log (url,callback) { queue.push (function (){ var img = new Image (); img.onload = img.onerror = function () { if (callback && typeof callback === callback (); } img.onload = img.onerror = null; img = null; } img.src = url; }); }
function log_web_login (){ var uid = util.get_user_id (); if (util.cookie ( return } util.cookie ( var url = "http://record.4399.com/e.php?a=web.login" + "&u="+encodeURIComponent (USER)+ "&wr="+encodeURIComponent (util.cookie ( "&f="+other_login_type ()+ "&n="+encodeURIComponent (get_other_nick ())+ "&_="+ (new Date).getTime (); img_log (url) } function other_site_init (){ if ( ! other_site_inited) { other_site_inited = true; if (typeof window.keep_document_domain === W.document.domain = "4399.com"; } W.closePopupLoginDiv = function (){ }; W.UniLogin = { defaultPostLogin: function (){ var type = other_login_type (); util.get_user (); if (extlogin_status == event_emit ( img_log ( (type == } else { var login_ref = get_login_refer (); login_ref += (login_ref.indexOf ( img_log ( show_logined (USER); log_web_login ();
} extlogin_status = } }; } $ ( var o_s_login = $ (this); if (o_s_login.attr ( var o_t = $ (this).attr ( var reg_link = $ (this).find ( var other_auto_login = $ (this).attr ( if (o_t === o_s_login.attr ( o_s_login.find ( if ($ (this).attr ( $ (this).attr ( } }); } else { o_s_login.html ( for (var i in other_login_sites) { if (i.charAt (0) === continue; } if (o_t === o_s_login.append ( } else { o_s_login.append ( } } } if (reg_link.length){ o_s_login.append (reg_link); } o_s_login.delegate ( if (user_action.is_client) { $ (this).attr ( return true } var a = $ (this), type = a.data ( extlogin_status = if (!type || !other_login_sites[type]) return; W.open (href, other_login_sites[type].name, "width=523,height=500,top=200,left=200,menubar=0,scrollbars=1,resizable=1,status=1,titlebar=0,toolbar=0,location=1"); return false; }); }); $ ( var _other_tip = $ (this); if (_other_tip.attr ( _other_tip.attr ( _other_tip.delegate ( var a = _other_tip.find ( if (user_action.is_client) { $ (this).attr ( } else { a.click (); } }); }) } var util = { other_login_type: other_login_type, other_nick_name: get_other_nick, other_site_init: other_site_init, from_www: function (){ return from_www; }, from_se: function (){ return from_se; }, extend: function (target, source){ for (var i in source) target[i] = source[i]; return target; }, unique_id: (function (){ var i = 0; return function (){ var id = "ID-U-" + (i++); if (D.getElementById (id)) return arguments.callee (); return id; }; }) (), cookie: function (name, value, ttl, path, domain){ // 获取cookie if (arguments.length == 1) { try { var a = (new RegExp ( } catch (e) { return false; } if (a instanceof Array && a.length > 1) return a[1]; return } // 2个参数时,如果第二个参数是数字,则ttl为此值 if (arguments.length == 2 && typeof value == ttl = value; // 如果ttl为负值,说明需要删除cookie,则value值置为空;否则获取此cookie原始值 value = ttl < 0? } var date = if ( ! isNaN (ttl)) { date = new Date (); date.setTime (date.getTime () + ttl * 1000); date = ";expires=" + date.toGMTString (); } if (typeof CONFIG == if (CONFIG[ if (CONFIG[ } D.cookie = name + "=" + value + (domain? ";domain=" + domain: return true; }, des_create_keys: function (key) { var pc2bytes0 = [0,0x4,0x20000000,0x20000004,0x10000,0x10004,0x20010000,0x20010004,0x200,0x204,0x20000200,0x20000204,0x10200,0x10204,0x20010200,0x20010204], pc2bytes1 = [0,0x1,0x100000,0x100001,0x4000000,0x4000001,0x4100000,0x4100001,0x100,0x101,0x100100,0x100101,0x4000100,0x4000101,0x4100100,0x4100101], pc2bytes2 = [0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808,0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808], pc2bytes3 = [0,0x200000,0x8000000,0x8200000,0x2000,0x202000,0x8002000,0x8202000,0x20000,0x220000,0x8020000,0x8220000,0x22000,0x222000,0x8022000,0x8222000], pc2bytes4 = [0,0x40000,0x10,0x40010,0,0x40000,0x10,0x4001
补充内容 (2015-2-14 13:32):
/**
* 4399WEB 用户操作模块(登录、注册)
* @author YJC @ web.4399.com
* @since 2013-01-08 .. 2013-07-24
*/
var USER = '', user_action, reg_action; // 当前登录的用户名, 登录模块, 注册模块
(f... |
|