Commit cb177d7e by lichenggang

update utf-8

parent 57f8de99
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import tornado.web
import tornado.ioloop
from aiohttp.client_exceptions import ServerDisconnectedError
......
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import re
from urllib.parse import quote
......
from concurrent.futures import ThreadPoolExecutor,as_completed
import re
from lxml import etree
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os,re
import requests
import execjs
os.environ["EXECJS_RUNTIME"] = "Node"
mydohtml = '''<!DOCTYPE HTML>
<html lang="en-US">
<head></head>
<body>
<form id="challenge-form" action="/cdn-cgi/l/chk_jschl" method="get">
<input type="hidden" name="s" value="e6f1df9b9695381c-1569553369-1800-AWgP/B1fx9mNLlcT2CUlA6Ux4mByuW2q5DfzzNrgjhRmfnpkJj4RBm5bPXT8QghD12KOmBPrDXEtPWIqpkPgL7KGV1VQrytSGWzMEvTe3nq/TNPnL3nx+mDgkahBNJZbEREwaORNvO61hUjIwN2/y7JsBlhCKn4oUd2kZ4UVhxZiWSSmLD3SEnhjGjiRF2DWfQSj5ZEk+gYGlRpBCqblJd8="></input>
<input type="hidden" name="jschl_vc" value="cc053e054"/>
<input type="hidden" name="pass" value="1569553373.858-FO"/>
<input type="hidden" id="jschl-answer" name="jschl_answer"/>
</form>
</body>
</html>
'''.replace('\n','')
myjs=r'''
const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const { window } = new JSDOM('$$').window;
document = window.document;
function tb(){
function tmp(){
var s,t,o,p,b,r,e,a,k,i,n,g,f, nYXTGYR={"dcvi":+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]))/+((+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![])+(+!![])+(+!![])+(!+[]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]))};
g = String.fromCharCode;
o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
e = function(s) {
s += "==".slice(2 - (s.length & 3));
var bm, r = "", r1, r2, i = 0;
for (; i < s.length;) {
bm = o.indexOf(s.charAt(i++)) << 18 | o.indexOf(s.charAt(i++)) << 12
| (r1 = o.indexOf(s.charAt(i++))) << 6 | (r2 = o.indexOf(s.charAt(i++)));
r += r1 === 64 ? g(bm >> 16 & 255)
: r2 === 64 ? g(bm >> 16 & 255, bm >> 8 & 255)
: g(bm >> 16 & 255, bm >> 8 & 255, bm & 255);
}
return r;
};
t = "https://www.runooc.com/";
r = t.match(/https?:\/\//)[0];
t = t.substr(r.length); t = t.substr(0,t.length-1);
a = document.getElementById('jschl-answer');
f = document.getElementById('challenge-form');
;nYXTGYR.dcvi*=+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]))/+((!+[]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![])+(+[])+(!+[]+!![]+!![]));nYXTGYR.dcvi+=+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]))/+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(+!![])+(!+[]+!![])+(!+[]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]));nYXTGYR.dcvi*=+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]))/+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![])+(+[])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]));nYXTGYR.dcvi+=+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![])+(!+[]+!![])+(!+[]+!![]+!![]+!![])+(!+[]+!![]+!![]))/+((!+[]+!![]+!![]+!![]+!![]+[])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![])+(+[]));nYXTGYR.dcvi-=+((!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+[])+(+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![])+(+[])+(!+[]+!![]+!![]+!![])+(!+[]+!![])+(!+[]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]))/+((!+[]+!![]+!![]+[])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![]+!![]+!![]+!![]+!![]+!![]+!![])+(!+[]+!![])+(+[])+(!+[]+!![])+(!+[]+!![]+!![]+!![]));a.value = (+nYXTGYR.dcvi + t.length).toFixed(10); '; 121'
return a.value;
// f.action += location.hash;
// f.submit();
}
return tmp();
};
document.addEventListener("DOMContentLoaded", tb, true);
'''.replace('$$',mydohtml)
exector = ThreadPoolExecutor(max_workers=5)
# headers={
# "authority":"www.mouser.hk",
# "method":"GET",
# "path":"/ProductDetail/Microchip-Technology/MCP1630RD-LIC2?qs=%2Fha2pyFadugOTv0PoQ7miVOX9mwJ5UAQzQQqwV9rhh5KjEhYK%252blX8g==",
# "scheme":"https",
# "accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
# "accept-encoding":"gzip, deflate, br",
# "accept-language":"zh-CN,zh;q=0.9",
# "cache-control":"no-cache",
# "pragma":"no-cache",
# "referer":"https://www.mouser.hk/",
# "sec-fetch-mode":"navigate",
# "sec-fetch-site":"same-origin",
# "sec-fetch-user":"?1",
# "upgrade-insecure-requests":"1",
# "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36",
# }
web_headers = {
'host': "www.mouser.hk",
# 'connection': 'close',
'accept': "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
'accept-encoding': "gzip, deflate, br",
'accept-language': "zh-CN,zh;q=0.9,en;q=0.8,zh-TW;q=0.7,mt;q=0.6",
'cache-control': "max-age=0,no-cache",
'referer': "https://www.mouser.hk/",
'upgrade-insecure-requests': "1",
'user-agent': "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/71.0.3578.98 Safari/537.36",
}
url="https://www.mouser.hk/ProductDetail/Microchip-Technology/MCP1630RD-LIC2?qs=%2Fha2pyFadugOTv0PoQ7miVOX9mwJ5UAQzQQqwV9rhh5KjEhYK%252blX8g=="
resp=requests.get(url,headers=web_headers)
print(resp.text)
\ No newline at end of file
print(myjs)
ctx = execjs.compile(myjs)
sign = ctx.call('tb')
print(sign)
\ No newline at end of file
# coding=utf8
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import sys
import os
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment