猿人学第一题解题思路及详细代码流程

本文介绍了如何解决猿人学的一个挑战,包括分析目标网站、跳过登录、识别加密参数、解析JavaScript代码以及利用Python编写爬虫的过程。建议读者具备面向对象编程基础后再进行学习。
摘要由CSDN通过智能技术生成

1目标网站:http://match.yuanrenxue.com/match/1
2 跳过beg
在这里插入图片描述
3点击换页:发现加密参数
在这里插入图片描述
4点击看卡网页源代码
在这里插入图片描述
5搜索加密参数
在这个script标签中
在这里插入图片描述
6 找到加密的关键代码

request=function()
{
   var timestamp=Date.parse(new Date()) + 100000000;
var m=oo0O0(timestamp.toString())+window.f;
var list={
   "page":window.page,"m":m+'丨'+timestamp/1000}

7再找到相关的window.f

function oo0O0(mw) {
   
window.b = '';
for (var i = 0,
len = window.a.length; i < len; i++) {
   
    console.log(window.a[i]);
    window.b += String[document.e + document.g](window.a[i][document.f + document.h]() - i - window.c)
}
var U = ['W5r5W6VdIHZcT8kU', 'WQ8CWRaxWQirAW=='];
var J = function(o, E) {
   
    o = o - 0x0;
    var N = U[o];
    if (J['bSSGte'] === undefined) {
   
        var Y = function(w) {
   
            var m = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=',
            T = String(w)['replace'](/=+$/, '');
            var A = '';
            for (var C = 0x0,
            b, W, l = 0x0; W = T['charAt'](l++);~W && (b = C % 0x4 ? b * 0x40 + W: W, C++%0x4) ? A += String['fromCharCode'](0xff & b >> ( - 0x2 * C & 0x6)) : 0x0) {
   
                W = m['indexOf'](W)
            }
            return A
        };
        var t = function(w, m) {
   
            var T = [],
            A = 0x0,
            C,
            b = '',
            W = '';
            w = Y(w);
            for (var R = 0x0,
            v = w['length']; R < v; R++) {
   
                W += '%' + ('00' + w['charCodeAt'](R)['toString'](0x10))['slice']( - 0x2)
            }
            w = decodeURIComponent(W);
            var l;
            for (l = 0x0; l < 0x100; l++) {
   
                T[l] = l
            }
            for (l = 0x0; l < 0x100; l++) {
   
                A = (A + T[l] + m['charCodeAt'](l % m['length'])) % 0x100,
                C = T[l],
                T[l] = T[A],
                T[A] = C
            }
            l = 0x0,
            A = 0x0;
            for (var L = 0x0; L < w['length']; L++) {
   
                l = (l + 0x1) % 0x100,
                A = (A + T[l]) % 0x100,
                C = T[l],
                T[l] = T[A],
                T[A] = C,
                b += String['fromCharCode'](w['charCodeAt'](L) ^ T[(T[l] + T[A]) % 0x100])
            }
            return b
        };
        J['luAabU'] = t,
        J['qlVPZg'] = {
   },
        J['bSSGte'] = !![]
    }
    var H = J['qlVPZg'][o];
    return H === undefined ? (J['TUDBIJ'] === undefined && (J['TUDBIJ'] = !![]), N = J['luAabU'](N, E), J['qlVPZg'][o] = N) : N = H,
    N
};

关键点
**eval(atob(window['b'])[J('0x0', ']dQW')](J('0x1', 'GTu!'), '\x27' + mw + '\x27'));**
return ''
}

8在控制台输入atob(window[‘b’])得到

var hexcase = 0;
var b64pad = "";
var chrsz = 16;
function hex_md5(a) {
   
return binl2hex(core_md5(str2binl(a), a.length * chrsz))
}
function b64_md5(a) {
   
return binl2b64(core_md5(str2binl(a), a.length * chrsz))
}
function str_md5(a) {
   
return binl2str(core_md5(str2binl(a), a.length * chrsz))
}
function hex_hmac_md5(a, b) {
   
return binl2hex(core_hmac_md5(a, b))
}
function b64_hmac_md5(a, b) {
   
return binl2b64(core_hmac_md5(a, b))
}
function str_hmac_md5(a, b) {
   
return binl2str(core_hmac_md5(a, b))
}
function md5_vm_test() {
   
return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"
}
function core_md5(p, k) {
   
p[k >> 5] |= 128 << ((k) % 32);
p[(((k + 64) >>> 9) << 4) + 14] = k;
var o = 1732584193;
var n = -271733879;
var m = -1732584194;
var l = 271733878;
for (var g = 0; g < p.length; g += 16) {
   
    var j = o;
    var h = n;
    var f = m;
    var e = l;
    o = md5_ff(o, n, m, l, p[g + 0], 7, -680976936);
    l = md5_ff(l, o, n, m, p[g + 1], 12, -389564586);
    m = md5_ff(m, l, o, n, p[g + 2], 17, 606105819);
    n = md5_ff(n, m, l, o, p[g + 3], 22, -1044525330);
    o = md5_ff(o, n, m, l, p[g + 4], 7, -176418897);
    l = md5_ff(l, o, n, m, p[g + 5], 12, 1200080426);
    m = md5_ff(m, l, o, n, p[g + 6], 17, -1473231341);
    n = md5_ff(n, m, l, o, p
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值