开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 2636|回复: 6
收起左侧

[已解决] 某网站登录密码JS加密求解

 关闭 [复制链接]
结帖率:98% (45/46)
发表于 2015-2-14 13:04:13 | 显示全部楼层 |阅读模式   河南省商丘市
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 = ' ', user_action, reg_action; // 当前登录的用户名, 登录模块, 注册模块
(function (factory){
if (typeof hjs === ' object' && typeof define === 'function') {
define (factory); // Halberd-JS
} else {
factory (function (){}, {}, {});
}
}) (function (require, exports, module){
require ( ' lib/jquery');
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 ( ' demo') > -1? 'http://web.demo.4399.com/': 'http://web.4399.com/';
var from_www = (D.referrer && ( ! /\/ddt\//.test (location.href)) &&
(
D.referrer.indexOf ( ' http://www.4399.com/')===0 ||
D.referrer.indexOf ( ' http://so2.4399.com/')===0 ||
D.referrer.indexOf ( ' http://web.4399.com/4399login/')===0 ||
D.referrer.indexOf ( ' http://huodong.4399.com/')===0
)
);
function get_game_name (){
var  _s = W.location.href.replace ("http://", ' ').toLowerCase();
var  _1 = _s.split ( ' /');
var  _2 = _s.split ( ' .');
if (_2[0] == ' web') {
var  _r = _s.substr (_s.indexOf ( ' ?')).match(/\b(game|game_src)=([^&]+)/);
if (_r) return _r[2];
else if (_1[1].indexOf ( ' .') == -1) return _1[1];
else return ' ';
}
else return _2[0];
}
var from_se = (get_game_name () && !/pay|\/ (hd|other)\//.test (location.href) && D.referrer &&
(
D.referrer.indexOf ( ' http://www.baidu.com/')===0 ||
D.referrer.indexOf ( ' http://www.sogou.com/')===0 ||
D.referrer.indexOf ( ' http://www.google.com/')===0 ||
D.referrer.indexOf ( ' http://so.360.cn/')===0
)
);
function simple_reg (){
return (from_www) && get_game_name () != ' sq'
}
var cid = /\bcid= (\d+)/.exec (location.search);
cid = cid ? parseInt (cid[1]) : ' ';
var other_login_sites = {
qq: {dir: ' qzone',name:'TencentLogin',type:'qq_login',title:'QQ号',short_title:'QQ'},
weibo: {dir: ' weibo',name:'WeiboLogin',type:'weibo_login',title:'新浪微博',short_title:'微博'},
//      taobao: {dir: ' taobao',name:'TaobaoLogin',type:'taobao_login',title:'Tao宝'},
_default: ' qq'
}, _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 !== ' function') {
return;
}
if ( ! _evt[type]) {
_evt[type] = [];
}
_evt[type].push (fn);
}
function get_other_nick (){
var n = ' ', uauth, pnick = util.cookie('Pnick'), qnick = util.cookie('Qnick');
pnick = pnick && pnick != ' 0' ? pnick : '';
qnick = qnick && qnick != ' 0' ? qnick : '';
if (qnick) {
if (pnick && pnick.indexOf (qnick) === 0) {
n = pnick;
} else {
n = qnick;
}
} else {
n = pnick;
}
if ( ! n && (uauth = util.cookie ( ' Uauth')) && uauth.indexOf('ext|') === 0) {
n = uauth.split ( ' |')[1]
}
return n ? decodeURIComponent (n) : ' ';
}
function other_login_type (){
var type = ( (util.cookie ( ' ptusertype') || '').split('.')[1] || '').split('_')[0];
if (type && other_login_sites[type]) {
return type;
}
return ' ';
}
function get_login_refer (){
if (W.location.href.indexOf ( ' http://web.4399.com/user/?_a=login') === 0 && D.referrer) {
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 === ' function'){
callback ();
}
img.onload = img.onerror = null;
img = null;
}
img.src = url;
});
}

function log_web_login (){
var uid = util.get_user_id ();
if (util.cookie ( ' webLoginLogged') == uid) {
return
}
util.cookie ( ' webLoginLogged', uid, void 0, '/', 'web.4399.com');
var url = "http://record.4399.com/e.php?a=web.login" +
"&u="+encodeURIComponent (USER)+
"&wr="+encodeURIComponent (util.cookie ( ' WEB_REFERER'))+
"&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 === ' undefined' && /\.4399\.com$/.test(location.hostname)) {
W.document.domain = "4399.com";
}
W.closePopupLoginDiv = function (){
};
W.UniLogin = {
defaultPostLogin: function (){
var type = other_login_type ();
util.get_user ();
if (extlogin_status == ' bind') {
event_emit ( ' bindExtlogin', type);
img_log ( ' http://record.4399.com/e.php?a=web.user.modify&u=' + encodeURIComponent(USER) + '&t=' +
(type == ' qq' ? 'bindqq' : 'bindweibo') + '&v=' + encodeURIComponent(get_other_nick()))
} else {
var login_ref = get_login_refer ();
login_ref += (login_ref.indexOf ( ' ?') > -1 ? '&' : '?') + 'extlogin=' + type;
img_log ( ' http://web.4399.com/user/?_c=reg&_a=userOpenLog&refer=' + encodeURIComponent(login_ref));
show_logined (USER);
log_web_login ();

}
extlogin_status = ' '
}
};
}
$ ( ' .login_other_site').each(function(){
var o_s_login = $ (this);
if (o_s_login.attr ( ' data-inited')) return;
var o_t = $ (this).attr ( ' data-othertype'); //add
var reg_link = $ (this).find ( ' .reg_link').remove();
var other_auto_login = $ (this).attr ( ' data-noauto') ? false : true;

if (o_t === ' typeconfig'){
o_s_login.attr ( ' data-inited', 1);
o_s_login.find ( ' [data-type]').each(function (){
if ($ (this).attr ( ' data-type') in other_login_sites){
$ (this).attr ( ' href',util.login_other_url($(this).attr('data-type'), other_auto_login));
}
});
} else {
o_s_login.html ( ' ').attr('data-inited', 1);
for (var i in other_login_sites) {
if (i.charAt (0) === ' _') {
continue;
}
if (o_t === ' new'){
o_s_login.append ( ' [url='+util.login_other_url(i, true)+]' + other_login_sites[i].short_title + '登录[/url]');
} else {
o_s_login.append ( ' ');
}
}
}
if (reg_link.length){
o_s_login.append (reg_link);
}
o_s_login.delegate ( ' a', 'click', function(){
if (user_action.is_client) {
$ (this).attr ( ' target', '_self');
return true
}
var a = $ (this), type = a.data ( ' type'), href = a.attr('href');
extlogin_status = ' login';
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;
});
});
$ ( ' .login_other_tip').each(function(){
var _other_tip = $ (this);
if (_other_tip.attr ( ' data-inited')) return;
_other_tip.attr ( ' data-inited', 1);
_other_tip.delegate ( ' .login_other_last', 'click', function(){
var a = _other_tip.find ( ' .login_other_site a.on');
if (user_action.is_client) {
$ (this).attr ( ' href', a.attr('href'))
} 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 ( ' \\b'+name+'=([^;]*);?', 'i')).exec(D.cookie.toString());
} catch (e) {
return false;
}
if (a instanceof Array && a.length > 1) return a[1];
return ' ';
}
// 2个参数时,如果第二个参数是数字,则ttl为此值
if (arguments.length == 2 && typeof value == ' number') {
ttl = value;
// 如果ttl为负值,说明需要删除cookie,则value值置为空;否则获取此cookie原始值
value = ttl < 0? ' ': arguments.callee(name);
}
var  date = ' ';
if ( ! isNaN (ttl)) {
date = new Date ();
date.setTime (date.getTime () + ttl * 1000);
date = ";expires=" + date.toGMTString ();
}
if (typeof CONFIG == ' object') {
if (CONFIG[ ' DOMAIN']) domain = CONFIG['DOMAIN'];
if (CONFIG[ ' PATH']) path = CONFIG['PATH'];
}
D.cookie = name + "=" + value + (domain? ";domain=" + domain: ' ') + (path? ";path=" + path: '') + date;
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...

最佳答案

查看完整内容

技术范围之内。

回答提醒:如果本帖被关闭无法回复,您有更好的答案帮助楼主解决,请发表至 源码区 可获得加分喔。
友情提醒:本版被采纳的主题可在 申请荣誉值 页面申请荣誉值,获得 1点 荣誉值,荣誉值可兑换荣誉会员、终身vip用户组。
快捷通道:申请荣誉值无答案申请取消悬赏投诉有答案未采纳为最佳
结帖率:100% (7/7)

签到天数: 1 天

发表于 2015-2-14 13:04:14 | 显示全部楼层   广东省深圳市
技术范围之内。

七杀.zip

525.26 KB, 下载次数: 19

评分

参与人数 1荣誉 +1 收起 理由
笨潴 + 1 热心帮助他人,荣誉+1,希望继续努力(*^__^*) 嘻嘻!

查看全部评分

回复

使用道具 举报

发表于 2015-2-14 13:17:59 | 显示全部楼层   河北省衡水市
x想太多
回复

使用道具 举报

结帖率:98% (45/46)
 楼主| 发表于 2015-2-14 13:36:31 | 显示全部楼层   河南省商丘市
一楼显示不完  在这层下载

new 1.rar

23.49 KB, 下载次数: 3

一楼显示不完

回复

使用道具 举报

结帖率:19% (3/16)

签到天数: 1 天

发表于 2015-2-14 13:50:00 | 显示全部楼层   河南省安阳市
网站地址发来  我给你找下
回复

使用道具 举报

结帖率:98% (45/46)
 楼主| 发表于 2015-2-14 13:52:42 | 显示全部楼层   河南省商丘市
年轻有梦 发表于 2015-2-14 13:50
网站地址发来  我给你找下

http://qs.4399.com/  帐号:qbw7654321 密码:qbw7654321

谢谢 帮忙写个E程序
回复

使用道具 举报

结帖率:100% (20/20)
发表于 2015-2-14 15:03:38 | 显示全部楼层   山东省青岛市
好长一大段代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 诚聘英才| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 800073686,邮箱:800073686@b.qq.com
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表