JS逆向之某网站爬虫大赛第一题详解
2021-01-15 18:14:42 Author: www.freebuf.com(查看原文) 阅读量:179 收藏

现在越来越多的网站用到了前端的JS混淆或者展示数据混淆加密,以及对传输的信息进行前端加密之后在传输。提高了爬取网站数据难度,以及渗透测试过程中对登录接口爆破难度。

这个系列主要是针对某网站爬虫大赛中题目逆向过程简单记录。共计17道题,从简至难,项目地址如下:

http://match.yuanrenxue.com/list

关于某网站爬虫大赛第一题详细题解分析过程,实战地址:

http://match.yuanrenxue.com/match/1

打开URL看看题目的要求,抓取5页机票的价格,并计算平均值,打开浏览器的调试工具,发现有个debug,选中debug这一行,右键 never pause here,直接就过了。
image

经过对Network面板中的请求分析,发现机票价格数据是一个XHR请求得到的json数据:
image

image

经过多次请求和抓包分析,即使page页面相同,m参数每次都会变,获取数据的唯一变量值就是参数m,但是m 是可以重放的,估计是1分钟的有效期,利用burp抓包,修改page的值,不变参数m,短时间内,一个m值可以把page1-5的所有机票价格都可以获取,前提得修改UA的值为 User-Agent: yuanrenxue.project,这是最简单快捷,不用去分析JS就可以可以获取答案的方法。

image

但是如果我们用这种方法得到答案,可能就失去了此题的本意了,以下是分析JS代码生成m参数值的过程,然后每次请求都可以生成有效的一次性的参数m的值,通过Python重写获取机票价格的脚本,计算出答案。

获取数据的是该XHR请求:

http://match.yuanrenxue.com/api/match/1?m=68afadf4945964b792503ed1efe11953%E4%B8%A81606976298

image
请求m参数的值由两部分构成,中间由中文的|间隔符拼接,右边有点像时间戳,

image

通过两种方式定位到m参数是如何形成的源码处:

方法1.直接全局搜索中文的丨符号,全局搜索只有一处,那应该就是这里了。

image

方法2:直接通过request call stack定位过来:

image

点击进入直接到源码所在处,可以看到生成逻辑就直接在首页的源码中。

image

将关键代码抠出来,放到自己的新建的HTML页面中进行调试:

image

本地一个web服务

python -m http.server

然后将HTML放到web根路径,加载HTML,现在的思路就是缺什么补什么:

缺oo0O0函数就补该函数
image

回到第一题的页面,我们可以通过console来获取这个函数的代码

image

以下是oo0O0函数的定义,加入到本地的HTML代码中

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 ''
        }

本地环境,再次运行,报错的是10行oo0O0函数中的 window.a.length, 那么就需要分析Windows window.a是什么:

image

回到题目中,利用相同的方法在console中输入window.a + ''获取对应的值,然后复制出来加入到本地的HTML代码中。

"isMRQsxrU]xtDhMbZJrrdvxPiiuypx]qz}® g°¤¯©¡tª¥¯º§¯·£¢³²¯¥ ĺ¡Ä½¢±Õ¿Ç¡É¹ײÓÏÔÎÓÖÏ¡¹Üɤ¤ßÃÉßòÝÂÄõÖëëõãÅëìÐÙÿðÕ÷ăøïûóÀòÕăþöÞáĒþăĆČăõùÑăďñÔĆýàĝòñôÞûôèĤċöĈģĎĉģïĜħđìġĖĉĵĊĉčĴħijľŁĢĴĤüĘĕĝņĴĿĩĺķĭĨĉĤĢĩČŀňĩʼnłĹĘŗİĭĬŘĵıİšŏĵŅťŋĥŅţŀţŅŧŜŨʼnIJňőūĹśŰřŹŞĹřŸūļĿųŰŁšƉũńńſţũſƀŤŲƏƕŷŶűőƄƏŗƋžƓƓƝƋŮŵƦƑŶŸƟƊŤŬƭƏƌŰƬƓžƐƫƠűƑƹƎƯƍƴƧƳƾƷƢƝƶƿƦơƄǃƫƩƈǂƹƝƾljƲƌǃǕǀƑǎǐƬƺƔǑljƽƜǒǍƱǗǢǏǗƱǟNjNJǛǚǖƽƨǠǒƫƴǰǗǂǔǯǚǕǻǭǐǞǻȁǣǢǝƽǰǻǃǷǪǿǿȉǷǚǡȇdzDzȂȋǶǐǘșǻǸǜȓȇǽǭȒȁǜǜȗǻȁȗȘǽǹǼȤȀȎǨȥȝȑǰȦȡȅȫȶȣȫȅȭȓȰșȮȪȑǼȴȦǿȈɄȫȖȨɃȮȩɏɁȤȲɏɕȷȶȱȑɄɏȗɋȾɓɓɝɋȮȵɕȻɘɀɟɊȤȬɭɏɌȰɧɛɑɁɦɕȰȰɫɏɕɫɬɑɍɐɸɔɢȼɹɱɥɄɺɵəɿʊɷɿəʒɽɢɥʂɾɥɐʈɺɓɜʘɿɪɼʗʂɽʣʕɸʆʣʩʋʊʅɥʘʣɫʟʒʧʧʱʟʂʉʺʥʊʌʳʞɸʀˁʣʠʄʻʯʥʕʺʩʄʄʿʣʩʿˀʥʡʤˌʨʶʐˍ˅ʹʘˎˉʭ˓˞ˋ˓ʭˠˇʲ˅˖˕˟ʤ˚˙ʽˍ˲˝ʽˢˬˢʱˉˬ˥ˊ˙˽˧˯ˉ˷ˣˢ˳˲˯˥ˠˁ˜˕˝˼ˮ̃ˤ́ˤˮˋ˕˦̗̈̊ˮ˦˨˕˲˪̒˜˶˜˹̗˺̘̝̜́̊˵̢̟̠̃˪̆ˬ̔˯̗̂̈˴̛̖̈˷̸̟̰̪́̒˼̵̷̵̵̛̹̱̥̺̙̙̻̥͈̯̱̭͚͎̝̭͎͎̣͈̤̬̼̄̿͏͊̿͂̍̐̐͋͋͛ͨ̿͊͘ͅͱ͈̾Ͳ̴͈́ͧͲ͕͌͘;͒ͯͲ̿ͬ͐;ͻ͑͘ͷ΂͜Όͬ̈́ͪ͋̓ͩ͠΄ΆΌͭ͢Ζ͐ͬ͵ΖΜͳͬ͗͡ΊΤΟ͞ΆΆ͸ΗΓάͣά΃ΰ΄α·Ύ΢ͬΊΒΪκΐ͵ΝάΨίΉνΙΝͻυΛψΔ΃ΞόΠΈΣϐςΏνχΡϕΦΥΏΙέζΨΗβϠΰΙθήμϤμςπΧϕϟιϭξνϮαφϤϞϴϋϸόϺϐφϦθϔθϡϾϬϳϳξϦϦϘϷϫЌσЋϤψϺϐϼϝϐЏϷϵϔЎЅϩЊϛϿПКϡ϶ϾЄМВϡЉИДЛϵХЅЍϯϯНЧЁеІЅЦϹУЬз϶ООАЯУдϼрМЁЩидлЕрХЭюЏлєЌѐзТецлямѓчџџѝебЛџябѧѧшФіѦтмЧѫчѳѲѰыѨѦѷѐіѦжєњєкєўѿѿѝѥрѻџѨьҁѯѿѿҋѥѡѓҏѿ҇җҔѭѪѥ҆ѿҟҚҠҁѽҢҤѺҗҦҤѾҬҚѩ҃ҊҐѨ҇ҎҢѮ҈ҒҳҴґҙѴүғҜҀҵңҳҳӀҙҕӆӃҳӋӋӉҡҞҙҺҳӓӎӕҵұӖӘүӛӚҖҲҪӀӠҶҮӀҠҺӂӚӠӀҤҧҭӗӍӈҩӑҬӕөӈӅҳӳӣӕӻӷӑӍҿӻӬӐӿӺӘԈӝӴӝӖӜԍӡәӇԐӦӞӬӌӫӲӨӑӮԜӰԛӰӺԛԞӹԁӜԗӻԄӨԝԋԛԛԪԁӽӫԫԛԍԳԯԉԆԁԢԛԻԶӴԝԙԾӻԕԍӻՄԛՈԨԀԞԦԺԈԤԪԺՈԨԌՒԕԿԵ԰ԑԹԔԽՑ԰ԭ՞՛ՋգգաԹԵԟգՔԸէբՀհՍ՜ՅԾՀյՉՂՄչՎՆՄջՔՊՈԸՖմդռ՜ՀԿՉճթդՅխՈձօդաՋ֏տա֖֗խթ՗֗ֈլ֛֖մ֤օ֐չղմգսյգ֬փպֲ֚ֆ֤ֈִ֊ָ֐ָ֌ַֹ֖֕֝ոֳ֗֠քַַֹ֧ׅ֝֙փַׇ֙׏׎֥֢֝־ַחגֵֹ֓ךםֲ׏מלַ֮׀ֲֺ֥֟ׄ׀ֶ׀פֱׄ֨֯כב׌֭וְי׭׌׉ֻ׷קׯ׿׼וב؂׿װה؃׾ל،׻׸סך׺؋צ׮׾׏תענؚׯ׶״؜׳؏ؒן؋׮לؠ؇ײ؅ؖ؋؟،أؗ׹دخ؅؁ׯد؟ؑططؘ״ئضؔ؜׷ػؖ؞ؔؿؙآؔ؅؟ئغ؄آتب؈ئخؾٌجؐ؏ؙكعشؕؽؘفٕشر؛ُٟر٧٦ؽعا٧٘ؼ٫٦لٴـٳّٕٶٸُٻٺٸٓيِٿٗٴ٘ټٜـكىٳ٩٤م٭وٱڅ٤١ُڏٿٱڗړ٭٩ٛڗڈ٬ڛږٴڤٰڤڅځڦکپڛڪڨڂڊڢ٭چپڌڳڋڂڄٲڎګڮٻڧۀٸڼڣڎڡڲڧڻڨڿڳۋۋۉڡڝڇۋڻڝۓۓڴڐۂےڮڶڭۈڱڪۊۛڶھےۣڻڲۈڢھڶیڨۂ۟ۢگۛھڬ۰ۗۂەۦۛۯۜ۳ۧۉۿ۾ەۑڿۿۯۡ܇܇ۨۄ۶܆۪ۢۥۼۥ۞۠ܕ۩ۡۏېۮۦ۰۔۲ۺ۬ܟ۶۽ܖۣ܏܂۠ܤ܋۶܉ܚ܏ܣܐܧܛ܍ܳܯ܉܅۷ܳܣܫܻܻܜ۸ܪܺܖܞܝܰܙܒܔ܃ܝܕ܃݌ܣܪܘݑܦܞܜݕܪ݈݊ݗܬܶݗݙܵܽܘݓܷ݀ܤݙ݇ݗݗݥܹܽܣݧݗܹݯݮ݂݅ܽݞݗݷݲݸݏݘܳݷݒݰݐݻݖݞݔކݛݸݤފݟݦݠލݤݩނݏݻޔ݌ސݷݢݵކݻݔކޓއޟޟޝݵݱݛޟޏݱާާވݤޖަނތݧޫއލ޲ްފޒޘݱޏ޼ޮݶޓޚތ޿ޔޞ޿޿ޝޥހ޻ޟިތ߂ޯߏ޿ߋޥޡޓߏ޿߇ߗߔޭުޥ߆޿ߟߚޚ߁޽ߢޡ޹ޱޟߨ޾޶ߌީ߃ߊ޸߰߇ߤ߈ߵ߈ߒ߳ߴߑߙ޴߯ߓߜ߀߶ߣࠃ߳ࠀߙߕࠆࠃ߳ࠋࠋࠉߡߞߙߺ߳ࠓࠎࠔߪߴߏࠓ߮߶ߴࠗ߳ࠐ߸ࠢ߷ࠤ߰ߟ߻ࠨߴࠪ߼ࠆࠧࠩࠅࠍߨࠣࠇࠐߴࠪࠗ࠷ࠧ࠵ࠍࠉ߳࠷ࠧࠉ࠿࠾ࠕࠒࠍ࠮ࠧࡇࡂࡇࠩࠥࡊࡍࠢ࠙ࡎࡌࠦࡔ࠾ࡖࠬࠢࡊࠓ࠮࡜ࠤ࡝࠰࠺࡛࡞࠹ࡁࠜࡗ࠻ࡄࠨ࡞ࡋ࡫࡛ࡪࡁ࠽ࠫ࡫࡛ࡍࡳ࡯ࡉࡆࡁࡢ࡛ࡻࡶ࠵࡝࡙ࡾ࠹ࡕࡍ࠻࠿࡚ࡒࡔࡁ࡟ࡦࡺࡆࡤࡪ࡜࢈ࡨࡌ࢒ࡕࡿࡵࡰࡑࡹࡔࢇ࢒ࡰ࡭࢛࢞ࢋࢣࢣࢡࡹࡵ࡟ࢣ࢔ࡸࢧࢢࢀࢰࡼࢯ࢑ࢍࢲࡱࢉࢂࢌࡴࢎࢆ࢈ࡶ࢒ࢊࢮࣂ࢔࢞ࢿࣀ࢝ࢥࢀࢻ࢟ࢨࢌࣂࢯ࣏ࢿ࣌ࢥࢡ࣒࣏ࢿࣗࣗࣕࢭࢪࢥࣆࢿࣟࣚ࣠ࢷࣀ࢛ࣟࢺࣂࣀࣣࢽࣆ࣌ࢦࣂࢺࣈࢫࣈࢾࣈࣶ࣑࣋࣪ࢷࣣ࣬ࢴ࣮ࣣࣸࣟ࣊ࣝࢼ࣮࣯ࣻࣷइऄࣝࣙऊइࣷएएएࣰ࣌ࣾऎ࣏࣫ࣤओ࣮ऌࣤगࣱࣺࣸटࣷࣾऀदࣻनख࣠ऀࣵञ࣫गरࣨबओࣾऑढगࣰढयणऻऻहऑऍࣷऻफऍृृतऀलूठनःेणऩॎउधॄूऌफढसऐमड़ॊ॔ऴघफ़डोु़झॅठ॓फ़़ह४१ॗ९९७ॅुफ९ॠॄॳ८ौॼैऴढ़ख़ॾऽॕ्ऻ঄ग़॒॔ॅॠॖ॔঎ॣঀংএ।८এঐ७ॵॐঋ९ॸड़঒ॿটএজॵॱঢটএধধথॽॺॵখএযপল঑঍ল঴ঋঁশ঴঎খপॷ঒ীঠূঘঞতৄঘঢৃ৅ড঩঄িণবঐ৆঳৓ৃ৑঩থএ৓ৃথ৛৚঱ম঩৊ৃৣ৞ঠ৅ু০৩া঵৪৬ূ৊৐৲েৎৈ৴ো৒ী৸ৌ৖৷৺৕ঢ়স৳ৗৠৄ৺১ਇ৷ਆঢ়৙েਇ৷৩ਏ਋৥ৢঢ়৾৷ਗ਒ਘ৮৓৓ਗ৳৹ਞਜ৶৾ৼড়৻৲ਈ৤৾ਆ਄০ਃਯਢ৯ਛ৾৬ਰਗਂਕਦਛ৴ਦਲ਼ਧਉਿਾਕ਑৿ਿਯਡੇੇਨ਄ਸ਼੆ਢੂਇੋਨਭ੒੐ਫਲਤਐਮਦਰਗ਴ਪਸ੘ਸਜਛਥ੏੅ੀਡ੉ਤ੗੢ੀ਽ਧ੫ਜ਼਽ੳੲ੉੅ਲ਼ੳ੤ੈ੷ੲ੐઀੫੬੕੎੐਼ਖ਼੒੔੃ਫ਼ઌ੨઎੢઀੾ੈ੧ઔ੨ઌ੬੐੓ਖ਼ઃ੹ੴ੕੽੘ઋખੴੱ੟ટએઁધણ੽੹੫ધઘ੼ફદ઄઴઀વકઑશહ઎અ઺સ઒ચલુખઞઔૃછૈલ૊ટકાઋષૐઈૌળઞ઱ૂાથ૆૏ૃ૛૛૙઱ભગ૛ોભૣૣૄઠ૒ૢિૈણ૧ૃહ૮૬૆૴૞રો૒૔઴ૌ૖૷૷૕૝સ૳૗ૠૄૻ૮૑૷ଃ૝૙ોଇ૷૿ଏଌ૥ૢ૝૾૷ଗ଒૔ૹ૵ଚଜ૲ૹଞଜ૶ଔ૬ଥૺଘ଄ૣ૿૶଄૦ଂଯଢ૯ଛ଎૬ରଗଂକଦଢଉପଳଧଙି଻କ଑ଃିଯଷେେନ଄ଶ୆ଢପଝ଼ଥଞଠ଎଩ଢତଔମଡ଼୎୛ଲୠନଙଷ୔଴ଡ଼଼ଠଣ଩୓୉ୄଥ୍ନୟ୧ୄୁଯ୯ୟ୑୷୳୍୉଻୷୨ୌ୻୶୔஄୐଼୥ୡஆஉ୞஋ஊஈୢஐ୬ஒ୦୞ஆ୍୫୲୸ஐ୰୔୛ଢ଼இ୽୸୙஁ଡ଼ஓ஛୸୵୧ணஓ஛஫ந஁୽ம஫ஜ஀யபஈஸஅத஍ஆஔஷ஑ச஌୹஖௄஌஁ஜ஢஘ேட஼ஔ௄தஈ௎஑஻ற஬஍வஐே௏஬ன௚ௗே௟௟௝வற஛௟ௐழ௣௞஼௬௅௘ு஺஼௰௅ாீ௵ோ௸ைழௐ௖ௐ௾௓௚௔௸௘஼஻௅௯௥௠ு௩௄௻ః௠௝ேఋ௻௝ఓఒ௩௥௓ఓఄ௨గఒ௰ఠఋఌ௵௮௰௞௹௱௟న௿ఆఈ௤ఄఊచ௪ఆఴఄబఌ௰௳௹ణఙఔ௵ఝ௸యషఔ఑௿ియడేృఝఙఋేసజోెత౔ఠ౓వఱౖౙమ౛ౚౘల఺నఝషమ౎౦఺లైఠావ౞ఫ౗౰న౬౓ా౑ౢ౞౅౦౯ౣ౻౻౹౑్ష౻౫్ಃಃ౤ీ౲ಂ౞౦ౡ౸ౡౚ౨ಋ౧಄ಂಔ౪ಈಂౕ౮౶ಆ౔౰౺ಛಛ౹ಁ౜ಗ౻಄౨ಟಒ౵ಛಧಁ౽౯ಫಛಣಳರಉಆಁಢಛ಻ಶ಻ಝಙಾೀಖಝೂೀಚೈತ಄ಟದಠಇಢೀಠ೑ತಮ೏೐ಭವಐೋಯಸಜ೓ೆ಩೏೜ವಱೢ೟೏೧೧೥ಽ಺ವೖ೏೯೪ೲ೑್ೲ೴ೋ೧೶೴೏೼ೌ೽೔ೊ೮ഀ೘ೞ೮ು೘ೢഃഅೡ೩ೄ೿ೣ೬೐ഇ೺ೝഃ഑೩೥೏ഓഃ೥ഛചೱ೮೩ഊഃണഞೞഅഁദഩ೾ഫപ೧ഃഠ೸റഈഎഀ೰ഌ഑പ೷ണ഼೴സടഊഝമപ഑ല഻യേേ൅ഝങഃേഷങ൏൏രഌാൎബഴഏ൓യഥ൚൘ള൐സൟശ൤ൄജ഻ലൖണ഼െ൧൧൅്നൣേ൐ഴ൫൞ു൧൳്൉഻൷൧൯ൿർൕ൒്൮൧ඇංඈ൞ൾൃඇൢ൪൜උ൥൮൬ඕ൪൲ආ඘൯൶ඊඞ൳൹ඒൟඋൾ൜චඇ൲අඖඒ൹කඣ඗ඉදණඅඁ൳දඟටභභ඘൴ඦබඒකඝඬඕඎඐൾ඙ඒඤ්ඞඖබ඄ජවඬෑඦඝෆඓ඿෈ඐුරඦඹ්ෆත෎෗෋ී෣෠ඹඵ෦෣ී෫෫෫෌ඨේ෪ෆ෦ණ෯්෨෌ෳ෍ූ෮ඹීේුขෘ෎෤ලේ෡෺෇ෳฌහจ෯ේ෭෾෺෱ฆซ෿ททต෭෩ීทง෩ฟฟ฀ොฎพ෺෴ෟร෿ปสศขชย෬งฤจำฌขฐ෰ฌถืืตฝ෸ำทภค฼ฮมืใฝนซ็ื฿๏์ลยฝ฾ื๗๒ณูี๚๜าษ๞๠ึ฾ิพฺโิย฾ๆไ๬ใ้๢ฯ๛๎ฬ๰๗โ๕๦๢๙๮๳๧๙๿๻๕๑ใ๿๯๷ງງ๨ไ๶ຆ๢๪๩๼๥๞๠ํ๩๡๏ຘ๯๦๨๖๲ຠ๼๘๸๾๬๝๸ຂຣລກຉ๤ຟ຃ຌ๰ຨບຍຣັຉ຅๯ຳຣ຅ົ຺ຑຎຉສຣໃ຾๽ລມໆ້ພລ໊່ຣສ຺ຈ຦໔ຬ໓ຫາິ໐ະດປຝ໇ຽຸນແຜ໗ໜຸີວ໣໓໛໫໨ແຽ໮໫ໜເ໯໪່໸ໄ໹໙໕໺ຶ໑໊໌ົ໖໎໌ຼໜ໒໤ແໟ༌໘༄໤່༎໑໻໱໬ໍ໵໐་༐໬໩༚༗༇༟༟༝໵໱໛༟༐໴༣༞໼༬༁༘༁໺໼༯༅໽໫༴༌༂༪໰༏༆༔໶༓༰༈໺༔༞༿ཀ༝༥ༀ༻༟༨༌ང༶༩༿ཌ༥༡དྷཏ༿བྷབྷཕ༭༪༥ཆ༿ཟཚའ༶༰༛ཟ༺གངལ༽ཆ༸ཫགྷཊ༼༩ཆཤ཈ཬཌ༰༳༹ལཙཔ༵ཝ༸ཱིླྀཔད༿ཿ཯ཡ྇ྃཝཙཋ྇ླྀཛྷྋ྆ཤྔཡྀཀྵརཨ྘཭ཥནྜྷིཪོམླྀཾུྥཻྨྚཥོ྆ྦྷྪ྅ྍཨྣ྇ྐུྫྷྞྑྦྷྶྍྉཷྷྦྷྙ྿ྻྕྒྍྮྦྷ࿇࿂྄ྩྥ࿊྆ྡྚྜྌྦྷ࿔ྨ࿖ྪྲྫྷ࿚ྯྶ࿎࿔ྴ྘࿞ྡ࿋࿁ྼྜྷ࿅ྠ࿛࿠ྼྐྵ࿪࿧࿗࿯࿯࿭࿅࿁ྫ࿯࿠࿄࿳࿮࿌࿼࿈ྵ࿝࿙࿾က࿖࿍ဂက࿚ဈ࿐࿂࿞࿦࿘࿇࿣࿚࿨ဈ࿨࿌࿋࿕࿿࿵࿰࿑࿹࿔ဏန࿰࿭࿗ရဋ࿭ဣဢ࿹࿵࿣ဣန࿸ဧဢကူထလစ࿾က࿭ဉခ࿯းဏဖလျဒယဲ࿼ဖ၄ဲ၃ဘဢ၃၅အဩငဿဣာတ၈်ိ၃ၑဩဥဏၓ၃ဥၛၚေီဩ၊၃ၣၞၤ်ဟဟၣှၜးၧ၂၊၄ၯ၈၎၀ိ၊ၒၘူၐၕၮျၧႀးၼၣ၎ၡၲၮၥၺၿၳႋႋႉၡၝ၇ႋၻၝ႓႓ၴၐႂ႒ၯၨၓ႗ၳႏ႞ႜၶၾၼၝၻႂၸႪၾၶ႖ႫႀႊႫႫႉ႑ၬႧႋ႔ၸႰႢ႕ႫႷ႑ႍၿႻႫႳჃჀ႙႖႑ႲႫ჋჆჌ႢႬႇ჋ႦႮႜ჏ႩႲႤიႮ჌ႤოႲႺႨტႷფზნႼႠ႟Ⴉდ჉ჄႥჍႨუშჄჁႫჯჟჁჷჶჍ჉Ⴗჷშ჌჻ჶეᄄვჰკგეჁოზჶᄌფლჺ჌ყᄔფჍწჱᄊთᄃᄌეᄘჿცჽᄎᄊᄁᄖᄛᄏᄗᄧᄤჽჹᄪᄧᄗᄯᄯᄯᄐწᄞᄮᄌᄔჯᄳᄎᄬᄈᄷᄑᄚᄔჸᄖᅄᄜᄀᄛᄢᄤᄁᄞᄥᄾᄋᄷᅐᄈᅒᄲᄱᄵᅈᄵᄐᄥᅋᄻᄥᅋᅚᄱᄭᅖᅘᄸᄜᄟᄥᅐᄠᄵᅝᅋᅈᄬᅜᅏᄽᅈᅧᅛᅣᅳᅫᅈᅒᅳᅴᅑᅚᅑᅬᅟᅳᅝᅮᅢᅡᅝᅷᅘᅕᄿᆃᅫᅻᅾᅋᅷᅚᅈᆒᅲᅱᅵᆈᅵᅐᅥᆋᅻᅥᆋᆗᅱᅭᅼᆘᆏᆂᅵᆘᆑᅶᆅᆩᆓᆛᅵᅶᆘᆤᆁᆠᆞᆍᆣᆲᆉᆅᅳᆳᆣᆕᆻᆷᆐᆞᅸᆵᆭᆡᆀᆶᆱᆕᆻᇆᆳᆻᆕᇈᆯᆚᆭᆾᆲᆌᆌᇑᆨᆥᇆᇓᆻᆵᇛᇏᆱᆭᆴᇛᇃᇣᇣᇙᆸᇆᇣᇩᇋᇊᇅᆥᇘᇣᆫᇟᇜᆬᇁᇩᇗᇔᆸᇨᇛᇉᇔᇳᇞᇳᇳᆸᇡᆽᇕሂᇯᇑᇷሊᇪᇩᇭሀᇭᇈᇝሃᇳᇝሃሖᇶᇵᇹሌᇹᇔᇩሏᇿᇩሏሔᇵᇱሒሜᇹᇶᇽመላሟሉሚሎልሉሣሄሁለሯሗሧሪሰልሉሦሴሑልመሸሯሡሥᇽሯሻምሀሲሩሌ቉ሞምለቃሧሰሔ቉ሷቇቇ቎ርሩሼ቗ቆ቟቟቙ስሱቀ቟቎ቁቧ቟ሼቊቧቭ቏቎቉ሩቜቧሯባ቟ቕቐሱ቙ሴቑቸቧቯቮቷባታብቾቘቦኆቿቜቚቈኁበቩቱ኉ቤቭናኊቩብቸናቻትኛኔቱቭ኎ኘ኏ኁኅቝ኏ኛችበኒ኉ቬኩቾችቨኣኇነቴኪኗ኷ኧኮኍ኉ኜ኷ኦ኿኿ኹንኑአ኿ኮኡ዇኿ኜኪ዇ውኯኮኩ኉ኼ዇኏ዃ኿ኵኰኑኹኔ኱ዘ዇ዏዎ዗ዃዓዅዝኸ዆ዦዟዒያዌዣዛዣዦየዄውዳዪዉዅዘዳዛዕዻዴዑውዮዸዯዡዥኽዯዻዝዀዲዩዌጉዞዝወጃዧደዔጋዾዡጇጎይዩዼ጗ጆጟጟጙድዱጀጟጎጁጧጟዼጊጧጭጏጎጉዩጜጧዯጣጟጕጐዱጙዴ጑ጸጧጯጯጵጡጷጿጱጮጷፇጾጝጙጬፇጯጩፏፈጥጡፂፌፃጵጹ጑ፃፏጱጔፆጽጠ፝ጲጱጜፗጻፄጨ፠ፒፅ፛።ፁጽፐ፫ፚ፳፳፭ፉፅፔ፳።ፕ፻፳ፐ፞፻ᎁ፣።፝ጽ፰፻ፃ፷፳፩፤ፅ፭ፈ፥ᎌ፻ᎃᎃᎎ፵ᎇᎇᎍᎇ፥ᎋፏᎆᎏ᎒᎘፵፱ᎎ᎟ᎇ᎗Ꭷ᎜፽፹᎞Ꭷ᎖፹Ꭳ፱᎓Ꭸ᎑Ꮁ᎖፱᎑ᎰᎣ፴፷Ꭻ᎞፸ᎀᏁᎣᎠᎄᎻᎯᎥ᎕ᎺᎩᎄᎄᎿᎣᎩᎿᏂᎥᎡᎴᏌᏂ᎑ᎹᏈᏄᏋᎥᏐᎵᎾᎵ᎘ᏌᏔᎵᏕᏎᏅᎤᏣᎼᎹᏀᏤᏄᎨᏣᏥᏄᏁᏐᏱᏟᏅᏕᏵᏛᎵᏕᏳᏕᏰᏌᎺᏔᏢ᏿ᏸᏝᏥᏝᐆᏴ᏿Ꮹᏺ᏷ᏭᏨᏉᏤᏡᏰᐏ᏶ᐗᏔᐓᏻᏹᏘᐒᐉᏭᐎᐙᐂᏜᐓᐥᐐᏡᐞᐠᐗᐊᐍᐜᐘᐟᏹᐠᐉᐏᐁᐵᐠᐫᐅᏵᐌᐆᐈ᏶ᐐᐙᐿᐳᐙᐟᐑᑅᐰᐻᐕᐅᐜᐖᐘᐆᐠᐪᑋᑅᐻᐍᐤᑋᑁᑋᐥᑙᐪᐩᐬᐝᐲᐪᑛᑑᐹᐮᐰᐞᐼᐠᐸᑢᐼᑫᑟᐫᑎᑌᑫᑡᑑᑎᐬᑨᑔᐰᑉᑤᑙᑬᑮᑻᑔᑚᑜᒁᑖᑴᑜᑀᑛᑸᒃᑻᑨᑄᑝᑸᑥᑭᑭᑺᑲᒆᑌᒁᑪᑲᑴᑐᑰᑶᑸᑕᑳᒐᒎᒡᑸᑲᑜᑞᒆᒆᑸᒗᒋᒬᑤᒞᒗᑩᒁᒤᒑᑬᑬᒧᒋᒑᒧᒨᒍᒯᒑᒺᒧᒳᒕᒰᒭᒍᒳᓆᒱᒖᒘᓉᒪᒿᒿᓉᒷᒙᒿᓅᒤᒭᓆᓏᒫᒲᒤᓙᒬᒔᒼᓙᓇᒭᒽᓝᓃᒝᒽᓛᒸᓛᒽᓟᓔᓠᓁᒪᓀᓊᓫᓱᓓᓒᓍᒭᓠᓫᒳᓧᓚᒴᒼᓽᓟᓜᓀᓼᓣᓎᓠᓻᓧᓑᓄᓺᓳᓄᓈᓾᓮᓮᓨᔇᓳᔓᔆᔏᓫᓲᓤᔙᓬᔜᓨᔝᓴᓩᔓᓡᔃᔘᔁᔡᔆᓡᔁᔠᔓᓤᓧᔛᔘᓨᓽᔥᔓᔐᓴᔤᔗᔅᔐᔯᔚᔕᔻᔯᔐᔞᔻᓺᔢᔢᔔᔳᔦᕈᓿᔿᔪᔥᔬᔆᔣᔪᔬᕒᔧᔭᕆᕎᔨᔥᔰᕍᔯᕌᔸᔕᔲᕠᔼᕘᔸᔝᕅᕔᕐᕗᔱᕙᕁᕅᕛᕜᕅᕠᔫᕰᕇᕣᕦᕮᕈᕅᕐᔫᕑᕬᕈᔶᕐᕙᕺᕷᕢᖄᔿᔷᕚᕢᕨᖀᕠᕅᕝᖀᕹᕞᕭᖑᕻᖃᖃᖅᕭᕢᖖᖘᕯᖋᖏᕜᕰᕭᕴᖕᕷᖔᖀᕝᕺᖨᖄᖠᖗᖉᖍᕥᖗᖣᖅᕨᖚᖑᕴᖱᖆᖅᖉᖰᖥᖈᕼᖽᖧᕸᖾᖷᖢᖝᗃᖵᖘᖦᗃᗉᖫᖪᖥᖅᖸᗃᖋᗇᖲᖮᗒᖔᖶᗇᗋᖘᖬᖩᖨᖏᖵᗐᖛᗗᖶᗤᖴᗠᗆᗗᗚᗠᗗᗉᗍᖥᗗᗣᗅᖨᗚᗑᖴᗱᗆᗆᗍᖰᗤᗬᗍᗭᗦᗝᖼᗻᗔᗑᗜᗼᗲᗁᗩᗸᗴᗻᗕᗾᗥᗫᗝᘑᗼᘇᗡᗑᗨᗡᘊᗗᘅᘏᗩᘝᗮᗭᗬᗡᗴᗮᗰᗤᗽᗵᗽᘟᘔᘠᘁᗪᘀᘉᗧᘰᘈᗬᘕᘲᘠᘧᘧᗲᘚᘚᘌᘫᘞᘰᗷᘿᘘᗼᘔᘄᘧᘑᘄᙃᘫᘩᘈᙂᘹᘝᘾᙉᘲᘌᙃᙕᙀᘑᙎᘗᘺᙋᙖᘝᘾᘘᙏᙡᙌᘝᙚᙜᙒᘠᘽᙒᙊᙜᘧᘟᙃᙌᘨᘰᙉᙍᙣᙧᙉᙫᙍᙯᙚᙚᙍᙈᙧᘸᙙᙴᙚᙢᙜᙻᙦᙷᙈᙺᙲᙚᙝᚎᙺᙿᚂᚅᙲ᙭ᚆᙔ᙭ᙡᚇᚉᙫᙶᙰ᚝ᙰᙾᙘᚡᚃᚂᙽᙝᚐ᚛ᙣᚗᚊᙥᙤᚡᚙᚍᙬᚢ᚝ᚁᚧᚲ᚟ᚧᚁᚩᚢᚙᙸᚷᚒᚴᚕᙸᚬᚳᚳᚶᚘᚦᛃᚂᚪᚪ᚜ᚻᚯᚚᚇᛁᚢᛄᛏᚎᚶᚶᚨᛇᚺᚶᚓᛓᚲᚺᛞᚠᛂ᚜ᛓᛥᛐᚡᛞᛠᚽᛆᚸᚫᛏᛣᚰᛱᛄᛂᛕᛤᛠᛧᛁᛩᛑᛖᛄᚻᛞᛰ᛿ᛲᛕᛷᜃᛸᛯ᛻ᛳᛀᛲᛕᜂᜎᛢᜀᜋᜁᛤ᜔ᛌᜆ᛾ᛦᛩ᜚ᜆᜋᜏᛛ᛿ᛩ᜚ᛡ᛾ᛝ᛽ᜥᜎᜅᛤ᜞᛽ᜟᜍᜭ᜗ᛨᛨ᛼᜚ᜁᜁ᜵ᜎᛰᛸᜫ᜛᜕ᜪᜳ᜞ᛷ᜻ᜱ᜙᜴᛿᛽ᜥᜢᜃ᛻ᜡ᜻᜻᜽ᜟᜪᜤᝑᜤᜭᝆᝉ᜶ᜱᝋ᜙ᝄᝏ᜹᜔ᝉ᜾ᜱ᝝ᜲᜱ᜽ᜥᝇ᝜ᝅᝥᝊᜥᝅᝤ᝗ᜨᜫ᝟ᝒᝧᝧ᝱᝟ᝂᝉᝯ᝛᝚ᝪᝳ᝞᝿ᝳ᜿᝭᝷ᝑច᝖᝕᝘ᝉᝲ᝙ᝩᝈᝮᝈ᝝ធᝳᝮᝓចᝪᝢᝤយᝮវ᝴᝕ᝳថដ᝜᝸᝿᝱ᝯ᝾᝞ខ᝶ឃល᝼ᝪ᝾ហ᝸ឰឆឤឈᝬឋធមᝳថឆឯឬឞឳផឳឣឡឤ឵វខឩី឴ុផឿឥឩហេឨឌ឵្ៀះះធឺឺឬ់ើឺភ៟ីវឰឤំ៧ឤ៣់៉ឨ២៙ួ៞៩ះើ៯៤ៈ៷៲៰៦឴។៶៕៝័៽២ូ៳៴៰៹៕ៀៜ៕៻៾៬ៈៜៃ៩᠄៥᠀៭᠈៓᠏៬៩៨᠐៳៩᠒᠙៸៭᠞ៜ៸᠁᠚᠝៾᠆᠈ᠤ᠀៨᠀ᠭ᠒៬ᠣᠤᠠᠩ᠅៰᠌᠅ᠫᠮ᠜៸᠌៳᠙ᠴ᠕ᠰ᠝ᠸ᠃ᠿ᠜᠙᠘ᡀᠣ᠙ᡂᡉᠨ᠝ᡆᡌᠧᡈᠤ᠑ᠬᠺ᠔ᡝᠿᠾᠹ᠙ᡌᡗ᠟ᡓᡇᠶᠠᡝᡕᡉᠨᡞᡙᠽᡣᡮᡛᡣᠽᡥᡞᡕᠴᡳᡎᡯᡌᠶᡓᡉᡯᡳᡔᡢ᡿ᠾᡦᡦᡘᡷᡪᢌᡃ᡽ᡦᡫᡡᡜᡫᡟᡱᡣᡯᡎᢇᡪᡴᢍᢗᡱ᡹᡻ᡜᡸ᡾ᡰᡱ᡿ᢂᡟᢁᢆᢇᢞᢗᢍᢌᢌᢧᢠᢒᢧᢉᢧᢗᢕᢙ᢮ᢢᢉ᢯ᢵᢦᡸᢿᢼ᢫ᢷᢄᣃᢰᢦᢙᣊᢵᢚᢩᢆᢹᢉᢿᢍᢾᣄᢜᣔᢪᣈ᢬ᢐ᢯ᢶᢼᢗᢴᢪᣒᣚᢵᣣᢴᢣᣑᣛᢵᣩᢺᢹᣌ᢭ᢾᣟᣀ᢯ᣓᣧᢴᣵᣈᣆᣙᣨᣤᣫᣅᣭᣕᣚᣈᢿᣢᣴᤃ᣷ᣙ᣻ᤇ᣼ᣳ᣿᣷ᣄ᣶ᣙᤆᣈᣨᣌᣤᤎᣭᣲᣬᤐᤆᣕ᣽ᤌᤈᤏᣩᤔ᣹᣽ᤒᤛ᣸ᣵᤁᤒᤊᤜᣧᣟᤂᤢᣧᣣᤉᤤᤢ᤭ᤈᤅᤈ᤬ᤏᤅ᤮ᤴᤏᤰᤐ᣹ᤗᤝᤶᤄᤝᤒᤔᤂᤜᤪ᥊᥃ᤠᤙ᤿᥃ᤰᤌᤤ᥎ᤪᤲᤓᤋ᤮᥎ᤓᤏᤵᥐ᥎ᥙᤴ᤭ᥓᥕᤸᥨᤴᥠ᤻᥆᥄ᥤ᥀᥉ᥐᥱ᥇᥎ᥐᥬ᥍᥂᥶ᤴ᥌ᥚ᥺ᥳᥐ᥍ᥙᥪᥢᥳ᥾ᦅᥝ᥸᥃ᦉᥩᥦ᥇᤿ᥤᥙᦆᦇᥤᥡᥤᦎᥪᦇᦊᦌ᥯ᥥᦎᦔ᥯ᦐᥰᥙ᥷᥽ᦖᥣᦇᦛᥨᦩ᥼᥺ᦍᦜᦘᦟ᥹ᦠᦉᦎ᥼ᥳᦖᦒᦶᥰᦐᥴᦈᦶᦐᦿᦳ᥿ᦪᦡᦤᦻᦦᦷᦾᦄᦜᦄᦘᧅᦣᧀᦌᧃᦥᧇ᧓ᧈᦿ᧋ᧃᦐᧂᦥ᧒᧞ᦲ᧏᧓ᦟᧃ᧓᧞ᦥᧆ᧘ᧈᦠ᧔ᦹᦹ᧟᧛᧍᧍᧫᧜᦬᧑ᦳ᧗᧧᧲ᦹ᧚᧻ᦸ᧮᧦᧍᧍ᨁ᧚᧢᧜᧻᧘᧕᧤ᦻ᧡᧼᧬ᨅ᧠᧚᧤ᨌ᧲᧭ᨆᨌ᧧ᨈ᧸ᨚ᧬᧺᧔᧝ᨋ᧾᧱ᨔᨍ᧲ᨁᨥᨏᨗ᧱᨝ᨗᨆᨧ᧧ᨖᨍ᧬ᨣᨛ᧭᨞ᨱᨗᨧᨀ᧹ᨊᨉᨫᨰᨪᨌᨀᨼᨣᨎᨠᨻᨯᨦᨳᩈᨴᨪᨕᩋᨺᨿᩂᨕ"

本地环境,再次运行,报错的是14行oo0O0函数中的 window.a[i][(document.f + document.h)]

image

回到题目中,看看(document.f + document.h)是什么顺便将oo0O0函数的定义中的document.g和document.e)一起撸了 :

image

document.e='fromC';document.f='charCo';document.g='harCode';document.h='deAt';

在本地加入这些代码之后运行调试,报错是56行的eval(atob(window['b'])[J('0x0', ']dQW')](J('0x1', 'GTu!'), '\x27' + mw + '\x27'));

image

先看看atob(window['b'])是什么,JavaScript中atob() 方法用于解码使用 base-64 编码的字符串,那window['b']应该是base64编码的字符串,在题目源站的console直接输入atob(window['b'])获取数据,或者输入window['b']获取原始的base64值,其他地方进行base64解码也行。

"dmFyIGhleGNhc2U9MDt2YXIgYjY0cGFkPSIiO3ZhciBjaHJzej0xNjtmdW5jdGlvbiBoZXhfbWQ1KGEpe3JldHVybiBiaW5sMmhleChjb3JlX21kNShzdHIyYmlubChhKSxhLmxlbmd0aCpjaHJzeikpfWZ1bmN0aW9uIGI2NF9tZDUoYSl7cmV0dXJuIGJpbmwyYjY0KGNvcmVfbWQ1KHN0cjJiaW5sKGEpLGEubGVuZ3RoKmNocnN6KSl9ZnVuY3Rpb24gc3RyX21kNShhKXtyZXR1cm4gYmlubDJzdHIoY29yZV9tZDUoc3RyMmJpbmwoYSksYS5sZW5ndGgqY2hyc3opKX1mdW5jdGlvbiBoZXhfaG1hY19tZDUoYSxiKXtyZXR1cm4gYmlubDJoZXgoY29yZV9obWFjX21kNShhLGIpKX1mdW5jdGlvbiBiNjRfaG1hY19tZDUoYSxiKXtyZXR1cm4gYmlubDJiNjQoY29yZV9obWFjX21kNShhLGIpKX1mdW5jdGlvbiBzdHJfaG1hY19tZDUoYSxiKXtyZXR1cm4gYmlubDJzdHIoY29yZV9obWFjX21kNShhLGIpKX1mdW5jdGlvbiBtZDVfdm1fdGVzdCgpe3JldHVybiBoZXhfbWQ1KCJhYmMiKT09IjkwMDE1MDk4M2NkMjRmYjBkNjk2M2Y3ZDI4ZTE3ZjcyIn1mdW5jdGlvbiBjb3JlX21kNShwLGspe3Bbaz4+NV18PTEyODw8KChrKSUzMik7cFsoKChrKzY0KT4+PjkpPDw0KSsxNF09azt2YXIgbz0xNzMyNTg0MTkzO3ZhciBuPS0yNzE3MzM4Nzk7dmFyIG09LTE3MzI1ODQxOTQ7dmFyIGw9MjcxNzMzODc4O2Zvcih2YXIgZz0wO2c8cC5sZW5ndGg7Zys9MTYpe3ZhciBqPW87dmFyIGg9bjt2YXIgZj1tO3Z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BlPSgoKGRbYj4+Ml0+PjgqKGIlNCkpJjI1NSk8PDE2KXwoKChkW2IrMT4+Ml0+PjgqKChiKzEpJTQpKSYyNTUpPDw4KXwoKGRbYisyPj4yXT4+OCooKGIrMiklNCkpJjI1NSk7Zm9yKHZhciBhPTA7YTw0O2ErKyl7aWYoYio4K2EqNj5kLmxlbmd0aCozMil7Zis9YjY0cGFkfWVsc2V7Zis9Yy5jaGFyQXQoKGU+PjYqKDMtYSkpJjYzKX19fXJldHVybiBmfTt3aW5kb3cuZiA9IGhleF9tZDUobXdxcXBweik="

直接将window['b']赋值放本地的HTML页面中:

image

再刷新本地的HTML页面,发现可以正常执行获取console.log(m)

image

此时运行没有报错了,说明加密逻辑需要的代码已经足够了,回到最初的m生成的代码这里。

m = oo0O0(timestamp.toString()) + window.f;

说明window.f的值在atob(window['b'])解码里面,所以这里还是要去关注atob(window['b'])具体的值,base64解码之后:

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[g + 7], 22, -45705983);
                o = md5_ff(o, n, m, l, p[g + 8], 7, 1770035416);
                l = md5_ff(l, o, n, m, p[g + 9], 12, -1958414417);
                m = md5_ff(m, l, o, n, p[g + 10], 17, -42063);
                n = md5_ff(n, m, l, o, p[g + 11], 22, -1990404162);
                o = md5_ff(o, n, m, l, p[g + 12], 7, 1804660682);
                l = md5_ff(l, o, n, m, p[g + 13], 12, -40341101);
                m = md5_ff(m, l, o, n, p[g + 14], 17, -1502002290);
                n = md5_ff(n, m, l, o, p[g + 15], 22, 1236535329);
                o = md5_gg(o, n, m, l, p[g + 1], 5, -165796510);
                l = md5_gg(l, o, n, m, p[g + 6], 9, -1069501632);
                m = md5_gg(m, l, o, n, p[g + 11], 14, 643717713);
                n = md5_gg(n, m, l, o, p[g + 0], 20, -373897302);
                o = md5_gg(o, n, m, l, p[g + 5], 5, -701558691);
                l = md5_gg(l, o, n, m, p[g + 10], 9, 38016083);
                m = md5_gg(m, l, o, n, p[g + 15], 14, -660478335);
                n = md5_gg(n, m, l, o, p[g + 4], 20, -405537848);
                o = md5_gg(o, n, m, l, p[g + 9], 5, 568446438);
                l = md5_gg(l, o, n, m, p[g + 14], 9, -1019803690);
                m = md5_gg(m, l, o, n, p[g + 3], 14, -187363961);
                n = md5_gg(n, m, l, o, p[g + 8], 20, 1163531501);
                o = md5_gg(o, n, m, l, p[g + 13], 5, -1444681467);
                l = md5_gg(l, o, n, m, p[g + 2], 9, -51403784);
                m = md5_gg(m, l, o, n, p[g + 7], 14, 1735328473);
                n = md5_gg(n, m, l, o, p[g + 12], 20, -1921207734);
                o = md5_hh(o, n, m, l, p[g + 5], 4, -378558);
                l = md5_hh(l, o, n, m, p[g + 8], 11, -2022574463);
                m = md5_hh(m, l, o, n, p[g + 11], 16, 1839030562);
                n = md5_hh(n, m, l, o, p[g + 14], 23, -35309556);
                o = md5_hh(o, n, m, l, p[g + 1], 4, -1530992060);
                l = md5_hh(l, o, n, m, p[g + 4], 11, 1272893353);
                m = md5_hh(m, l, o, n, p[g + 7], 16, -155497632);
                n = md5_hh(n, m, l, o, p[g + 10], 23, -1094730640);
                o = md5_hh(o, n, m, l, p[g + 13], 4, 681279174);
                l = md5_hh(l, o, n, m, p[g + 0], 11, -358537222);
                m = md5_hh(m, l, o, n, p[g + 3], 16, -722881979);
                n = md5_hh(n, m, l, o, p[g + 6], 23, 76029189);
                o = md5_hh(o, n, m, l, p[g + 9], 4, -640364487);
                l = md5_hh(l, o, n, m, p[g + 12], 11, -421815835);
                m = md5_hh(m, l, o, n, p[g + 15], 16, 530742520);
                n = md5_hh(n, m, l, o, p[g + 2], 23, -995338651);
                o = md5_ii(o, n, m, l, p[g + 0], 6, -198630844);
                l = md5_ii(l, o, n, m, p[g + 7], 10, 11261161415);
                m = md5_ii(m, l, o, n, p[g + 14], 15, -1416354905);
                n = md5_ii(n, m, l, o, p[g + 5], 21, -57434055);
                o = md5_ii(o, n, m, l, p[g + 12], 6, 1700485571);
                l = md5_ii(l, o, n, m, p[g + 3], 10, -1894446606);
                m = md5_ii(m, l, o, n, p[g + 10], 15, -1051523);
                n = md5_ii(n, m, l, o, p[g + 1], 21, -2054922799);
                o = md5_ii(o, n, m, l, p[g + 8], 6, 1873313359);
                l = md5_ii(l, o, n, m, p[g + 15], 10, -30611744);
                m = md5_ii(m, l, o, n, p[g + 6], 15, -1560198380);
                n = md5_ii(n, m, l, o, p[g + 13], 21, 1309151649);
                o = md5_ii(o, n, m, l, p[g + 4], 6, -145523070);
                l = md5_ii(l, o, n, m, p[g + 11], 10, -1120210379);
                m = md5_ii(m, l, o, n, p[g + 2], 15, 718787259);
                n = md5_ii(n, m, l, o, p[g + 9], 21, -343485551);
                o = safe_add(o, j);
                n = safe_add(n, h);
                m = safe_add(m, f);
                l = safe_add(l, e)
            }
            return Array(o, n, m, l)
        }

        function md5_cmn(h, e, d, c, g, f) {
            return safe_add(bit_rol(safe_add(safe_add(e, h), safe_add(c, f)), g), d)
        }

        function md5_ff(g, f, k, j, e, i, h) {
            return md5_cmn((f & k) | ((~f) & j), g, f, e, i, h)
        }

        function md5_gg(g, f, k, j, e, i, h) {
            return md5_cmn((f & j) | (k & (~j)), g, f, e, i, h)
        }

        function md5_hh(g, f, k, j, e, i, h) {
            return md5_cmn(f ^ k ^ j, g, f, e, i, h)
        }

        function md5_ii(g, f, k, j, e, i, h) {
            return md5_cmn(k ^ (f | (~j)), g, f, e, i, h)
        }

        function core_hmac_md5(c, f) {
            var e = str2binl(c);
            if (e.length > 16) {
                e = core_md5(e, c.length * chrsz)
            }
            var a = Array(16), d = Array(16);
            for (var b = 0; b < 16; b++) {
                a[b] = e[b] ^ 909522486;
                d[b] = e[b] ^ 1549556828
            }
            var g = core_md5(a.concat(str2binl(f)), 512 + f.length * chrsz);
            return core_md5(d.concat(g), 512 + 128)
        }

        function safe_add(a, d) {
            var c = (a & 65535) + (d & 65535);
            var b = (a >> 16) + (d >> 16) + (c >> 16);
            return (b << 16) | (c & 65535)
        }

        function bit_rol(a, b) {
            return (a << b) | (a >>> (32 - b))
        }

        function str2binl(d) {
            var c = Array();
            var a = (1 << chrsz) - 1;
            for (var b = 0; b < d.length * chrsz; b += chrsz) {
                c[b >> 5] |= (d.charCodeAt(b / chrsz) & a) << (b % 32)
            }
            return c
        }

        function binl2str(c) {
            var d = "";
            var a = (1 << chrsz) - 1;
            for (var b = 0; b < c.length * 32; b += chrsz) {
                d += String.fromCharCode((c[b >> 5] >>> (b % 32)) & a)
            }
            return d
        }

        function binl2hex(c) {
            var b = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
            var d = "";
            for (var a = 0; a < c.length * 4; a++) {
                d += b.charAt((c[a >> 2] >> ((a % 4) * 8 + 4)) & 15) + b.charAt((c[a >> 2] >> ((a % 4) * 8)) & 15)
            }
            return d
        }

        function binl2b64(d) {
            var c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            var f = "";
            for (var b = 0; b < d.length * 4; b += 3) {
                var e = (((d[b >> 2] >> 8 * (b % 4)) & 255) << 16) | (((d[b + 1 >> 2] >> 8 * ((b + 1) % 4)) & 255) << 8) | ((d[b + 2 >> 2] >> 8 * ((b + 2) % 4)) & 255);
                for (var a = 0; a < 4; a++) {
                    if (b * 8 + a * 6 > d.length * 32) {
                        f += b64pad
                    } else {
                        f += c.charAt((e >> 6 * (3 - a)) & 63)
                    }
                }
            }
            return f
        };

window.f = hex_md5(mwqqppz)

在代码最后可以看到window.f = hex_md5(mwqqppz),熟悉的MD5加密。

还不清楚mwqqppz是什么,接着分析,eval(atob(window['b'])[J('0x0', ']dQW')](J('0x1', 'GTu!'), '\x27' + mw + '\x27'));中剩下的逻辑,直接在console中声明J函数,或者在代码中加断点进入J函数中,在console可以输入对应的值:

image

还原eval(atob(window['b'])[J('0x0', ']dQW')](J('0x1', 'GTu!'), '\x27' + mw + '\x27'));的逻辑为:

eval(window['b'].replace('mwqqppz','mw')

而且上面的分析中,mwqqppzwindow.f = hex_md5(mwqqppz)的参数,作用就是将window.f = hex_md5(mwqqppz)参数换成oo0O0函数的参数。

而且oo0O0函数的最后可以看到return ''返回是空值,那实际

m = window.f;
var m=oo0O0(timestamp.toString())+window.f; 
oo0O0函数最后返回的是空值,但是在调用的时候讲window.f = hex_md5(mwqqppz)参数给替换成了oo0O0参数,实际调用时候oo0O0函数的传参为timestamp.toString(),也就是时间戳字符串。

那么实际

var m = hex_md5(timestamp.toString())

而在oo0O0函数中可以看到,Date.parse()函数用于分析一个包含日期的字符串,timestamp是时间戳数字。

var timestamp = Date.parse(new Date());
//这里获取时间戳方法是将毫秒改成000显示

那最后m参数的值为

m = hex_md5(timestamp.toString()) + '丨'+ timestamp/1000

然后利用Python编写脚本爬取数据进行答题,进过测试base64解码出来的MD5加密算法不是标准的MD5,经过修改的,所以不能用Python自带的标准MD5加密算法编写,为了省时间直接Python的execjs调用解码之后的js MD5代码。

import requests
import execjs


jscode = """var timestamp = (Date.parse(new Date())).toString(); 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[g+7],22,-45705983);o=md5_ff(o,n,m,l,p[g+8],7,1770035416);l=md5_ff(l,o,n,m,p[g+9],12,-1958414417);m=md5_ff(m,l,o,n,p[g+10],17,-42063);n=md5_ff(n,m,l,o,p[g+11],22,-1990404162);o=md5_ff(o,n,m,l,p[g+12],7,1804660682);l=md5_ff(l,o,n,m,p[g+13],12,-40341101);m=md5_ff(m,l,o,n,p[g+14],17,-1502002290);n=md5_ff(n,m,l,o,p[g+15],22,1236535329);o=md5_gg(o,n,m,l,p[g+1],5,-165796510);l=md5_gg(l,o,n,m,p[g+6],9,-1069501632);m=md5_gg(m,l,o,n,p[g+11],14,643717713);n=md5_gg(n,m,l,o,p[g+0],20,-373897302);o=md5_gg(o,n,m,l,p[g+5],5,-701558691);l=md5_gg(l,o,n,m,p[g+10],9,38016083);m=md5_gg(m,l,o,n,p[g+15],14,-660478335);n=md5_gg(n,m,l,o,p[g+4],20,-405537848);o=md5_gg(o,n,m,l,p[g+9],5,568446438);l=md5_gg(l,o,n,m,p[g+14],9,-1019803690);m=md5_gg(m,l,o,n,p[g+3],14,-187363961);n=md5_gg(n,m,l,o,p[g+8],20,1163531501);o=md5_gg(o,n,m,l,p[g+13],5,-1444681467);l=md5_gg(l,o,n,m,p[g+2],9,-51403784);m=md5_gg(m,l,o,n,p[g+7],14,1735328473);n=md5_gg(n,m,l,o,p[g+12],20,-1921207734);o=md5_hh(o,n,m,l,p[g+5],4,-378558);l=md5_hh(l,o,n,m,p[g+8],11,-2022574463);m=md5_hh(m,l,o,n,p[g+11],16,1839030562);n=md5_hh(n,m,l,o,p[g+14],23,-35309556);o=md5_hh(o,n,m,l,p[g+1],4,-1530992060);l=md5_hh(l,o,n,m,p[g+4],11,1272893353);m=md5_hh(m,l,o,n,p[g+7],16,-155497632);n=md5_hh(n,m,l,o,p[g+10],23,-1094730640);o=md5_hh(o,n,m,l,p[g+13],4,681279174);l=md5_hh(l,o,n,m,p[g+0],11,-358537222);m=md5_hh(m,l,o,n,p[g+3],16,-722881979);n=md5_hh(n,m,l,o,p[g+6],23,76029189);o=md5_hh(o,n,m,l,p[g+9],4,-640364487);l=md5_hh(l,o,n,m,p[g+12],11,-421815835);m=md5_hh(m,l,o,n,p[g+15],16,530742520);n=md5_hh(n,m,l,o,p[g+2],23,-995338651);o=md5_ii(o,n,m,l,p[g+0],6,-198630844);l=md5_ii(l,o,n,m,p[g+7],10,11261161415);m=md5_ii(m,l,o,n,p[g+14],15,-1416354905);n=md5_ii(n,m,l,o,p[g+5],21,-57434055);o=md5_ii(o,n,m,l,p[g+12],6,1700485571);l=md5_ii(l,o,n,m,p[g+3],10,-1894446606);m=md5_ii(m,l,o,n,p[g+10],15,-1051523);n=md5_ii(n,m,l,o,p[g+1],21,-2054922799);o=md5_ii(o,n,m,l,p[g+8],6,1873313359);l=md5_ii(l,o,n,m,p[g+15],10,-30611744);m=md5_ii(m,l,o,n,p[g+6],15,-1560198380);n=md5_ii(n,m,l,o,p[g+13],21,1309151649);o=md5_ii(o,n,m,l,p[g+4],6,-145523070);l=md5_ii(l,o,n,m,p[g+11],10,-1120210379);m=md5_ii(m,l,o,n,p[g+2],15,718787259);n=md5_ii(n,m,l,o,p[g+9],21,-343485551);o=safe_add(o,j);n=safe_add(n,h);m=safe_add(m,f);l=safe_add(l,e)}return Array(o,n,m,l)}function md5_cmn(h,e,d,c,g,f){return safe_add(bit_rol(safe_add(safe_add(e,h),safe_add(c,f)),g),d)}function md5_ff(g,f,k,j,e,i,h){return md5_cmn((f&k)|((~f)&j),g,f,e,i,h)}function md5_gg(g,f,k,j,e,i,h){return md5_cmn((f&j)|(k&(~j)),g,f,e,i,h)}function md5_hh(g,f,k,j,e,i,h){return md5_cmn(f^k^j,g,f,e,i,h)}function md5_ii(g,f,k,j,e,i,h){return md5_cmn(k^(f|(~j)),g,f,e,i,h)}function core_hmac_md5(c,f){var e=str2binl(c);if(e.length>16){e=core_md5(e,c.length*chrsz)}var a=Array(16),d=Array(16);for(var b=0;b<16;b++){a[b]=e[b]^909522486;d[b]=e[b]^1549556828}var g=core_md5(a.concat(str2binl(f)),512+f.length*chrsz);return core_md5(d.concat(g),512+128)}function safe_add(a,d){var c=(a&65535)+(d&65535);var b=(a>>16)+(d>>16)+(c>>16);return(b<<16)|(c&65535)}function bit_rol(a,b){return(a<<b)|(a>>>(32-b))}function str2binl(d){var c=Array();var a=(1<<chrsz)-1;for(var b=0;b<d.length*chrsz;b+=chrsz){c[b>>5]|=(d.charCodeAt(b/chrsz)&a)<<(b%32)}return c}function binl2str(c){var d="";var a=(1<<chrsz)-1;for(var b=0;b<c.length*32;b+=chrsz){d+=String.fromCharCode((c[b>>5]>>>(b%32))&a)}return d}function binl2hex(c){var b=hexcase?"0123456789ABCDEF":"0123456789abcdef";var d="";for(var a=0;a<c.length*4;a++){d+=b.charAt((c[a>>2]>>((a%4)*8+4))&15)+b.charAt((c[a>>2]>>((a%4)*8))&15)}return d}function binl2b64(d){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var f="";for(var b=0;b<d.length*4;b+=3){var e=(((d[b>>2]>>8*(b%4))&255)<<16)|(((d[b+1>>2]>>8*((b+1)%4))&255)<<8)|((d[b+2>>2]>>8*((b+2)%4))&255);for(var a=0;a<4;a++){if(b*8+a*6>d.length*32){f+=b64pad}else{f+=c.charAt((e>>6*(3-a))&63)}}}return f};mm=hex_md5(timestamp)"""

ctx= execjs.compile(jscode)

sum = 0
count = 0
for i in range(1,6):
    
    timestamp = int(ctx.eval('timestamp'))
    m = ctx.eval("mm") + '丨' + str(timestamp // 1000)

    args = {
        'page':i,
        'm': m
            }

    datas = requests.get('http://match.yuanrenxue.com/api/match/1?', params=args, headers = {'User-Agent':'yuanrenxue.project'}).json()

    for value in datas['data']:
        print(value)
        sum = sum + value['value']
        count = count + 1

result = sum /count
print('result',result)

运行结果:

{'value': 8179}
{'value': 6177}
{'value': 4174}
{'value': 5945}
{'value': 9556}
{'value': 2318}
{'value': 4}
{'value': 2653}
{'value': 4855}
{'value': 1370}
{'value': 2366}
{'value': 2108}
{'value': 6159}
{'value': 5685}
{'value': 2010}
{'value': 7109}
{'value': 1002}
{'value': 9300}
{'value': 8995}
{'value': 5732}
{'value': 5535}
{'value': 7126}
{'value': 7472}
{'value': 4129}
{'value': 2724}
{'value': 3475}
{'value': 3605}
{'value': 7729}
{'value': 1860}
{'value': 833}
{'value': 3937}
{'value': 6420}
{'value': 115}
{'value': 4333}
{'value': 6674}
{'value': 383}
{'value': 5922}
{'value': 7344}
{'value': 7012}
{'value': 8009}
{'value': 9297}
{'value': 8727}
{'value': 4130}
{'value': 1910}
{'value': 5976}
{'value': 2973}
{'value': 1756}
{'value': 6725}
{'value': 1716}
{'value': 1456}
result 4700.0

文章来源: https://www.freebuf.com/articles/web/260984.html
如有侵权请联系:admin#unsafe.sh