11js加密人均会解jsl

This commit is contained in:
luzhisheng 2023-03-03 17:49:23 +08:00
parent ef33671c31
commit e5ef3cc9d7
4 changed files with 100 additions and 19 deletions

View File

@ -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</1l>';N=N.28.v;1L t=N.2h(/1y?:\\/\\//)[e];N=N.a(t.6).A();16 22(t){1A(1L 1H=e;1H<t.6;1H++){t[1H]=N.24(t[1H])};16 t.1z('')}})(),22(N){1A(1L t=e;t<N.6;t++){N[t]=2e(N[t]).18(m)};16 N.1z('')}],N=['C',[(-~~~{}<<-~~~{})+(-~~~{}<<-~~~{})],'1u',[(-~[]+[]+[[]][e])+[-~-~{}]],'2j',[(-~[]+[]+[[]][e])+[-~[]-~[]-~!/!/+(-~[]-~[])*[-~[]-~[]]],(-~[]+[]+[[]][e])+(-~[-~-~{}]+[[]][e]),(-~[]+[]+[[]][e])+[(+!![[][[]]][23])]],'h',[(1N-~[-~-~{}]+[]+[[]][e])],'%2d',[(-~[]+[]+[[]][e])+(-~[-~-~{}]+[[]][e])],'1D',[(-~[]+[]+[[]][e])+(-~[-~-~{}]+[[]][e])],'a543fc5f5ea0af02f0f548691145e5d9',(-~[-~-~{}]+[[]][e]),'10'];1A(1L 1H=e;1H<N.6;1H++){N[1H]=t[[23,e,23,1N,23,w,23,1N,23,1N,23,w,23,e,23][1H]](N[1H])};16 N.1z('')})()+';2=r, 25-q-1O B:1b:F 2q;H=/;'};M((22(){15{16 !!u.12;}1K(1E){16 z;}})()){1t.12('1C',N,z)}1r{1t.y('2n',N)}",
f = function (x, y) {
var a = 0, b = 0, c = 0;
x = x.split("");
y = y || 99;
while ((a = x.shift()) && (b = a.charCodeAt(0) - 77.5)) c = (Math.abs(b) < 13 ? (b + 48.5) : parseInt(a, 36)) + y * c;
return c
}, z = f(y.match(/\w/g).sort(function (x, y) {
return f(x) - f(y)
}).pop());
while (z++) try {
eval(y.replace(/\b\w+\b/g, function (y) {
console.log(x[f(y, z) - 1] || ("_" + y));
return x[f(y, z) - 1] || ("_" + y)
}));
break
} catch (_) {
}

View File

@ -0,0 +1,54 @@
from parsel import Selector
import requests
import execjs
def get_cookie(jsStr):
data = {"jsStr": jsStr}
url = f"http://0.0.0.0:3005/sign_11"
session = requests.session()
headers = {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
session.headers = headers
response = session.request("POST", url, data=data)
return response.text
def challenge11(__jsl_clearance=''):
url = "https://www.python-spider.com/challenge/11"
session = requests.session()
headers = {
'cookie': f'sessionid=e03jd87ud4v1lhs6ywg0sgrq43ybe2f4; {__jsl_clearance}',
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
session.headers = headers
response = session.request("GET", url)
return response.text
def run():
response_text = challenge11()
js = response_text.replace('<script>', '').replace('</script>', '')
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()

View File

@ -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")
});

View File

@ -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='<a href=\'/\'>_1H</a>';_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
};