From e5ef3cc9d75791a0895c45b675ca29a6903d8b0c Mon Sep 17 00:00:00 2001 From: luzhisheng Date: Fri, 3 Mar 2023 17:49:23 +0800 Subject: [PATCH] =?UTF-8?q?11js=E5=8A=A0=E5=AF=86=E4=BA=BA=E5=9D=87?= =?UTF-8?q?=E4=BC=9A=E8=A7=A3jsl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 猿人学练习/11js加密人均会解jsl/1.js | 19 --------- 猿人学练习/11js加密人均会解jsl/main.py | 54 ++++++++++++++++++++++++ 猿人学练习/11js加密人均会解jsl/server.js | 18 ++++++++ 猿人学练习/11js加密人均会解jsl/test.js | 28 ++++++++++++ 4 files changed, 100 insertions(+), 19 deletions(-) delete mode 100644 猿人学练习/11js加密人均会解jsl/1.js create mode 100644 猿人学练习/11js加密人均会解jsl/main.py create mode 100644 猿人学练习/11js加密人均会解jsl/server.js create mode 100644 猿人学练习/11js加密人均会解jsl/test.js diff --git a/猿人学练习/11js加密人均会解jsl/1.js b/猿人学练习/11js加密人均会解jsl/1.js deleted file mode 100644 index 447f9f3..0000000 --- a/猿人学练习/11js加密人均会解jsl/1.js +++ /dev/null @@ -1,19 +0,0 @@ -var x = "div@Expires@@captcha@while@length@@reverse@0xEDB88320@substr@fromCharCode@113@@0@@@LBWywKW@1500@@cookie@@36@createElement@JgSe0upZ@rOm9XFMtA3QKV7nYsPGT4lifyWwkq5vcjH2IdxUoCbhERLaz81DNB6@Dec@Tue@eval@@window@href@3@String@attachEvent@false@toLowerCase@09@clD@Array@@26@@Path@@@@f@if@@@D@@addEventListener@@@try@return@location@toString@@@50@@@pathname@@@@setTimeout@@replace@a@innerHTML@@@@1677175553@else@@document@V@@@@https@join@for@@DOMContentLoaded@6@e@@@@@new@catch@var@@2@30@split@@function@1@charAt@12@__jsl_clearance@0xFF@firstChild@search@k@chars@charCodeAt@2FZyf@parseInt@8@@match@RegExp@fq@challenge@@g@onreadystatechange@@d@GMT".replace(/@*$/, "").split("@"), - y = "1L N=22(){1i('17.v=17.1e+17.29.1k(/[\\?|&]4-2k/,\\'\\')',i);1t.k='26=1q.c|e|'+(22(){1L t=[22(N){16 N},22(t){16 t},(22(){1L N=1t.n('1');N.1m='<1l v=\\'/\\'>1H';N=N.28.v;1L t=N.2h(/1y?:\\/\\//)[e];N=N.a(t.6).A();16 22(t){1A(1L 1H=e;1H', '').replace('', '') + js = js.replace('try{eval(', 'try{a = (') + end_js = """ + function cookie_js() { + return a + } + """ + js = execjs.compile(js + end_js) + jsStr = js.call("cookie_js") + cookie = get_cookie(jsStr) + print(cookie) + response_text = challenge11(cookie) + print(response_text) + res = Selector(response_text) + trS = res.xpath('//tr[@class="odd"]//td/text()').getall() + Count = 0 + for tr in trS: + Count += int(tr.strip()) + print('Count -->>', Count) + + +if __name__ == '__main__': + run() diff --git a/猿人学练习/11js加密人均会解jsl/server.js b/猿人学练习/11js加密人均会解jsl/server.js new file mode 100644 index 0000000..2a66074 --- /dev/null +++ b/猿人学练习/11js加密人均会解jsl/server.js @@ -0,0 +1,18 @@ +const express = require('express'); +const app = express(); +const encryption = require("./test"); +var bodyParser = require('body-parser'); +app.use(bodyParser()); + + +app.post('/sign_11', function (req, res) { + let result = ''; + let jsStr = req.body.jsStr; + result = encryption.get_cookie(jsStr); + res.send(result.toString()); +}); + + +app.listen(3005, () => { + console.log("开启服务,端口 3005") +}); diff --git a/猿人学练习/11js加密人均会解jsl/test.js b/猿人学练习/11js加密人均会解jsl/test.js new file mode 100644 index 0000000..95d708c --- /dev/null +++ b/猿人学练习/11js加密人均会解jsl/test.js @@ -0,0 +1,28 @@ +function createElement(){ + return { + 'innerHTML':'', + 'firstChild':{ + 'href':'http://www.python-spider.com/challenge/11' + } + } +} +function setTimeout (){ } +document = { + 'attachEvent' : function(){}, + 'addEventListener':function(){}, + 'createElement':createElement, +}; +var _N=function(){setTimeout('location.href=location.pathname+location.search.replace(/[\?|&]captcha-challenge/,\'\')',1500);document.cookie='__jsl_clearance=1677835884.807|0|'+(function(){var _t=[function(_N){return _N},function(_t){return _t},(function(){var _N=document.createElement('div');_N.innerHTML='_1H';_N=_N.firstChild.href;var _t=_N.match(/https?:\/\//)[0];_N=_N.substr(_t.length).toLowerCase();return function(_t){for(var _1H=0;_1H<_t.length;_1H++){_t[_1H]=_N.charAt(_t[_1H])};return _t.join('')}})(),function(_N){for(var _t=0;_t<_N.length;_t++){_N[_t]=parseInt(_N[_t]).toString(36)};return _N.join('')}],_N=['clD',[(-~~~{}<<-~~~{})+(-~~~{}<<-~~~{})],'V',[(-~[]+[]+[[]][0])+[-~-~{}]],'fq',[(-~[]+[]+[[]][0])+[-~[]-~[]-~!/!/+(-~[]-~[])*[-~[]-~[]]],(-~[]+[]+[[]][0])+(-~[-~-~{}]+[[]][0]),(-~[]+[]+[[]][0])+[(+!![[][[]]][1])]],'LBWywKW',[(2-~[-~-~{}]+[]+[[]][0])],'%2FZyf',[(-~[]+[]+[[]][0])+(-~[-~-~{}]+[[]][0])],'6',[(-~[]+[]+[[]][0])+(-~[-~-~{}]+[[]][0])],'_149ed88728a08a812738bdc16856de74',(-~[-~-~{}]+[[]][0]),'D'];for(var _1H=0;_1H<_N.length;_1H++){_N[_1H]=_t[[1,0,1,2,1,3,1,2,1,2,1,3,1,0,1][_1H]](_N[_1H])};return _N.join('')})()+';Expires=Tue, 12-Dec-30 09:50:26 GMT;Path=/;'};if((function(){try{return !!window.addEventListener;}catch(e){return false;}})()){document.addEventListener('DOMContentLoaded',_N,false)}else{document.attachEvent('onreadystatechange',_N)} +function get_cookie(jsStr) { + eval(jsStr); + _N(); + return document.cookie; +} + +// console.log(get_cookie()); + + +module.exports = + { + get_cookie + };