├── .idea
├── Crack-JS-Spider.iml
├── misc.xml
├── modules.xml
├── vcs.xml
└── workspace.xml
├── QQ音乐
└── qqmusic.js
├── QQ音乐2022.2.13
└── qqsign.js
├── README.md
├── WPS
└── wps.js
├── boss直聘
└── zp_token.js
├── b站登录
└── bilibili.js
├── 一键解析
└── yjjx.js
├── 中国裁判文书网
└── cpws.js
├── 云就业企业校招管理平台
└── yjy.js
├── 今日头条
└── toutiao.js
├── 今目标
└── jmb.py
├── 全国中等职业学校学生管理信息系统
└── zy.js
├── 共赢金融
└── gyjr.js
├── 加密算法
├── AESpy.py
├── BASE64py.py
├── MD5py.py
├── RSApy.py
└── SHA1py.py
├── 唯品会
└── marc_cid.js
├── 天安保险
└── tabx.js
├── 微信公众号
├── wx.js
└── wx.py
├── 微博
├── weibo
├── weibo.js
└── weibo.py
├── 房天下
└── get_pwd.js
├── 拼多多
└── anti_content.js
├── 有道
└── youdao.py
├── 极验滑块2022.2.19
└── 极验.js
├── 淘宝
├── password2.js
└── tb.py
├── 知乎
├── x-zse-96.js
└── 知乎x-zse-96.py
├── 空中网
├── analyse.txt
├── kzw.js
└── kzw2.js
├── 网易
├── netease.js
├── netease.py
└── rtid.js
├── 网易云音乐
├── music.mp3
├── wyy.js
└── wyy.py
├── 财联社
└── cls.js
├── 酷狗
├── kg_dfid.js
└── kg_mid.js
└── 重庆科技资源共享平台
└── cq.js
/.idea/Crack-JS-Spider.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 | 1644683655560
128 |
129 |
130 | 1644683655560
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
--------------------------------------------------------------------------------
/QQ音乐/qqmusic.js:
--------------------------------------------------------------------------------
1 | this.window=this;
2 | var losenine=null;
3 |
4 | !function(n, t) {
5 | "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (n = n || self).getSecuritySign = t()
6 | } (this,
7 | function() {
8 | "use strict";
9 | var n = function() {
10 | if ("undefined" != typeof self) return self;
11 | if ("undefined" != typeof window) return window;
12 | if ("undefined" != typeof global) return global;
13 | throw new Error("unable to locate global object")
14 | } ();
15 | n.__sign_hash_20200305 = function(n, t) {
16 | function f(n, t) {
17 | return n << t | n >>> 32 - t
18 | }
19 | function h(n, t) {
20 | var o, e, u, p, r;
21 | return u = 2147483648 & n,
22 | p = 2147483648 & t,
23 | r = (1073741823 & n) + (1073741823 & t),
24 | (o = 1073741824 & n) & (e = 1073741824 & t) ? 2147483648 ^ r ^ u ^ p: o | e ? 1073741824 & r ? 3221225472 ^ r ^ u ^ p: 1073741824 ^ r ^ u ^ p: r ^ u ^ p
25 | }
26 | function o(n, t, o, e, u, p, r) {
27 | var i;
28 | return n = h(n, h(h((i = t) & o | ~i & e, u), r)),
29 | h(f(n, p), t)
30 | }
31 | function e(n, t, o, e, u, p, r) {
32 | var i;
33 | return n = h(n, h(h(t & (i = e) | o & ~i, u), r)),
34 | h(f(n, p), t)
35 | }
36 | function u(n, t, o, e, u, p, r) {
37 | return n = h(n, h(h(t ^ o ^ e, u), r)),
38 | h(f(n, p), t)
39 | }
40 | function p(n, t, o, e, u, p, r) {
41 | return n = h(n, h(h(o ^ (t | ~e), u), r)),
42 | h(f(n, p), t)
43 | }
44 | function r(n) {
45 | var t, o = "",
46 | e = "";
47 | for (t = 0; t <= 3; t++) o += (e = "0" + (n >>> 8 * t & 255).toString(16)).substr(e.length - 2, 2);
48 | return o
49 | }
50 | var i, l, c, g, a, s, v, d, y, b;
51 | for (t = t || 32, i = function(n) {
52 | for (var t, o = n.length,
53 | e = o + 8,
54 | u = 16 * (1 + (e - e % 64) / 64), p = Array(u - 1), r = 0, i = 0; i < o;) r = i % 4 * 8,
55 | p[t = (i - i % 4) / 4] = p[t] | n.charCodeAt(i) << r,
56 | i++;
57 | return r = i % 4 * 8,
58 | p[t = (i - i % 4) / 4] = p[t] | 128 << r,
59 | p[u - 2] = o << 3,
60 | p[u - 1] = o >>> 29,
61 | p
62 | } (n = function(n) {
63 | n = n.replace(/\r\n/g, "\n");
64 | for (var t = "",
65 | o = 0; o < n.length; o++) {
66 | var e = n.charCodeAt(o);
67 | e < 128 ? t += String.fromCharCode(e) : (127 < e && e < 2048 ? t += String.fromCharCode(e >> 6 | 192) : (t += String.fromCharCode(e >> 12 | 224), t += String.fromCharCode(e >> 6 & 63 | 128)), t += String.fromCharCode(63 & e | 128))
68 | }
69 | return t
70 | } (n)), v = 1732584193, d = 4023233417, y = 2562383102, b = 271733878, l = 0; l < i.length; l += 16) v = o(c = v, g = d, a = y, s = b, i[l + 0], 7, 3614090360),
71 | b = o(b, v, d, y, i[l + 1], 12, 3905402710),
72 | y = o(y, b, v, d, i[l + 2], 17, 606105819),
73 | d = o(d, y, b, v, i[l + 3], 22, 3250441966),
74 | v = o(v, d, y, b, i[l + 4], 7, 4118548399),
75 | b = o(b, v, d, y, i[l + 5], 12, 1200080426),
76 | y = o(y, b, v, d, i[l + 6], 17, 2821735955),
77 | d = o(d, y, b, v, i[l + 7], 22, 4249261313),
78 | v = o(v, d, y, b, i[l + 8], 7, 1770035416),
79 | b = o(b, v, d, y, i[l + 9], 12, 2336552879),
80 | y = o(y, b, v, d, i[l + 10], 17, 4294925233),
81 | d = o(d, y, b, v, i[l + 11], 22, 2304563134),
82 | v = o(v, d, y, b, i[l + 12], 7, 1804603682),
83 | b = o(b, v, d, y, i[l + 13], 12, 4254626195),
84 | y = o(y, b, v, d, i[l + 14], 17, 2792965006),
85 | v = e(v, d = o(d, y, b, v, i[l + 15], 22, 1236535329), y, b, i[l + 1], 5, 4129170786),
86 | b = e(b, v, d, y, i[l + 6], 9, 3225465664),
87 | y = e(y, b, v, d, i[l + 11], 14, 643717713),
88 | d = e(d, y, b, v, i[l + 0], 20, 3921069994),
89 | v = e(v, d, y, b, i[l + 5], 5, 3593408605),
90 | b = e(b, v, d, y, i[l + 10], 9, 38016083),
91 | y = e(y, b, v, d, i[l + 15], 14, 3634488961),
92 | d = e(d, y, b, v, i[l + 4], 20, 3889429448),
93 | v = e(v, d, y, b, i[l + 9], 5, 568446438),
94 | b = e(b, v, d, y, i[l + 14], 9, 3275163606),
95 | y = e(y, b, v, d, i[l + 3], 14, 4107603335),
96 | d = e(d, y, b, v, i[l + 8], 20, 1163531501),
97 | v = e(v, d, y, b, i[l + 13], 5, 2850285829),
98 | b = e(b, v, d, y, i[l + 2], 9, 4243563512),
99 | y = e(y, b, v, d, i[l + 7], 14, 1735328473),
100 | v = u(v, d = e(d, y, b, v, i[l + 12], 20, 2368359562), y, b, i[l + 5], 4, 4294588738),
101 | b = u(b, v, d, y, i[l + 8], 11, 2272392833),
102 | y = u(y, b, v, d, i[l + 11], 16, 1839030562),
103 | d = u(d, y, b, v, i[l + 14], 23, 4259657740),
104 | v = u(v, d, y, b, i[l + 1], 4, 2763975236),
105 | b = u(b, v, d, y, i[l + 4], 11, 1272893353),
106 | y = u(y, b, v, d, i[l + 7], 16, 4139469664),
107 | d = u(d, y, b, v, i[l + 10], 23, 3200236656),
108 | v = u(v, d, y, b, i[l + 13], 4, 681279174),
109 | b = u(b, v, d, y, i[l + 0], 11, 3936430074),
110 | y = u(y, b, v, d, i[l + 3], 16, 3572445317),
111 | d = u(d, y, b, v, i[l + 6], 23, 76029189),
112 | v = u(v, d, y, b, i[l + 9], 4, 3654602809),
113 | b = u(b, v, d, y, i[l + 12], 11, 3873151461),
114 | y = u(y, b, v, d, i[l + 15], 16, 530742520),
115 | v = p(v, d = u(d, y, b, v, i[l + 2], 23, 3299628645), y, b, i[l + 0], 6, 4096336452),
116 | b = p(b, v, d, y, i[l + 7], 10, 1126891415),
117 | y = p(y, b, v, d, i[l + 14], 15, 2878612391),
118 | d = p(d, y, b, v, i[l + 5], 21, 4237533241),
119 | v = p(v, d, y, b, i[l + 12], 6, 1700485571),
120 | b = p(b, v, d, y, i[l + 3], 10, 2399980690),
121 | y = p(y, b, v, d, i[l + 10], 15, 4293915773),
122 | d = p(d, y, b, v, i[l + 1], 21, 2240044497),
123 | v = p(v, d, y, b, i[l + 8], 6, 1873313359),
124 | b = p(b, v, d, y, i[l + 15], 10, 4264355552),
125 | y = p(y, b, v, d, i[l + 6], 15, 2734768916),
126 | d = p(d, y, b, v, i[l + 13], 21, 1309151649),
127 | v = p(v, d, y, b, i[l + 4], 6, 4149444226),
128 | b = p(b, v, d, y, i[l + 11], 10, 3174756917),
129 | y = p(y, b, v, d, i[l + 2], 15, 718787259),
130 | d = p(d, y, b, v, i[l + 9], 21, 3951481745),
131 | v = h(v, c),
132 | d = h(d, g),
133 | y = h(y, a),
134 | b = h(b, s);
135 | return 32 == t ? r(v) + r(d) + r(y) + r(b) : r(d) + r(y)
136 | },
137 | function i(f, h, l, c, g) {
138 | g = g || [[this], [{}]];
139 | for (var t = [], o = null, n = [function() {
140 | return ! 0
141 | },
142 | function() {},
143 | function() {
144 | g.length = l[h++]
145 | },
146 | function() {
147 | g.push(l[h++])
148 | },
149 | function() {
150 | g.pop()
151 | },
152 | function() {
153 | var n = l[h++],
154 | t = g[g.length - 2 - n];
155 | g[g.length - 2 - n] = g.pop(),
156 | g.push(t)
157 | },
158 | function() {
159 | g.push(g[g.length - 1])
160 | },
161 | function() {
162 | g.push([g.pop(), g.pop()].reverse())
163 | },
164 | function() {
165 | g.push([c, g.pop()])
166 | },
167 | function() {
168 | g.push([g.pop()])
169 | },
170 | function() {
171 | var n = g.pop();
172 | g.push(n[0][n[1]])
173 | },
174 | function() {
175 | g.push(g[g.pop()[0]][0])
176 | },
177 | function() {
178 | var n = g[g.length - 2];
179 | n[0][n[1]] = g[g.length - 1]
180 | },
181 | function() {
182 | g[g[g.length - 2][0]][0] = g[g.length - 1]
183 | },
184 | function() {
185 | var n = g.pop(),
186 | t = g.pop();
187 | g.push([t[0][t[1]], n])
188 | },
189 | function() {
190 | var n = g.pop();
191 | g.push([g[g.pop()][0], n])
192 | },
193 | function() {
194 | var n = g.pop();
195 | g.push(delete n[0][n[1]])
196 | },
197 | function() {
198 | var n = [];
199 | for (var t in g.pop()) n.push(t);
200 | g.push(n)
201 | },
202 | function() {
203 | g[g.length - 1].length ? g.push(g[g.length - 1].shift(), !0) : g.push(void 0, !1)
204 | },
205 | function() {
206 | var n = g[g.length - 2],
207 | t = Object.getOwnPropertyDescriptor(n[0], n[1]) || {
208 | configurable: !0,
209 | enumerable: !0
210 | };
211 | t.get = g[g.length - 1],
212 | Object.defineProperty(n[0], n[1], t)
213 | },
214 | function() {
215 | var n = g[g.length - 2],
216 | t = Object.getOwnPropertyDescriptor(n[0], n[1]) || {
217 | configurable: !0,
218 | enumerable: !0
219 | };
220 | t.set = g[g.length - 1],
221 | Object.defineProperty(n[0], n[1], t)
222 | },
223 | function() {
224 | h = l[h++]
225 | },
226 | function() {
227 | var n = l[h++];
228 | g[g.length - 1] && (h = n)
229 | },
230 | function() {
231 | throw g[g.length - 1]
232 | },
233 | function() {
234 | var n = l[h++],
235 | t = n ? g.slice( - n) : [];
236 | g.length -= n,
237 | g.push(g.pop().apply(c, t))
238 | },
239 | function() {
240 | var n = l[h++],
241 | t = n ? g.slice( - n) : [];
242 | g.length -= n;
243 | var o = g.pop();
244 | g.push(o[0][o[1]].apply(o[0], t))
245 | },
246 | function() {
247 | var n = l[h++],
248 | t = n ? g.slice( - n) : [];
249 | g.length -= n,
250 | t.unshift(null),
251 | g.push(new(Function.prototype.bind.apply(g.pop(), t)))
252 | },
253 | function() {
254 | var n = l[h++],
255 | t = n ? g.slice( - n) : [];
256 | g.length -= n,
257 | t.unshift(null);
258 | var o = g.pop();
259 | g.push(new(Function.prototype.bind.apply(o[0][o[1]], t)))
260 | },
261 | function() {
262 | g.push(!g.pop())
263 | },
264 | function() {
265 | g.push(~g.pop())
266 | },
267 | function() {
268 | g.push(typeof g.pop())
269 | },
270 | function() {
271 | g[g.length - 2] = g[g.length - 2] == g.pop()
272 | },
273 | function() {
274 | g[g.length - 2] = g[g.length - 2] === g.pop()
275 | },
276 | function() {
277 | g[g.length - 2] = g[g.length - 2] > g.pop()
278 | },
279 | function() {
280 | g[g.length - 2] = g[g.length - 2] >= g.pop()
281 | },
282 | function() {
283 | g[g.length - 2] = g[g.length - 2] << g.pop()
284 | },
285 | function() {
286 | g[g.length - 2] = g[g.length - 2] >> g.pop()
287 | },
288 | function() {
289 | g[g.length - 2] = g[g.length - 2] >>> g.pop()
290 | },
291 | function() {
292 | g[g.length - 2] = g[g.length - 2] + g.pop()
293 | },
294 | function() {
295 | g[g.length - 2] = g[g.length - 2] - g.pop()
296 | },
297 | function() {
298 | g[g.length - 2] = g[g.length - 2] * g.pop()
299 | },
300 | function() {
301 | g[g.length - 2] = g[g.length - 2] / g.pop()
302 | },
303 | function() {
304 | g[g.length - 2] = g[g.length - 2] % g.pop()
305 | },
306 | function() {
307 | g[g.length - 2] = g[g.length - 2] | g.pop()
308 | },
309 | function() {
310 | g[g.length - 2] = g[g.length - 2] & g.pop()
311 | },
312 | function() {
313 | g[g.length - 2] = g[g.length - 2] ^ g.pop()
314 | },
315 | function() {
316 | g[g.length - 2] = g[g.length - 2] in g.pop()
317 | },
318 | function() {
319 | g[g.length - 2] = g[g.length - 2] instanceof g.pop()
320 | },
321 | function() {
322 | g[g[g.length - 1][0]] = void 0 === g[g[g.length - 1][0]] ? [] : g[g[g.length - 1][0]]
323 | },
324 | function() {
325 | for (var e = l[h++], u = [], n = l[h++], t = l[h++], p = [], o = 0; o < n; o++) u[l[h++]] = g[l[h++]];
326 | for (var r = 0; r < t; r++) p[r] = l[h++];
327 | g.push(function n() {
328 | var t = u.slice(0);
329 | t[0] = [this],
330 | t[1] = [arguments],
331 | t[2] = [n];
332 | for (var o = 0; o < p.length && o < arguments.length; o++) 0 < p[o] && (t[p[o]] = [arguments[o]]);
333 | return i(f, e, l, c, t)
334 | })
335 | },
336 | function() {
337 | t.push([l[h++], g.length, l[h++]])
338 | },
339 | function() {
340 | t.pop()
341 | },
342 | function() {
343 | return !! o
344 | },
345 | function() {
346 | o = null
347 | },
348 | function() {
349 | g[g.length - 1] += String.fromCharCode(l[h++])
350 | },
351 | function() {
352 | g.push("")
353 | },
354 | function() {
355 | g.push(void 0)
356 | },
357 | function() {
358 | g.push(null)
359 | },
360 | function() {
361 | g.push(!0)
362 | },
363 | function() {
364 | g.push(!1)
365 | },
366 | function() {
367 | g.length -= l[h++]
368 | },
369 | function() {
370 | g[g.length - 1] = l[h++]
371 | },
372 | function() {
373 | var n = g.pop(),
374 | t = g[g.length - 1];
375 | t[0][t[1]] = g[n[0]][0]
376 | },
377 | function() {
378 | var n = g.pop(),
379 | t = g[g.length - 1];
380 | t[0][t[1]] = n[0][n[1]]
381 | },
382 | function() {
383 | var n = g.pop(),
384 | t = g[g.length - 1];
385 | g[t[0]][0] = g[n[0]][0]
386 | },
387 | function() {
388 | var n = g.pop(),
389 | t = g[g.length - 1];
390 | g[t[0]][0] = n[0][n[1]]
391 | },
392 | function() {
393 | g[g.length - 2] = g[g.length - 2] < g.pop()
394 | },
395 | function() {
396 | g[g.length - 2] = g[g.length - 2] <= g.pop()
397 | }];;) try {
398 | for (; ! n[l[h++]](););
399 | if (o) throw o;
400 | return g.pop()
401 | } catch(n) {
402 | var e = t.pop();
403 | if (void 0 === e) throw n;
404 | o = n,
405 | h = e[0],
406 | g.length = e[1],
407 | e[2] && (g[e[2]][0] = o)
408 | }
409 | } (120731, 0, [21, 34, 50, 100, 57, 50, 102, 50, 98, 99, 101, 52, 54, 97, 52, 99, 55, 56, 52, 49, 57, 54, 57, 49, 56, 98, 102, 100, 100, 48, 48, 55, 55, 102, 2, 10, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 61, 8, 9, 48, 61, 9, 9, 48, 4, 21, 427, 54, 2, 15, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 61, 8, 9, 48, 61, 9, 9, 48, 61, 10, 9, 48, 61, 11, 9, 48, 61, 12, 9, 48, 61, 13, 9, 48, 61, 14, 9, 48, 61, 10, 9, 55, 54, 97, 54, 98, 54, 99, 54, 100, 54, 101, 54, 102, 54, 103, 54, 104, 54, 105, 54, 106, 54, 107, 54, 108, 54, 109, 54, 110, 54, 111, 54, 112, 54, 113, 54, 114, 54, 115, 54, 116, 54, 117, 54, 118, 54, 119, 54, 120, 54, 121, 54, 122, 54, 48, 54, 49, 54, 50, 54, 51, 54, 52, 54, 53, 54, 54, 54, 55, 54, 56, 54, 57, 13, 4, 61, 11, 9, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 102, 54, 108, 54, 111, 54, 111, 54, 114, 14, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 114, 54, 97, 54, 110, 54, 100, 54, 111, 54, 109, 14, 25, 0, 3, 4, 9, 11, 3, 3, 9, 11, 39, 3, 1, 38, 40, 3, 3, 9, 11, 38, 25, 1, 13, 4, 61, 12, 9, 55, 13, 4, 61, 13, 9, 3, 0, 13, 4, 4, 3, 13, 9, 11, 3, 11, 9, 11, 66, 22, 306, 4, 21, 422, 24, 4, 3, 14, 9, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 102, 54, 108, 54, 111, 54, 111, 54, 114, 14, 55, 54, 77, 54, 97, 54, 116, 54, 104, 8, 55, 54, 114, 54, 97, 54, 110, 54, 100, 54, 111, 54, 109, 14, 25, 0, 3, 10, 9, 55, 54, 108, 54, 101, 54, 110, 54, 103, 54, 116, 54, 104, 15, 10, 40, 25, 1, 13, 4, 61, 12, 9, 6, 11, 3, 10, 9, 3, 14, 9, 11, 15, 10, 38, 13, 4, 61, 13, 9, 6, 11, 6, 5, 1, 5, 0, 3, 1, 38, 13, 4, 61, 0, 5, 0, 43, 4, 21, 291, 61, 3, 12, 9, 11, 0, 3, 9, 9, 49, 72, 0, 2, 3, 4, 13, 4, 61, 8, 9, 21, 721, 3, 2, 8, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 4, 55, 54, 115, 54, 101, 54, 108, 54, 102, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 510, 4, 21, 523, 22, 4, 55, 54, 115, 54, 101, 54, 108, 54, 102, 8, 10, 0, 55, 54, 119, 54, 105, 54, 110, 54, 100, 54, 111, 54, 119, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 566, 4, 21, 583, 3, 4, 55, 54, 119, 54, 105, 54, 110, 54, 100, 54, 111, 54, 119, 8, 10, 0, 55, 54, 103, 54, 108, 54, 111, 54, 98, 54, 97, 54, 108, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 626, 4, 21, 643, 25, 4, 55, 54, 103, 54, 108, 54, 111, 54, 98, 54, 97, 54, 108, 8, 10, 0, 55, 54, 69, 54, 114, 54, 114, 54, 111, 54, 114, 8, 55, 54, 117, 54, 110, 54, 97, 54, 98, 54, 108, 54, 101, 54, 32, 54, 116, 54, 111, 54, 32, 54, 108, 54, 111, 54, 99, 54, 97, 54, 116, 54, 101, 54, 32, 54, 103, 54, 108, 54, 111, 54, 98, 54, 97, 54, 108, 54, 32, 54, 111, 54, 98, 54, 106, 54, 101, 54, 99, 54, 116, 27, 1, 23, 56, 0, 49, 444, 0, 0, 24, 0, 13, 4, 61, 8, 9, 55, 54, 95, 54, 95, 54, 103, 54, 101, 54, 116, 54, 83, 54, 101, 54, 99, 54, 117, 54, 114, 54, 105, 54, 116, 54, 121, 54, 83, 54, 105, 54, 103, 54, 110, 15, 21, 1126, 49, 2, 14, 3, 2, 9, 48, 61, 3, 9, 48, 61, 4, 9, 48, 61, 5, 9, 48, 61, 6, 9, 48, 61, 7, 9, 48, 61, 8, 9, 48, 61, 9, 9, 48, 61, 10, 9, 48, 61, 11, 9, 48, 61, 9, 9, 55, 54, 108, 54, 111, 54, 99, 54, 97, 54, 116, 54, 105, 54, 111, 54, 110, 8, 10, 30, 55, 54, 117, 54, 110, 54, 100, 54, 101, 54, 102, 54, 105, 54, 110, 54, 101, 54, 100, 32, 28, 22, 862, 21, 932, 21, 4, 55, 54, 108, 54, 111, 54, 99, 54, 97, 54, 116, 54, 105, 54, 111, 54, 110, 8, 55, 54, 104, 54, 111, 54, 115, 54, 116, 14, 55, 54, 105, 54, 110, 54, 100, 54, 101, 54, 120, 54, 79, 54, 102, 14, 55, 54, 121, 54, 46, 54, 113, 54, 113, 54, 46, 54, 99, 54, 111, 54, 109, 25, 1, 3, 0, 3, 1, 39, 32, 22, 963, 4, 55, 54, 67, 54, 74, 54, 66, 54, 80, 54, 65, 54, 67, 54, 114, 54, 82, 54, 117, 54, 78, 54, 121, 54, 55, 21, 974, 50, 4, 3, 12, 9, 11, 3, 8, 3, 10, 24, 2, 13, 4, 61, 10, 9, 3, 13, 9, 55, 54, 95, 54, 95, 54, 115, 54, 105, 54, 103, 54, 110, 54, 95, 54, 104, 54, 97, 54, 115, 54, 104, 54, 95, 54, 50, 54, 48, 54, 50, 54, 48, 54, 48, 54, 51, 54, 48, 54, 53, 15, 10, 22, 1030, 21, 1087, 22, 4, 3, 13, 9, 55, 54, 95, 54, 95, 54, 115, 54, 105, 54, 103, 54, 110, 54, 95, 54, 104, 54, 97, 54, 115, 54, 104, 54, 95, 54, 50, 54, 48, 54, 50, 54, 48, 54, 48, 54, 51, 54, 48, 54, 53, 15, 3, 9, 9, 11, 3, 3, 9, 11, 38, 25, 1, 13, 4, 61, 11, 9, 3, 12, 9, 11, 3, 10, 3, 53, 3, 37, 39, 24, 2, 13, 4, 4, 55, 54, 122, 54, 122, 54, 97, 3, 11, 9, 11, 38, 3, 10, 9, 11, 38, 0, 49, 771, 2, 1, 12, 9, 13, 8, 3, 12, 4, 4, 56, 0], n);
410 | var t = n.__getSecuritySign;
411 | losenine=t;
412 | return t
413 | });
414 |
415 | function test(){
416 | return losenine("123");
417 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # crack-JS-crawl
2 | 破解python爬虫过程中遇到的JS加密问题
3 |
4 | # 对JS破解和爬虫逆向感兴趣的同学
5 | # 《反爬虫AST原理与还原混淆实战》,淘宝,京东,当当全网有售,相信会对大家有所帮助!
6 | # 新书《Android应用安全实战》机械工业出版社,全网有售!
7 |
8 | ## 教程[《反爬虫JS安全防护与逆向分析手册》](https://github.com/LoseNine/Restore-JS)
9 | ### 用于学习Chrome调试技巧,JS解密与代码AST混淆还原的教程。
10 |
11 | #### 2022年
12 | - [x] 拼多多——anti_content(补环境已注释)
13 | - [x] Boss直聘——zp_token(补环境已注释)
14 | - [x] QQ音乐——sign
15 | - [x] 酷狗——kg_mid/dfid
16 | - [x] 唯品会——mars_cid
17 | - [x] 知乎——x-zse-96
18 | - [x] 极验——滑块w
19 |
20 | #### 2020年已完成
21 | - [x] B站登录——password
22 | - [x] 房天下登录——password
23 | - [x] 淘宝登录——password
24 | - [x] 天安保险登录——password
25 | - [x] QQ音乐——sign
26 | - [x] 一键解析——sojson调试
27 | - [x] 财联社——password
28 | - [x] 中国裁判文书网 2020-06-30版本
29 |
30 | #### 2019年已完成
31 | - [x] 微博登录
32 | - [x] 有道翻译
33 | - [x] 网易登录
34 | - [x] 微信公众号登录
35 | - [x] 空中网登录
36 | - [x] 今目标登录
37 | - [x] 云就业登录
38 | - [x] WPS登录
39 | - [x] 全国中等职业学校登录
40 | - [x] 重庆科技资源共享登录
41 | - [x] 网易云音乐下载
42 |
43 | ####
44 | - 获取关键参数的JS代码
45 |
46 |
--------------------------------------------------------------------------------
/WPS/wps.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LoseNine/Crack-JS-Spider/9d36933c032b47498e09f2451624ebfd2645b825/WPS/wps.js
--------------------------------------------------------------------------------
/b站登录/bilibili.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LoseNine/Crack-JS-Spider/9d36933c032b47498e09f2451624ebfd2645b825/b站登录/bilibili.js
--------------------------------------------------------------------------------
/一键解析/yjjx.js:
--------------------------------------------------------------------------------
1 | this.window=this;
2 | var result = function() {
3 | var _0x4723ab = 516;
4 | var _0x53a6a2="LRrW";
5 | var _0x3ff0c7 = "OsKyaBY3w6h8w7zCnnYLcw==";
6 |
7 | var _0x30c491 = "b01beb8e5449";
8 | return time()+"http://www.yijianjiexi.com/"+ _0x3ff0c7;
9 | }
10 |
11 | function time() {
12 | var _0x409dc6 = Date["parse"](new Date())["toString"]();
13 | _0x409dc6 = _0x409dc6["substr"](0, 10);
14 | return _0x409dc6;
15 | }
--------------------------------------------------------------------------------
/中国裁判文书网/cpws.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LoseNine/Crack-JS-Spider/9d36933c032b47498e09f2451624ebfd2645b825/中国裁判文书网/cpws.js
--------------------------------------------------------------------------------
/云就业企业校招管理平台/yjy.js:
--------------------------------------------------------------------------------
1 | var chrsz = 8;
2 | var hexcase = 0;
3 | function safe_add(x, y) {
4 | var lsw = (x & 0xFFFF) + (y & 0xFFFF);
5 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
6 | return (msw << 16) | (lsw & 0xFFFF);
7 | }
8 | function bit_rol(num, cnt) {
9 | return (num << cnt) | (num >>> (32 - cnt));
10 | }
11 | function md5_cmn(q, a, b, x, s, t) {
12 | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
13 | }
14 | function md5_ff(a, b, c, d, x, s, t) {
15 | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
16 | }
17 | function md5_gg(a, b, c, d, x, s, t) {
18 | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
19 | }
20 | function md5_hh(a, b, c, d, x, s, t) {
21 | return md5_cmn(b ^ c ^ d, a, b, x, s, t);
22 | }
23 |
24 | function md5_ii(a, b, c, d, x, s, t) {
25 | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
26 | }
27 |
28 | function core_md5(x, len) {
29 | /* append padding */
30 | x[len >> 5] |= 0x80 << ((len) % 32);
31 | x[(((len + 64) >>> 9) << 4) + 14] = len;
32 |
33 | var a = 1732584193;
34 | var b = -271733879;
35 | var c = -1732584194;
36 | var d = 271733878;
37 |
38 | for (var i = 0; i < x.length; i += 16) {
39 | var olda = a;
40 | var oldb = b;
41 | var oldc = c;
42 | var oldd = d;
43 |
44 | a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
45 | d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
46 | c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
47 | b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
48 | a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
49 | d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
50 | c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
51 | b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
52 | a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
53 | d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
54 | c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
55 | b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
56 | a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
57 | d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
58 | c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
59 | b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
60 |
61 | a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
62 | d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
63 | c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
64 | b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
65 | a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
66 | d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
67 | c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
68 | b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
69 | a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
70 | d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
71 | c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
72 | b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
73 | a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
74 | d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
75 | c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
76 | b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
77 |
78 | a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
79 | d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
80 | c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
81 | b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
82 | a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
83 | d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
84 | c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
85 | b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
86 | a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
87 | d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
88 | c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
89 | b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
90 | a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
91 | d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
92 | c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
93 | b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
94 |
95 | a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
96 | d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
97 | c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
98 | b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
99 | a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
100 | d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
101 | c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
102 | b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
103 | a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
104 | d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
105 | c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
106 | b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
107 | a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
108 | d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
109 | c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
110 | b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
111 |
112 | a = safe_add(a, olda);
113 | b = safe_add(b, oldb);
114 | c = safe_add(c, oldc);
115 | d = safe_add(d, oldd);
116 | }
117 | return Array(a, b, c, d);
118 |
119 | }
120 |
121 | function binl2hex(binarray) {
122 | var hex_tab = hexcase ? "0123456789ABCDEF": "0123456789abcdef";
123 | var str = "";
124 | for (var i = 0; i < binarray.length * 4; i++) {
125 | str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF);
126 | }
127 | return str;
128 | }
129 | function str2binl(str) {
130 | var bin = Array();
131 | var mask = (1 << chrsz) - 1;
132 | for (var i = 0; i < str.length * chrsz; i += chrsz) bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32);
133 | return bin;
134 | }
135 | hex_md5 = function(s) {
136 | return binl2hex(core_md5(str2binl(s), s.length * chrsz));
137 | }
138 |
139 | function getpwd() {
140 |
141 | return hex_md5('123456');
142 | }
--------------------------------------------------------------------------------
/今目标/jmb.py:
--------------------------------------------------------------------------------
1 | import hashlib
2 | import requests
3 |
4 |
5 | def login():
6 | headers={
7 | 'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'
8 | }
9 | url='https://sso.jingoal.com/oauth/authorize?client_id=jmbmgtweb&response_type=code&state=%7Baccess_count%3A1%7D&locale=zh_CN&redirect_uri=https%3A%2F%2Fweb.jingoal.com%2F'
10 | data={
11 | 'login_type': 'default',
12 | 'username': 18888888888,
13 | 'password': hashlib.sha1('123456789'.encode()).hexdigest()
14 | }
15 | html=requests.post(url,data=data,headers=headers)
16 | print(html.text)
17 |
18 | if __name__ == '__main__':
19 | login()
--------------------------------------------------------------------------------
/全国中等职业学校学生管理信息系统/zy.js:
--------------------------------------------------------------------------------
1 | var salt = '1#2$3%4(5)6@7!poeeww$3%4(5)djjkkldss';
2 | var hexcase = 0;
3 | var b64pad = "";
4 | var chrsz = 8;
5 | function hex_md5(s) {
6 | return binl2hex(core_md5(str2binl(s), s.length * chrsz));
7 | }
8 | function b64_md5(s) {
9 | return binl2b64(core_md5(str2binl(s), s.length * chrsz));
10 | }
11 | function str_md5(s) {
12 | return binl2str(core_md5(str2binl(s), s.length * chrsz));
13 | }
14 | function hex_hmac_md5(key, data) {
15 | return binl2hex(core_hmac_md5(key, data));
16 | }
17 | function b64_hmac_md5(key, data) {
18 | return binl2b64(core_hmac_md5(key, data));
19 | }
20 | function str_hmac_md5(key, data) {
21 | return binl2str(core_hmac_md5(key, data));
22 | }
23 | function md5_vm_test() {
24 | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
25 | }
26 | function core_md5(x, len) {
27 | x[len >> 5] |= 0x80 << ((len) % 32);
28 | x[(((len + 64) >>> 9) << 4) + 14] = len;
29 | var a = 1732584193;
30 | var b = -271733879;
31 | var c = -1732584194;
32 | var d = 271733878;
33 | for (var i = 0; i < x.length; i += 16) {
34 | var olda = a;
35 | var oldb = b;
36 | var oldc = c;
37 | var oldd = d;
38 | a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
39 | d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
40 | c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
41 | b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
42 | a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
43 | d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
44 | c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
45 | b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
46 | a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
47 | d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
48 | c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
49 | b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
50 | a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
51 | d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
52 | c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
53 | b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
54 | a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
55 | d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
56 | c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
57 | b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
58 | a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
59 | d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
60 | c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
61 | b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
62 | a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
63 | d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
64 | c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
65 | b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
66 | a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
67 | d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
68 | c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
69 | b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
70 | a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
71 | d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
72 | c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
73 | b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
74 | a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
75 | d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
76 | c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
77 | b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
78 | a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
79 | d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
80 | c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
81 | b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
82 | a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
83 | d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
84 | c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
85 | b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
86 | a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
87 | d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
88 | c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
89 | b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
90 | a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
91 | d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
92 | c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
93 | b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
94 | a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
95 | d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
96 | c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
97 | b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
98 | a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
99 | d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
100 | c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
101 | b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
102 | a = safe_add(a, olda);
103 | b = safe_add(b, oldb);
104 | c = safe_add(c, oldc);
105 | d = safe_add(d, oldd);
106 | }
107 | return Array(a, b, c, d);
108 | }
109 | function md5_cmn(q, a, b, x, s, t) {
110 | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
111 | }
112 | function md5_ff(a, b, c, d, x, s, t) {
113 | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
114 | }
115 | function md5_gg(a, b, c, d, x, s, t) {
116 | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
117 | }
118 | function md5_hh(a, b, c, d, x, s, t) {
119 | return md5_cmn(b ^ c ^ d, a, b, x, s, t);
120 | }
121 | function md5_ii(a, b, c, d, x, s, t) {
122 | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
123 | }
124 | function core_hmac_md5(key, data) {
125 | var bkey = str2binl(key);
126 | if (bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
127 | var ipad = Array(16),
128 | opad = Array(16);
129 | for (var i = 0; i < 16; i++) {
130 | ipad[i] = bkey[i] ^ 0x36363636;
131 | opad[i] = bkey[i] ^ 0x5C5C5C5C;
132 | }
133 | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
134 | return core_md5(opad.concat(hash), 512 + 128);
135 | }
136 | function safe_add(x, y) {
137 | var lsw = (x & 0xFFFF) + (y & 0xFFFF);
138 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
139 | return (msw << 16) | (lsw & 0xFFFF);
140 | }
141 | function bit_rol(num, cnt) {
142 | return (num << cnt) | (num >>> (32 - cnt));
143 | }
144 | function str2binl(str) {
145 | var bin = Array();
146 | var mask = (1 << chrsz) - 1;
147 | for (var i = 0; i < str.length * chrsz; i += chrsz) bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32);
148 | return bin;
149 | }
150 | function binl2str(bin) {
151 | var str = "";
152 | var mask = (1 << chrsz) - 1;
153 | for (var i = 0; i < bin.length * 32; i += chrsz) str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask);
154 | return str;
155 | }
156 | function binl2hex(binarray) {
157 | var hex_tab = hexcase ? "0123456789ABCDEF": "0123456789abcdef";
158 | var str = "";
159 | for (var i = 0; i < binarray.length * 4; i++) {
160 | str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF);
161 | }
162 | return str;
163 | }
164 | function binl2b64(binarray) {
165 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
166 | var str = "";
167 | for (var i = 0; i < binarray.length * 4; i += 3) {
168 | var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF);
169 | for (var j = 0; j < 4; j++) {
170 | if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
171 | else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
172 | }
173 | }
174 | return str;
175 | }
176 | function getpwd(pwd) {
177 | return hex_md5(pwd + '{' + salt + '}');
178 | }
--------------------------------------------------------------------------------
/共赢金融/gyjr.js:
--------------------------------------------------------------------------------
1 | var __LOGIN_KEY = "VekibsWIAcfVGUBXNaQjbhvAWproJJPOQXBKcIrlSSkqWldzTt";
2 |
3 | function des(str){
4 | var c1, c2, c3;
5 | var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
6 | var i = 0, len= str.length, string = '';
7 |
8 | while (i < len){
9 | c1 = str.charCodeAt(i++) & 0xff;
10 | if (i == len){
11 | string += base64EncodeChars.charAt(c1 >> 2);
12 | string += base64EncodeChars.charAt((c1 & 0x3) << 4);
13 | string += "==";
14 | break;
15 | }
16 | c2 = str.charCodeAt(i++);
17 | if (i == len){
18 | string += base64EncodeChars.charAt(c1 >> 2);
19 | string += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
20 | string += base64EncodeChars.charAt((c2 & 0xF) << 2);
21 | string += "=";
22 | break;
23 | }
24 | c3 = str.charCodeAt(i++);
25 | string += base64EncodeChars.charAt(c1 >> 2);
26 | string += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
27 | string += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
28 | string += base64EncodeChars.charAt(c3 & 0x3F)
29 | }
30 | return string;
31 | };
32 |
33 |
34 | function aes_pwd(pwd){
35 | return des(escape(__LOGIN_KEY+"%u6570%u5b57"+pwd+"%u52a0%u5bc6"));
36 | }
37 |
38 | function getpwd(user_pwd){
39 | return aes_pwd(user_pwd)
40 | }
--------------------------------------------------------------------------------
/加密算法/AESpy.py:
--------------------------------------------------------------------------------
1 | """
2 | AES对称加密算法
3 | 高级加密标准,美国联邦政府采用的一种区块加密标准
4 | 明文通过密钥的AES函数加密
5 | 用密钥的AES解密
6 | """
--------------------------------------------------------------------------------
/加密算法/BASE64py.py:
--------------------------------------------------------------------------------
1 | import base64
2 |
3 | word='123456'
4 | encrypt=base64.encodebytes(word.encode())
5 | print(encrypt)
6 | decrypt=base64.decodebytes(encrypt)
7 | print(decrypt)
--------------------------------------------------------------------------------
/加密算法/MD5py.py:
--------------------------------------------------------------------------------
1 | import hashlib
2 | """
3 | MD5是一种信息摘要算法
4 | 从一个字符串或文件按照一定规则生成特殊字符串
5 | 特点:
6 | 1.固定长度128bit的0和1
7 | 2.按照4bit32组,每一组按16机制计算数值,字符输出
8 | 3.不可逆
9 | 4.有可能碰撞
10 | 5.长度32
11 | """
12 |
13 | def get_md5(keyword):
14 | m=hashlib.md5()
15 | m.update(keyword.encode('utf8'))
16 | print(m.hexdigest())
17 | return m.hexdigest()
18 |
19 | print(hashlib.md5('你好'.encode('utf8')).hexdigest())
--------------------------------------------------------------------------------
/加密算法/RSApy.py:
--------------------------------------------------------------------------------
1 | """
2 | RSA是一种公钥密码算法
3 | 密码分为:对称加密和 公钥加密
4 |
5 | 加密
6 | 密文=(Password^E) mod N
7 | RSA是对明文的N次方之后除以S后的余数
8 | 任何知道E和N的人都可以加密
9 | 因此E和N也就是加密的密钥,E和N的组合就是公钥
10 | 公钥=(E,N)
11 | E是加密Encryption,N是Number
12 |
13 | 解密
14 | Password=密文^D mod N
15 | 对密文进行D次方后除以N的余数就是明文
16 | 任何知道了D和N的组合就可以解密
17 | 私钥=(D,N)
18 |
19 | 公钥 E,N
20 | 私钥 D,N
21 | 密钥对 E,D,N
22 | 加密:密文=明文^E mod N
23 | 解密:明文=密文^D mod N
24 |
25 | 1.生成密钥对
26 | 求N——L——E——D
27 | N=p*q(p和q都是任何质数)
28 | L=lcm(p-1,q-1) 二者的最小公倍数
29 | 1']
30 | };
31 |
32 | window.navigator={
33 | userAgent:'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36'
34 | };
35 |
36 |
37 | window.T0 = (new Date).getTime(),
38 | window.Mar = function() {}
39 | ,
40 | Mar.stringify = function(a) {
41 | function b(a) {
42 | return '"' + a.replace(e, function(a) {
43 | var b = f[a];
44 | return "string" == typeof b ? b : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
45 | }) + '"'
46 | }
47 | function c(a) {
48 | return a < 10 ? "0" + a : a
49 | }
50 | function d(a, e) {
51 | var f, g, h, i, j = e[a], k = typeof j;
52 | switch (j && "object" == typeof j && "function" == typeof j.toJSON && (j = j.toJSON(a),
53 | k = typeof j),
54 | k) {
55 | case "string":
56 | return b(j);
57 | case "number":
58 | return isFinite(j) ? String(j) : "null";
59 | case "boolean":
60 | return String(j);
61 | case "object":
62 | if (!j)
63 | return "null";
64 | switch (Object.prototype.toString.call(j)) {
65 | case "[object Date]":
66 | return isFinite(j.valueOf()) ? '"' + j.getUTCFullYear() + "-" + c(j.getUTCMonth() + 1) + "-" + c(j.getUTCDate()) + "T" + c(j.getUTCHours()) + ":" + c(j.getUTCMinutes()) + ":" + c(j.getUTCSeconds()) + 'Z"' : "null";
67 | case "[object Array]":
68 | for (h = j.length,
69 | i = [],
70 | f = 0; f < h; f++)
71 | i.push(d(f, j) || "null");
72 | return "[" + i.join(",") + "]";
73 | default:
74 | i = [];
75 | for (f in j)
76 | Object.prototype.hasOwnProperty.call(j, f) && (g = d(f, j),
77 | g && i.push(b(f) + ":" + g));
78 | return "{" + i.join(",") + "}"
79 | }
80 | }
81 | }
82 | if (window.JSON && window.JSON.stringify)
83 | return window.JSON.stringify(a);
84 | var e = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g
85 | , f = {
86 | "\b": "\\b",
87 | "\t": "\\t",
88 | "\n": "\\n",
89 | "\f": "\\f",
90 | "\r": "\\r",
91 | '"': '\\"',
92 | "\\": "\\\\"
93 | };
94 | return d("", {
95 | "": a
96 | })
97 | }
98 | ,
99 | Mar.getUrlParam = function() {
100 | var a, b, c = {}, d = window.location.search.substring(1);
101 | if (d) {
102 | a = d.split("&");
103 | for (var e = 0, f = a.length; e < f; e++)
104 | b = a[e].split("="),
105 | c[b[0]] = b[1]
106 | }
107 | return c
108 | }
109 | ,
110 | Mar.getWapId = function() {
111 | function a(a) {
112 | var b = document.getElementsByTagName;
113 | for (i in b)
114 | if ("undefined" != typeof b[i].name && b[i].name.toLowerCase() == a)
115 | return b[i].content;
116 | return null
117 | }
118 | var b = encodeURIComponent(a("vip-page-default-wapid"));
119 | return "null" != b && b ? encodeURIComponent(b) : ""
120 | }
121 | ,
122 | Mar.getOSVersion = function() {
123 | function a(a, b) {
124 | for (var c in b)
125 | if (b[c] == a)
126 | return c;
127 | return -1
128 | }
129 | var b, c, d, e, f, g = window.navigator.userAgent, h = {
130 | os: "",
131 | ver: ""
132 | };
133 | return b = g.match(/\(([^)]*)\)/),
134 | c = (b || [])[1] || "",
135 | c && c.match(/iPhone/i) ? (h.os = "IOS",
136 | e = "OS") : (h.os = "Android",
137 | e = "Android"),
138 | d = c.split(" "),
139 | f = a(e, d),
140 | f != -1 && (h.ver = d[++f],
141 | h.ver = h.ver && h.ver.replace(/[_]/g, ".")),
142 | h
143 | }
144 | ;
145 | var a;
146 | Mar.Base = {},
147 | a = Mar.Base,
148 | a.local = document.location,
149 | a.domain = document.domain,
150 | a.docEle = document.documentElement,
151 | a.context = "css1compat" === document.compatMode.toLowerCase() ? document.body : a.docEle,
152 | a.monitor = window.screen,
153 | a.href = a.local.href,
154 | a.wapId = window.Mar.getWapId(),
155 | a.osVersion = window.Mar.getOSVersion(),
156 | a.paramObj = window.Mar.getUrlParam(),
157 | a.pn = a.local.pathname.toLowerCase(),
158 | a.hn = a.local.hostname.toLowerCase(),
159 | a.ref = escape(document.referrer),
160 | a.cw = 100,
161 | a.ch = 100,
162 | a.res = 100 + "*" + 100,
163 | a.col = 100,
164 | a.w = 100,
165 | a.h = 100,
166 | a.nav = escape(navigator.userAgent.toLowerCase()),
167 | a.ce = navigator.cookieEnabled ? 1 : 0,
168 | a.title = escape(document.title);
169 |
170 |
171 | Mar.Random = {
172 | guid: function() {
173 | for (var a = 0, b = []; a < 8; )
174 | b.push((65536 * (1 + Math.random()) | 0).toString(16).substring(1)),
175 | a++;
176 | return b.join("").toUpperCase()
177 | },
178 | guid2: function() {
179 | function a() {
180 | return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
181 | }
182 | return a() + a() + "-" + a() + "-" + a() + "-" + a() + "-" + a() + a() + a()
183 | },
184 | guid3: function() {
185 | function a(a, c, d) {
186 | var e = b(a, 16)
187 | , f = new Array
188 | , g = ""
189 | , h = 0;
190 | for (h = 0; h < e.length; h++)
191 | f.push(e.substring(h, h + 1));
192 | for (h = Math.floor(c / 4); h <= Math.floor(d / 4); h++)
193 | g += f[h] && "" != f[h] ? f[h] : "0";
194 | return g
195 | }
196 | function b(a, b) {
197 | return a.toString(b)
198 | }
199 | function c(a) {
200 | return Math.floor(Math.random() * (a + 1))
201 | }
202 | var d = new Date(1582,10,15,0,0,0,0)
203 | , e = new Date
204 | , f = e.getTime() - d.getTime()
205 | , g = a(f, 0, 31)
206 | , h = a(f, 32, 47)
207 | , i = a(f, 48, 59) + "1"
208 | , j = a(c(4095), 0, 7)
209 | , k = a(c(4095), 0, 7)
210 | , l = a(c(8191), 0, 7) + a(c(8191), 8, 15) + a(c(8191), 0, 7) + a(c(8191), 8, 15) + a(c(8191), 0, 15);
211 | return g + h + i + j + k + l
212 | },
213 | rand: function(a) {
214 | var b = "0123456789abcdef"
215 | , c = ""
216 | , d = 0;
217 | for (a = a || 32; d < a; d++)
218 | c += b.charAt(Math.ceil(1e8 * Math.random()) % b.length);
219 | return c
220 | }
221 | };
222 |
223 | Mar.Util = {
224 | detect: function() {
225 | var a, b, c, d = !1, e = window.navigator.userAgent;
226 | return /MSIE/.test(e) ? (b = "MSIE",
227 | /IEMobile/.test(e) && (d = !0),
228 | c = /MSIE \d+[.]\d+/.exec(e)[0].split(" ")[1]) : navigator.userAgent.match(/Trident.*rv[ :]*11\./) ? (b = "MSIE",
229 | c = 11) : /Chrome/.test(e) ? (b = "Chrome",
230 | c = /Chrome\/[\d\.]+/.exec(e)[0].split("/")[1]) : /Opera/.test(e) ? (b = "Opera",
231 | (/mini/.test(e) || /Mobile/.test(e)) && (d = !0)) : /Android/.test(e) ? (b = "Android Webkit Browser",
232 | d = !0) : /Firefox/.test(e) ? (b = "Firefox",
233 | /Fennec/.test(e) && (d = !0),
234 | c = /Firefox\/[\.\d]+/.exec(e)[0].split("/")[1]) : /Safari/.test(e) && (b = "Safari",
235 | (/iPhone/.test(e) || /iPad/.test(e) || /iPod/.test(e)) && (d = !0)),
236 | c || (c = /Version\/[\.\d]+/.exec(e),
237 | c = c ? c[0].split("/")[1] : void 0),
238 | a = {
239 | browser: b,
240 | version: c,
241 | mobile: d
242 | }
243 | },
244 | isElement: function(a) {
245 | return !(!a || "function" != typeof HTMLElement && "object" != typeof HTMLElement || !(a instanceof HTMLElement)) || !(!a || !a.nodeType || 1 !== a.nodeType)
246 | },
247 | getProtocal: function() {
248 | return document.domain.toLowerCase().indexOf("vip.vip.com") !== -1 ? 0 === document.location.href.toLowerCase().indexOf("https://") ? "https://" : "http://" : "https://"
249 | },
250 | encryptCid: function(a) {
251 | var b = a.split("_")
252 | , c = b[0]
253 | , d = b[1];
254 | if (!c || !d)
255 | return a;
256 | for (var e = 0, f = c.length, g = 0; g < f; g++)
257 | e += parseInt(c[g]);
258 | for (var h = e % 32, i = e, j = d.length, g = 0; g < j; g++)
259 | g !== h && (i += parseInt(d[g], 16));
260 | var k = (i % 16).toString(16);
261 | return c + "_" + d.substr(0, h) + k.toString() + d.substr(h + 1, j)
262 | },
263 | getParameterByName: function(a) {
264 | a = a.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
265 | var b = "[\\?&]" + a + "=([^]*)"
266 | , c = new RegExp(b)
267 | , d = c.exec(window.location.search);
268 | return null == d ? "" : decodeURIComponent(d[1].replace(/\+/g, " "))
269 | },
270 | getConfig: function(a) {
271 | return "MarConfig"in window && window.MarConfig && window.MarConfig[a] ? window.MarConfig[a] : ""
272 | },
273 | pad: function(a, b) {
274 | for (var c = a.toString().length; c < b; )
275 | a = "0" + a,
276 | c++;
277 | return a
278 | },
279 | getDomain: function() {
280 | var a, b = document.domain.toLowerCase();
281 | return a = b.indexOf("vipshop.com") !== -1 ? "vipshop.com" : b.indexOf("appvipshop.com") !== -1 ? "appvipshop.com" : b.indexOf("vipglobal.hk") !== -1 ? "vipglobal.hk" : b.indexOf("vpal.com") !== -1 ? "vpal.com" : b.indexOf("ebatong.com") !== -1 ? "ebatong.com" : b.indexOf("vip.vip.com") !== -1 ? "vip.vip.com" : "vip.com"
282 | },
283 | parseURL: function(a) {
284 | var b = document.createElement("a");
285 | return b.href = a,
286 | {
287 | source: a,
288 | protocol: b.protocol.replace(":", ""),
289 | host: b.hostname,
290 | port: b.port,
291 | query: b.search,
292 | params: function() {
293 | for (var a, c = {}, d = b.search.replace(/^\?/, "").split("&"), e = d.length, f = 0; f < e; f++)
294 | d[f] && (a = d[f].split("="),
295 | c[a[0]] = a[1]);
296 | return c
297 | }(),
298 | file: (b.pathname.match(/\/([^\/?#]+)$/i) || [, ""])[1],
299 | hash: b.hash.replace("#", ""),
300 | path: b.pathname.replace(/^([^\/])/, "/$1"),
301 | relative: (b.href.match(/tps?:\/\/[^\/]+(.+)/) || [, ""])[1],
302 | segments: b.pathname.replace(/^\//, "").split("/")
303 | }
304 | },
305 | getTimeSpan: function() {
306 | return parseInt(Mar.Util.getTimeSpanMillisecond() / 1e3)
307 | },
308 | getTimeSpanMillisecond: function() {
309 | return (new Date).getTime()
310 | },
311 | Debounce: function(a, b, c) {
312 | var d, e, f, g, h, i = Date.now || function() {
313 | return (new Date).getTime()
314 | }
315 | , j = function() {
316 | var k = i() - g;
317 | k < b && k >= 0 ? d = setTimeout(j, b - k) : (d = null,
318 | c || (h = a.apply(f, e),
319 | d || (f = e = null)))
320 | };
321 | return function() {
322 | f = this,
323 | e = arguments,
324 | g = i();
325 | var k = c && !d;
326 | return d || (d = setTimeout(j, b)),
327 | k && (h = a.apply(f, e),
328 | f = e = null),
329 | h
330 | }
331 | },
332 | getQueryStringByName: function(a, b) {
333 | var c = b.match(new RegExp("[?&]" + a + "=([^&^#]+)","i"));
334 | return null == c || c.length < 1 ? "" : c[1]
335 | },
336 | getMetaByName: function(a) {
337 | var b = document.getElementsByTagName("meta");
338 | for (i in b)
339 | if ("undefined" != typeof b[i].name && b[i].name.toLowerCase() == a)
340 | return b[i].content;
341 | return null
342 | },
343 | isDetailPage: function(a) {
344 | var b = !1;
345 | return !a || a.indexOf("shop.vipshop.com/detail") === -1 && a.indexOf("www.vip.com/detail") === -1 && a.indexOf("detail.vipglobal.hk") === -1 || (b = !0),
346 | b
347 | },
348 | urlEncodedFormString: function(a) {
349 | var b = "";
350 | for (var c in a)
351 | Object.hasOwnProperty.call(a, c) && (b = b + "&" + c + "=" + a[c]);
352 | return b.replace(/^&/, "")
353 | },
354 | urlEncodedFormStringWithEncode: function(a) {
355 | var b = "";
356 | for (var c in a)
357 | Object.hasOwnProperty.call(a, c) && (b = b + "&" + c + "=" + encodeURIComponent(a[c]));
358 | return b.replace(/^&/, "")
359 | }
360 | };
361 |
362 | function mscid() {
363 | var k = Mar.Util.encryptCid(Mar.Util.pad((new Date).getTime(), 13) + "_" + Mar.Random.rand())
364 | console.log(k)
365 | return k;
366 | }
367 | mscid();
--------------------------------------------------------------------------------
/微信公众号/wx.js:
--------------------------------------------------------------------------------
1 | function getpass(n, r, t) {
2 | function d(n, r) {
3 | var t = (65535 & n) + (65535 & r) ;return (n >> 16) + (r >> 16) + (t >> 16) << 16 | 65535 & t
4 | };
5 | function f(n, r, t, e, u, o) {
6 | return d(function(n, r) {
7 | return n << r | n >>> 32 - r
8 | } (d(d(r, n), d(e, o)), u), t)
9 | }
10 | function g(n, r, t, e, u, o, c) {
11 | return f(r & t | ~r & e, n, r, u, o, c)
12 | }
13 | function l(n, r, t, e, u, o, c) {
14 | return f(r & e | t & ~e, n, r, u, o, c)
15 | }
16 | function v(n, r, t, e, u, o, c) {
17 | return f(r ^ t ^ e, n, r, u, o, c)
18 | }
19 | function s(n, r, t, e, u, o, c) {
20 | return f(t ^ (r | ~e), n, r, u, o, c)
21 | }
22 | function i(n, r) {
23 | n[r >> 5] |= 128 << r % 32,
24 | n[14 + (r + 64 >>> 9 << 4)] = r
25 | var t, e, u, o, c, f = 1732584193,
26 | i = -271733879,
27 | a = -1732584194,
28 | h = 271733878
29 | for (t = 0; t < n.length; t += 16) i = s(i = s(i = s(i = s(i = v(i = v(i = v(i = v(i = l(i = l(i = l(i = l(i = g(i = g(i = g(i = g(u = i, a = g(o = a, h = g(c = h, f = g(e = f, i, a, h, n[t], 7, -680876936), i, a, n[t + 1], 12, -389564586), f, i, n[t + 2], 17, 606105819), h, f, n[t + 3], 22, -1044525330), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 4], 7, -176418897), i, a, n[t + 5], 12, 1200080426), f, i, n[t + 6], 17, -1473231341), h, f, n[t + 7], 22, -45705983), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 8], 7, 1770035416), i, a, n[t + 9], 12, -1958414417), f, i, n[t + 10], 17, -42063), h, f, n[t + 11], 22, -1990404162), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 12], 7, 1804603682), i, a, n[t + 13], 12, -40341101), f, i, n[t + 14], 17, -1502002290), h, f, n[t + 15], 22, 1236535329), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 1], 5, -165796510), i, a, n[t + 6], 9, -1069501632), f, i, n[t + 11], 14, 643717713), h, f, n[t], 20, -373897302), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 5], 5, -701558691), i, a, n[t + 10], 9, 38016083), f, i, n[t + 15], 14, -660478335), h, f, n[t + 4], 20, -405537848), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 9], 5, 568446438), i, a, n[t + 14], 9, -1019803690), f, i, n[t + 3], 14, -187363961), h, f, n[t + 8], 20, 1163531501), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 13], 5, -1444681467), i, a, n[t + 2], 9, -51403784), f, i, n[t + 7], 14, 1735328473), h, f, n[t + 12], 20, -1926607734), a = v(a, h = v(h, f = v(f, i, a, h, n[t + 5], 4, -378558), i, a, n[t + 8], 11, -2022574463), f, i, n[t + 11], 16, 1839030562), h, f, n[t + 14], 23, -35309556), a = v(a, h = v(h, f = v(f, i, a, h, n[t + 1], 4, -1530992060), i, a, n[t + 4], 11, 1272893353), f, i, n[t + 7], 16, -155497632), h, f, n[t + 10], 23, -1094730640), a = v(a, h = v(h, f = v(f, i, a, h, n[t + 13], 4, 681279174), i, a, n[t], 11, -358537222), f, i, n[t + 3], 16, -722521979), h, f, n[t + 6], 23, 76029189), a = v(a, h = v(h, f = v(f, i, a, h, n[t + 9], 4, -640364487), i, a, n[t + 12], 11, -421815835), f, i, n[t + 15], 16, 530742520), h, f, n[t + 2], 23, -995338651), a = s(a, h = s(h, f = s(f, i, a, h, n[t], 6, -198630844), i, a, n[t + 7], 10, 1126891415), f, i, n[t + 14], 15, -1416354905), h, f, n[t + 5], 21, -57434055), a = s(a, h = s(h, f = s(f, i, a, h, n[t + 12], 6, 1700485571), i, a, n[t + 3], 10, -1894986606), f, i, n[t + 10], 15, -1051523), h, f, n[t + 1], 21, -2054922799), a = s(a, h = s(h, f = s(f, i, a, h, n[t + 8], 6, 1873313359), i, a, n[t + 15], 10, -30611744), f, i, n[t + 6], 15, -1560198380), h, f, n[t + 13], 21, 1309151649), a = s(a, h = s(h, f = s(f, i, a, h, n[t + 4], 6, -145523070), i, a, n[t + 11], 10, -1120210379), f, i, n[t + 2], 15, 718787259), h, f, n[t + 9], 21, -343485551),
30 | f = d(f, e),
31 | i = d(i, u),
32 | a = d(a, o),
33 | h = d(h, c) ;return [f, i, a, h]
34 | };
35 | function a(n) {
36 | var r, t = ""
37 | for (r = 0; r < 32 * n.length; r += 8) t += String.fromCharCode(n[r >> 5] >>> r % 32 & 255) ;return t
38 | }
39 | function h(n) {
40 | var r, t = []
41 | for (t[(n.length >> 2) - 1] = void 0, r = 0; r < t.length; r += 1) t[r] = 0
42 | for (r = 0; r < 8 * n.length; r += 8) t[r >> 5] |= (255 & n.charCodeAt(r / 8)) << r % 32
43 | return t
44 | }
45 | function e(n) {
46 | var r, t, e = "0123456789abcdef",
47 | u = ""
48 | for (t = 0; t < n.length; t += 1) r = n.charCodeAt(t),
49 | u += e.charAt(r >>> 4 & 15) + e.charAt(15 & r) ;return u
50 | }
51 | function u(n) {
52 | return unescape(encodeURIComponent(n))
53 | }
54 | function o(n) {
55 | return function(n) {
56 | return a(i(h(n), 8 * n.length))
57 | } (u(n))
58 | }
59 | function c(n, r) {
60 | return function(n, r) {
61 | var t, e, u = h(n),
62 | o = [],
63 | c = []
64 | for (o[15] = c[15] = void 0, 16 < u.length && (u = i(u, 8 * n.length)), t = 0; t < 16; t += 1) o[t] = 909522486 ^ u[t],
65 | c[t] = 1549556828 ^ u[t]
66 | return e = i(o.concat(h(r)), 512 + 8 * r.length),
67 | a(i(c.concat(e), 640))
68 | } (u(n), u(r))
69 | }
70 | function exports(n, r, t) {
71 | return r ? t ? c(r, n) : function(n, r) {
72 | return e(c(n, r))
73 | } (r, n) : t ? o(n) : function(n) {
74 | return e(o(n))
75 | } (n)
76 | };
77 |
78 | return e(o(n))
79 | };
80 |
--------------------------------------------------------------------------------
/微信公众号/wx.py:
--------------------------------------------------------------------------------
1 | import execjs
2 |
3 | def getpwd(pwd):
4 | with open('wx.js','r',encoding='utf8')as f:
5 | content=f.read()
6 | jsdata=execjs.compile(content)
7 | result=jsdata.call('getpass',pwd)
8 | return result
9 |
10 | print(getpwd('123456'))
--------------------------------------------------------------------------------
/微博/weibo:
--------------------------------------------------------------------------------
1 | *su: MTM1MjA3OTEwOTk=
2 | servertime: 1581132671
3 | nonce: U7T2CN
4 | rsakv: 1330428213
5 | *sp: 1e5035c1f43ddb5950922e9b3220902739c27940223cf07c50b2a9e3a2eb30bc8aa1e11253e69e67c3ea0dfa1fff83933c9b846dd8211896422ace8ccab6b2b55f537b48b938d9a49f2e224e51a08859f6c08196f577522af4306e1acb76bcfb4709035a8e7f5b33f05ce8906576a5fc32994dbf71f83200f01c6fa7641df7b2
6 | prelt: 92
7 |
8 | 1.nonce查找后发现直接返回,不用管
9 | 2.prelt存在时间函数之中
10 | me.preloginCallBack = function(a) {
11 | if (a && a.retcode == 0) {
12 | me.setServerTime(a.servertime);
13 | me.nonce = a.nonce;
14 | me.rsaPubkey = a.pubkey;
15 | me.rsakv = a.rsakv;
16 | pcid = a.pcid;
17 | preloginTime = (new Date).getTime() - preloginTimeStart - (parseInt(a.exectime, 10) || 0)
18 | }
19 | typeof b == "function" && b(a)
20 | }
21 | 运行后缺少a.exectime
22 | 我们可以发现a都是从me中获取,而me里有nonce,所以是直接返回的一个
23 | function test() {
24 | preloginTimeStart = (new Date).getTime();
25 | return (new Date).getTime() - preloginTimeStart - (parseInt(73, 10) || 0);
26 | }
27 | 仔细查看发现仅仅是将数字十进制话,所以直接获取exectime就好
28 | 3.sp
29 | var f = new sinaSSOEncoder.RSAKey;
30 | f.setPublic(me.rsaPubkey, "10001");
31 | b = f.encrypt([me.servertime, me.nonce].join("\t") + "\n" + b)
32 | 密码经过了rsa公钥加密后就是b,一开始的b就是密码
33 | 4.su就是用户名
34 | base64加密
--------------------------------------------------------------------------------
/微博/weibo.js:
--------------------------------------------------------------------------------
1 | var navigator = {};
2 | var sinaSSOEncoder = sinaSSOEncoder || {};
3 |
4 | (function() {
5 | function bt(a) {
6 | var b = bp(a, this.n.bitLength() + 7 >> 3);
7 | if (b == null) return null;
8 | var c = this.doPublic(b);
9 | if (c == null) return null;
10 | var d = c.toString(16);
11 | return (d.length & 1) == 0 ? d: "0" + d
12 | }
13 | function bs(a) {
14 | return a.modPowInt(this.e, this.n)
15 | }
16 | function br(a, b) {
17 | if (a != null && b != null && a.length > 0 && b.length > 0) {
18 | this.n = bm(a, 16);
19 | this.e = parseInt(b, 16)
20 | } else alert("Invalid RSA public key")
21 | }
22 | function bq() {
23 | this.n = null;
24 | this.e = 0;
25 | this.d = null;
26 | this.p = null;
27 | this.q = null;
28 | this.dmp1 = null;
29 | this.dmq1 = null;
30 | this.coeff = null
31 | }
32 | function bp(a, b) {
33 | if (b < a.length + 11) {
34 | alert("Message too long for RSA");
35 | return null
36 | }
37 | var c = [],
38 | e = a.length - 1;
39 | while (e >= 0 && b > 0) {
40 | var f = a.charCodeAt(e--);
41 | if (f < 128) c[--b] = f;
42 | else if (f > 127 && f < 2048) {
43 | c[--b] = f & 63 | 128;
44 | c[--b] = f >> 6 | 192
45 | } else {
46 | c[--b] = f & 63 | 128;
47 | c[--b] = f >> 6 & 63 | 128;
48 | c[--b] = f >> 12 | 224
49 | }
50 | }
51 | c[--b] = 0;
52 | var g = new bl,
53 | h = [];
54 | while (b > 2) {
55 | h[0] = 0;
56 | while (h[0] == 0) g.nextBytes(h);
57 | c[--b] = h[0]
58 | }
59 | c[--b] = 2;
60 | c[--b] = 0;
61 | return new d(c)
62 | }
63 | function bo(a) {
64 | return a < 16 ? "0" + a.toString(16) : a.toString(16)
65 | }
66 | function bn(a, b) {
67 | var c = "",
68 | d = 0;
69 | while (d + b < a.length) {
70 | c += a.substring(d, d + b) + "\n";
71 | d += b
72 | }
73 | return c + a.substring(d, a.length)
74 | }
75 | function bm(a, b) {
76 | return new d(a, b)
77 | }
78 | function bl() {}
79 | function bk(a) {
80 | var b;
81 | for (b = 0; b < a.length; ++b) a[b] = bj()
82 | }
83 | function bj() {
84 | if (bc == null) {
85 | bg();
86 | bc = ba();
87 | bc.init(bd);
88 | for (be = 0; be < bd.length; ++be) bd[be] = 0;
89 | be = 0
90 | }
91 | return bc.next()
92 | }
93 | function bg() {
94 | bf((new Date).getTime())
95 | }
96 | function bf(a) {
97 | bd[be++] ^= a & 255;
98 | bd[be++] ^= a >> 8 & 255;
99 | bd[be++] ^= a >> 16 & 255;
100 | bd[be++] ^= a >> 24 & 255;
101 | be >= bb && (be -= bb)
102 | }
103 | function ba() {
104 | return new Z
105 | }
106 | function _() {
107 | var a;
108 | this.i = this.i + 1 & 255;
109 | this.j = this.j + this.S[this.i] & 255;
110 | a = this.S[this.i];
111 | this.S[this.i] = this.S[this.j];
112 | this.S[this.j] = a;
113 | return this.S[a + this.S[this.i] & 255]
114 | }
115 | function $(a) {
116 | var b, c, d;
117 | for (b = 0; b < 256; ++b) this.S[b] = b;
118 | c = 0;
119 | for (b = 0; b < 256; ++b) {
120 | c = c + this.S[b] + a[b % a.length] & 255;
121 | d = this.S[b];
122 | this.S[b] = this.S[c];
123 | this.S[c] = d
124 | }
125 | this.i = 0;
126 | this.j = 0
127 | }
128 | function Z() {
129 | this.i = 0;
130 | this.j = 0;
131 | this.S = []
132 | }
133 | function Y(a, b) {
134 | var c;
135 | a < 256 || b.isEven() ? c = new J(b) : c = new Q(b);
136 | return this.exp(a, c)
137 | }
138 | function X(a, b) {
139 | if (a > 4294967295 || a < 1) return d.ONE;
140 | var c = e(),
141 | f = e(),
142 | g = b.convert(this),
143 | h = y(a) - 1;
144 | g.copyTo(c);
145 | while (--h >= 0) {
146 | b.sqrTo(c, f);
147 | if ((a & 1 << h) > 0) b.mulTo(f, g, c);
148 | else {
149 | var i = c;
150 | c = f;
151 | f = i
152 | }
153 | }
154 | return b.revert(c)
155 | }
156 | function W() {
157 | return (this.t > 0 ? this[0] & 1 : this.s) == 0
158 | }
159 | function V(a, b, c) {
160 | a.multiplyTo(b, c);
161 | this.reduce(c)
162 | }
163 | function U(a, b) {
164 | a.squareTo(b);
165 | this.reduce(b)
166 | }
167 | function T(a) {
168 | while (a.t <= this.mt2) a[a.t++] = 0;
169 | for (var b = 0; b < this.m.t; ++b) {
170 | var c = a[b] & 32767,
171 | d = c * this.mpl + ((c * this.mph + (a[b] >> 15) * this.mpl & this.um) << 15) & a.DM;
172 | c = b + this.m.t;
173 | a[c] += this.m.am(0, d, a, b, 0, this.m.t);
174 | while (a[c] >= a.DV) {
175 | a[c] -= a.DV;
176 | a[++c]++
177 | }
178 | }
179 | a.clamp();
180 | a.drShiftTo(this.m.t, a);
181 | a.compareTo(this.m) >= 0 && a.subTo(this.m, a)
182 | }
183 | function S(a) {
184 | var b = e();
185 | a.copyTo(b);
186 | this.reduce(b);
187 | return b
188 | }
189 | function R(a) {
190 | var b = e();
191 | a.abs().dlShiftTo(this.m.t, b);
192 | b.divRemTo(this.m, null, b);
193 | a.s < 0 && b.compareTo(d.ZERO) > 0 && this.m.subTo(b, b);
194 | return b
195 | }
196 | function Q(a) {
197 | this.m = a;
198 | this.mp = a.invDigit();
199 | this.mpl = this.mp & 32767;
200 | this.mph = this.mp >> 15;
201 | this.um = (1 << a.DB - 15) - 1;
202 | this.mt2 = 2 * a.t
203 | }
204 | function P() {
205 | if (this.t < 1) return 0;
206 | var a = this[0];
207 | if ((a & 1) == 0) return 0;
208 | var b = a & 3;
209 | b = b * (2 - (a & 15) * b) & 15;
210 | b = b * (2 - (a & 255) * b) & 255;
211 | b = b * (2 - ((a & 65535) * b & 65535)) & 65535;
212 | b = b * (2 - a * b % this.DV) % this.DV;
213 | return b > 0 ? this.DV - b: -b
214 | }
215 | function O(a, b) {
216 | a.squareTo(b);
217 | this.reduce(b)
218 | }
219 | function N(a, b, c) {
220 | a.multiplyTo(b, c);
221 | this.reduce(c)
222 | }
223 | function M(a) {
224 | a.divRemTo(this.m, null, a)
225 | }
226 | function L(a) {
227 | return a
228 | }
229 | function K(a) {
230 | return a.s < 0 || a.compareTo(this.m) >= 0 ? a.mod(this.m) : a
231 | }
232 | function J(a) {
233 | this.m = a
234 | }
235 | function I(a) {
236 | var b = e();
237 | this.abs().divRemTo(a, null, b);
238 | this.s < 0 && b.compareTo(d.ZERO) > 0 && a.subTo(b, b);
239 | return b
240 | }
241 | function H(a, b, c) {
242 | var f = a.abs();
243 | if (! (f.t <= 0)) {
244 | var g = this.abs();
245 | if (g.t < f.t) {
246 | b != null && b.fromInt(0);
247 | c != null && this.copyTo(c);
248 | return
249 | }
250 | c == null && (c = e());
251 | var h = e(),
252 | i = this.s,
253 | j = a.s,
254 | k = this.DB - y(f[f.t - 1]);
255 | if (k > 0) {
256 | f.lShiftTo(k, h);
257 | g.lShiftTo(k, c)
258 | } else {
259 | f.copyTo(h);
260 | g.copyTo(c)
261 | }
262 | var l = h.t,
263 | m = h[l - 1];
264 | if (m == 0) return;
265 | var n = m * (1 << this.F1) + (l > 1 ? h[l - 2] >> this.F2: 0),
266 | o = this.FV / n,
267 | p = (1 << this.F1) / n,
268 | q = 1 << this.F2,
269 | r = c.t,
270 | s = r - l,
271 | t = b == null ? e() : b;
272 | h.dlShiftTo(s, t);
273 | if (c.compareTo(t) >= 0) {
274 | c[c.t++] = 1;
275 | c.subTo(t, c)
276 | }
277 | d.ONE.dlShiftTo(l, t);
278 | t.subTo(h, h);
279 | while (h.t < l) h[h.t++] = 0;
280 | while (--s >= 0) {
281 | var u = c[--r] == m ? this.DM: Math.floor(c[r] * o + (c[r - 1] + q) * p);
282 | if ((c[r] += h.am(0, u, c, s, 0, l)) < u) {
283 | h.dlShiftTo(s, t);
284 | c.subTo(t, c);
285 | while (c[r] < --u) c.subTo(t, c)
286 | }
287 | }
288 | if (b != null) {
289 | c.drShiftTo(l, b);
290 | i != j && d.ZERO.subTo(b, b)
291 | }
292 | c.t = l;
293 | c.clamp();
294 | k > 0 && c.rShiftTo(k, c);
295 | i < 0 && d.ZERO.subTo(c, c)
296 | }
297 | }
298 | function G(a) {
299 | var b = this.abs(),
300 | c = a.t = 2 * b.t;
301 | while (--c >= 0) a[c] = 0;
302 | for (c = 0; c < b.t - 1; ++c) {
303 | var d = b.am(c, b[c], a, 2 * c, 0, 1);
304 | if ((a[c + b.t] += b.am(c + 1, 2 * b[c], a, 2 * c + 1, d, b.t - c - 1)) >= b.DV) {
305 | a[c + b.t] -= b.DV;
306 | a[c + b.t + 1] = 1
307 | }
308 | }
309 | a.t > 0 && (a[a.t - 1] += b.am(c, b[c], a, 2 * c, 0, 1));
310 | a.s = 0;
311 | a.clamp()
312 | }
313 | function F(a, b) {
314 | var c = this.abs(),
315 | e = a.abs(),
316 | f = c.t;
317 | b.t = f + e.t;
318 | while (--f >= 0) b[f] = 0;
319 | for (f = 0; f < e.t; ++f) b[f + c.t] = c.am(0, e[f], b, f, 0, c.t);
320 | b.s = 0;
321 | b.clamp();
322 | this.s != a.s && d.ZERO.subTo(b, b)
323 | }
324 | function E(a, b) {
325 | var c = 0,
326 | d = 0,
327 | e = Math.min(a.t, this.t);
328 | while (c < e) {
329 | d += this[c] - a[c];
330 | b[c++] = d & this.DM;
331 | d >>= this.DB
332 | }
333 | if (a.t < this.t) {
334 | d -= a.s;
335 | while (c < this.t) {
336 | d += this[c];
337 | b[c++] = d & this.DM;
338 | d >>= this.DB
339 | }
340 | d += this.s
341 | } else {
342 | d += this.s;
343 | while (c < a.t) {
344 | d -= a[c];
345 | b[c++] = d & this.DM;
346 | d >>= this.DB
347 | }
348 | d -= a.s
349 | }
350 | b.s = d < 0 ? -1 : 0;
351 | d < -1 ? b[c++] = this.DV + d: d > 0 && (b[c++] = d);
352 | b.t = c;
353 | b.clamp()
354 | }
355 | function D(a, b) {
356 | b.s = this.s;
357 | var c = Math.floor(a / this.DB);
358 | if (c >= this.t) b.t = 0;
359 | else {
360 | var d = a % this.DB,
361 | e = this.DB - d,
362 | f = (1 << d) - 1;
363 | b[0] = this[c] >> d;
364 | for (var g = c + 1; g < this.t; ++g) {
365 | b[g - c - 1] |= (this[g] & f) << e;
366 | b[g - c] = this[g] >> d
367 | }
368 | d > 0 && (b[this.t - c - 1] |= (this.s & f) << e);
369 | b.t = this.t - c;
370 | b.clamp()
371 | }
372 | }
373 | function C(a, b) {
374 | var c = a % this.DB,
375 | d = this.DB - c,
376 | e = (1 << d) - 1,
377 | f = Math.floor(a / this.DB),
378 | g = this.s << c & this.DM,
379 | h;
380 | for (h = this.t - 1; h >= 0; --h) {
381 | b[h + f + 1] = this[h] >> d | g;
382 | g = (this[h] & e) << c
383 | }
384 | for (h = f - 1; h >= 0; --h) b[h] = 0;
385 | b[f] = g;
386 | b.t = this.t + f + 1;
387 | b.s = this.s;
388 | b.clamp()
389 | }
390 | function B(a, b) {
391 | for (var c = a; c < this.t; ++c) b[c - a] = this[c];
392 | b.t = Math.max(this.t - a, 0);
393 | b.s = this.s
394 | }
395 | function A(a, b) {
396 | var c;
397 | for (c = this.t - 1; c >= 0; --c) b[c + a] = this[c];
398 | for (c = a - 1; c >= 0; --c) b[c] = 0;
399 | b.t = this.t + a;
400 | b.s = this.s
401 | }
402 | function z() {
403 | return this.t <= 0 ? 0 : this.DB * (this.t - 1) + y(this[this.t - 1] ^ this.s & this.DM)
404 | }
405 | function y(a) {
406 | var b = 1,
407 | c;
408 | if ((c = a >>> 16) != 0) {
409 | a = c;
410 | b += 16
411 | }
412 | if ((c = a >> 8) != 0) {
413 | a = c;
414 | b += 8
415 | }
416 | if ((c = a >> 4) != 0) {
417 | a = c;
418 | b += 4
419 | }
420 | if ((c = a >> 2) != 0) {
421 | a = c;
422 | b += 2
423 | }
424 | if ((c = a >> 1) != 0) {
425 | a = c;
426 | b += 1
427 | }
428 | return b
429 | }
430 | function x(a) {
431 | var b = this.s - a.s;
432 | if (b != 0) return b;
433 | var c = this.t;
434 | b = c - a.t;
435 | if (b != 0) return b;
436 | while (--c >= 0) if ((b = this[c] - a[c]) != 0) return b;
437 | return 0
438 | }
439 | function w() {
440 | return this.s < 0 ? this.negate() : this
441 | }
442 | function v() {
443 | var a = e();
444 | d.ZERO.subTo(this, a);
445 | return a
446 | }
447 | function u(a) {
448 | if (this.s < 0) return "-" + this.negate().toString(a);
449 | var b;
450 | if (a == 16) b = 4;
451 | else if (a == 8) b = 3;
452 | else if (a == 2) b = 1;
453 | else if (a == 32) b = 5;
454 | else if (a == 4) b = 2;
455 | else return this.toRadix(a);
456 | var c = (1 << b) - 1,
457 | d,
458 | e = !1,
459 | f = "",
460 | g = this.t,
461 | h = this.DB - g * this.DB % b;
462 | if (g-->0) {
463 | if (h < this.DB && (d = this[g] >> h) > 0) {
464 | e = !0;
465 | f = n(d)
466 | }
467 | while (g >= 0) {
468 | if (h < b) {
469 | d = (this[g] & (1 << h) - 1) << b - h;
470 | d |= this[--g] >> (h += this.DB - b)
471 | } else {
472 | d = this[g] >> (h -= b) & c;
473 | if (h <= 0) {
474 | h += this.DB; --g
475 | }
476 | }
477 | d > 0 && (e = !0);
478 | e && (f += n(d))
479 | }
480 | }
481 | return e ? f: "0"
482 | }
483 | function t() {
484 | var a = this.s & this.DM;
485 | while (this.t > 0 && this[this.t - 1] == a)--this.t
486 | }
487 | function s(a, b) {
488 | var c;
489 | if (b == 16) c = 4;
490 | else if (b == 8) c = 3;
491 | else if (b == 256) c = 8;
492 | else if (b == 2) c = 1;
493 | else if (b == 32) c = 5;
494 | else if (b == 4) c = 2;
495 | else {
496 | this.fromRadix(a, b);
497 | return
498 | }
499 | this.t = 0;
500 | this.s = 0;
501 | var e = a.length,
502 | f = !1,
503 | g = 0;
504 | while (--e >= 0) {
505 | var h = c == 8 ? a[e] & 255 : o(a, e);
506 | if (h < 0) {
507 | a.charAt(e) == "-" && (f = !0);
508 | continue
509 | }
510 | f = !1;
511 | if (g == 0) this[this.t++] = h;
512 | else if (g + c > this.DB) {
513 | this[this.t - 1] |= (h & (1 << this.DB - g) - 1) << g;
514 | this[this.t++] = h >> this.DB - g
515 | } else this[this.t - 1] |= h << g;
516 | g += c;
517 | g >= this.DB && (g -= this.DB)
518 | }
519 | if (c == 8 && (a[0] & 128) != 0) {
520 | this.s = -1;
521 | g > 0 && (this[this.t - 1] |= (1 << this.DB - g) - 1 << g)
522 | }
523 | this.clamp();
524 | f && d.ZERO.subTo(this, this)
525 | }
526 | function r(a) {
527 | var b = e();
528 | b.fromInt(a);
529 | return b
530 | }
531 | function q(a) {
532 | this.t = 1;
533 | this.s = a < 0 ? -1 : 0;
534 | a > 0 ? this[0] = a: a < -1 ? this[0] = a + DV: this.t = 0
535 | }
536 | function p(a) {
537 | for (var b = this.t - 1; b >= 0; --b) a[b] = this[b];
538 | a.t = this.t;
539 | a.s = this.s
540 | }
541 | function o(a, b) {
542 | var c = k[a.charCodeAt(b)];
543 | return c == null ? -1 : c
544 | }
545 | function n(a) {
546 | return j.charAt(a)
547 | }
548 | function h(a, b, c, d, e, f) {
549 | var g = b & 16383,
550 | h = b >> 14;
551 | while (--f >= 0) {
552 | var i = this[a] & 16383,
553 | j = this[a++] >> 14,
554 | k = h * i + j * g;
555 | i = g * i + ((k & 16383) << 14) + c[d] + e;
556 | e = (i >> 28) + (k >> 14) + h * j;
557 | c[d++] = i & 268435455
558 | }
559 | return e
560 | }
561 | function g(a, b, c, d, e, f) {
562 | var g = b & 32767,
563 | h = b >> 15;
564 | while (--f >= 0) {
565 | var i = this[a] & 32767,
566 | j = this[a++] >> 15,
567 | k = h * i + j * g;
568 | i = g * i + ((k & 32767) << 15) + c[d] + (e & 1073741823);
569 | e = (i >>> 30) + (k >>> 15) + h * j + (e >>> 30);
570 | c[d++] = i & 1073741823
571 | }
572 | return e
573 | }
574 | function f(a, b, c, d, e, f) {
575 | while (--f >= 0) {
576 | var g = b * this[a++] + c[d] + e;
577 | e = Math.floor(g / 67108864);
578 | c[d++] = g & 67108863
579 | }
580 | return e
581 | }
582 | function e() {
583 | return new d(null)
584 | }
585 | function d(a, b, c) {
586 | a != null && ("number" == typeof a ? this.fromNumber(a, b, c) : b == null && "string" != typeof a ? this.fromString(a, 256) : this.fromString(a, b))
587 | }
588 | var a, b = 0xdeadbeefcafe,
589 | c = (b & 16777215) == 15715070;
590 | if (c && navigator.appName == "Microsoft Internet Explorer") {
591 | d.prototype.am = g;
592 | a = 30
593 | } else if (c && navigator.appName != "Netscape") {
594 | d.prototype.am = f;
595 | a = 26
596 | } else {
597 | d.prototype.am = h;
598 | a = 28
599 | }
600 | d.prototype.DB = a;
601 | d.prototype.DM = (1 << a) - 1;
602 | d.prototype.DV = 1 << a;
603 | var i = 52;
604 | d.prototype.FV = Math.pow(2, i);
605 | d.prototype.F1 = i - a;
606 | d.prototype.F2 = 2 * a - i;
607 | var j = "0123456789abcdefghijklmnopqrstuvwxyz",
608 | k = [],
609 | l,
610 | m;
611 | l = "0".charCodeAt(0);
612 | for (m = 0; m <= 9; ++m) k[l++] = m;
613 | l = "a".charCodeAt(0);
614 | for (m = 10; m < 36; ++m) k[l++] = m;
615 | l = "A".charCodeAt(0);
616 | for (m = 10; m < 36; ++m) k[l++] = m;
617 | J.prototype.convert = K;
618 | J.prototype.revert = L;
619 | J.prototype.reduce = M;
620 | J.prototype.mulTo = N;
621 | J.prototype.sqrTo = O;
622 | Q.prototype.convert = R;
623 | Q.prototype.revert = S;
624 | Q.prototype.reduce = T;
625 | Q.prototype.mulTo = V;
626 | Q.prototype.sqrTo = U;
627 | d.prototype.copyTo = p;
628 | d.prototype.fromInt = q;
629 | d.prototype.fromString = s;
630 | d.prototype.clamp = t;
631 | d.prototype.dlShiftTo = A;
632 | d.prototype.drShiftTo = B;
633 | d.prototype.lShiftTo = C;
634 | d.prototype.rShiftTo = D;
635 | d.prototype.subTo = E;
636 | d.prototype.multiplyTo = F;
637 | d.prototype.squareTo = G;
638 | d.prototype.divRemTo = H;
639 | d.prototype.invDigit = P;
640 | d.prototype.isEven = W;
641 | d.prototype.exp = X;
642 | d.prototype.toString = u;
643 | d.prototype.negate = v;
644 | d.prototype.abs = w;
645 | d.prototype.compareTo = x;
646 | d.prototype.bitLength = z;
647 | d.prototype.mod = I;
648 | d.prototype.modPowInt = Y;
649 | d.ZERO = r(0);
650 | d.ONE = r(1);
651 | Z.prototype.init = $;
652 | Z.prototype.next = _;
653 | var bb = 256,
654 | bc, bd, be;
655 | if (bd == null) {
656 | bd = [];
657 | be = 0;
658 | var bh;
659 | if (navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto && typeof window.crypto.random == "function") {
660 | var bi = window.crypto.random(32);
661 | for (bh = 0; bh < bi.length; ++bh) bd[be++] = bi.charCodeAt(bh) & 255
662 | }
663 | while (be < bb) {
664 | bh = Math.floor(65536 * Math.random());
665 | bd[be++] = bh >>> 8;
666 | bd[be++] = bh & 255
667 | }
668 | be = 0;
669 | bg()
670 | }
671 | bl.prototype.nextBytes = bk;
672 | bq.prototype.doPublic = bs;
673 | bq.prototype.setPublic = br;
674 | bq.prototype.encrypt = bt;
675 | this.RSAKey = bq
676 | }).call(sinaSSOEncoder);
677 |
678 | var me = {
679 | "retcode": 0,
680 | "servertime": 1581132397,
681 | "pcid": "gz-54ecf7a825a4ab6f64ccdd106a951d7402b4",
682 | "nonce": "SQR03K",
683 | "pubkey": "EB2A38568661887FA180BDDB5CABD5F21C7BFD59C090CB2D245A87AC253062882729293E5506350508E7F9AA3BB77F4333231490F915F6D63C55FE2F08A49B353F444AD3993CACC02DB784ABBB8E42A9B1BBFFFB38BE18D78E87A0E41B9B8F73A928EE0CCEE1F6739884B9777E4FE9E88A1BBE495927AC4A799B3181D6442443",
684 | "rsakv": "1330428213",
685 | "uid": "1007905332757",
686 | "exectime": 73
687 | };
688 |
689 | function getsp(password,pubkey,servertime,nonce) {
690 | var f = new sinaSSOEncoder.RSAKey;
691 | f.setPublic(pubkey, "10001");
692 | return f.encrypt([servertime, nonce].join("\t") + "\n" + password);
693 | }
694 |
695 | (function() {
696 | var a = 0,
697 | b = 8;
698 | this.hex_sha1 = function(a) {
699 | return i(c(h(a), a.length * b))
700 | };
701 | var c = function(a, b) {
702 | a[b >> 5] |= 128 << 24 - b % 32;
703 | a[(b + 64 >> 9 << 4) + 15] = b;
704 | var c = Array(80),
705 | h = 1732584193,
706 | i = -271733879,
707 | j = -1732584194,
708 | k = 271733878,
709 | l = -1009589776;
710 | for (var m = 0; m < a.length; m += 16) {
711 | var n = h,
712 | o = i,
713 | p = j,
714 | q = k,
715 | r = l;
716 | for (var s = 0; s < 80; s++) {
717 | s < 16 ? c[s] = a[m + s] : c[s] = g(c[s - 3] ^ c[s - 8] ^ c[s - 14] ^ c[s - 16], 1);
718 | var t = f(f(g(h, 5), d(s, i, j, k)), f(f(l, c[s]), e(s)));
719 | l = k;
720 | k = j;
721 | j = g(i, 30);
722 | i = h;
723 | h = t
724 | }
725 | h = f(h, n);
726 | i = f(i, o);
727 | j = f(j, p);
728 | k = f(k, q);
729 | l = f(l, r)
730 | }
731 | return [h, i, j, k, l]
732 | },
733 | d = function(a, b, c, d) {
734 | return a < 20 ? b & c | ~b & d: a < 40 ? b ^ c ^ d: a < 60 ? b & c | b & d | c & d: b ^ c ^ d
735 | },
736 | e = function(a) {
737 | return a < 20 ? 1518500249 : a < 40 ? 1859775393 : a < 60 ? -1894007588 : -899497514
738 | },
739 | f = function(a, b) {
740 | var c = (a & 65535) + (b & 65535),
741 | d = (a >> 16) + (b >> 16) + (c >> 16);
742 | return d << 16 | c & 65535
743 | },
744 | g = function(a, b) {
745 | return a << b | a >>> 32 - b
746 | },
747 | h = function(a) {
748 | var c = [],
749 | d = (1 << b) - 1;
750 | for (var e = 0; e < a.length * b; e += b) c[e >> 5] |= (a.charCodeAt(e / b) & d) << 24 - e % 32;
751 | return c
752 | },
753 | i = function(b) {
754 | var c = a ? "0123456789ABCDEF": "0123456789abcdef",
755 | d = "";
756 | for (var e = 0; e < b.length * 4; e++) d += c.charAt(b[e >> 2] >> (3 - e % 4) * 8 + 4 & 15) + c.charAt(b[e >> 2] >> (3 - e % 4) * 8 & 15);
757 | return d
758 | },
759 | j = function(a) {
760 | var b = "",
761 | c = 0;
762 | for (; c < a.length; c++) b += "%" + k(a[c]);
763 | return decodeURIComponent(b)
764 | },
765 | k = function(a) {
766 | var b = "0" + a.toString(16);
767 | return b.length <= 2 ? b: b.substr(1)
768 | };
769 | this.base64 = {
770 | encode: function(a) {
771 | a = "" + a;
772 | if (a == "") return "";
773 | var b = "",
774 | c, d, e = "",
775 | f, g, h, i = "",
776 | j = 0;
777 | do {
778 | c = a.charCodeAt(j++);
779 | d = a.charCodeAt(j++);
780 | e = a.charCodeAt(j++);
781 | f = c >> 2;
782 | g = (c & 3) << 4 | d >> 4;
783 | h = (d & 15) << 2 | e >> 6;
784 | i = e & 63;
785 | isNaN(d) ? h = i = 64 : isNaN(e) && (i = 64);
786 | b = b + this._keys.charAt(f) + this._keys.charAt(g) + this._keys.charAt(h) + this._keys.charAt(i);
787 | c = d = e = "";
788 | f = g = h = i = ""
789 | } while ( j < a . length );
790 | return b
791 | },
792 | decode: function(a, b, c) {
793 | var d = function(a, b) {
794 | for (var c = 0; c < a.length; c++) if (a[c] === b) return c;
795 | return - 1
796 | };
797 | typeof a == "string" && (a = a.split(""));
798 | var e = [],
799 | f,
800 | g,
801 | h = "",
802 | i,
803 | j,
804 | k,
805 | l = "";
806 | a.length % 4 == 0;
807 | var m = /[^A-Za-z0-9+\/=]/,
808 | n = this._keys.split("");
809 | if (b == "urlsafe") {
810 | m = /[^A-Za-z0-9-_=]/;
811 | n = this._keys_urlsafe.split("")
812 | }
813 | if (b == "subp_v2") {
814 | m = /[^A-Za-z0-9_=-]/;
815 | n = this._subp_v2_keys.split("")
816 | }
817 | if (b == "subp_v3_3") {
818 | m = /[^A-Za-z0-9-_.-]/;
819 | n = this._subp_v3_keys_3.split("")
820 | }
821 | var o = 0;
822 | if (b == "binnary") {
823 | n = [];
824 | for (o = 0; o <= 64; o++) n[o] = o + 128
825 | }
826 | if (b != "binnary" && m.test(a.join(""))) return c == "array" ? [] : "";
827 | o = 0;
828 | do {
829 | i = d(n, a[o++]);
830 | j = d(n, a[o++]);
831 | k = d(n, a[o++]);
832 | l = d(n, a[o++]);
833 | f = i << 2 | j >> 4;
834 | g = (j & 15) << 4 | k >> 2;
835 | h = (k & 3) << 6 | l;
836 | e.push(f);
837 | k != 64 && k != -1 && e.push(g);
838 | l != 64 && l != -1 && e.push(h);
839 | f = g = h = "";
840 | i = j = k = l = ""
841 | } while ( o < a . length );
842 | if (c == "array") return e;
843 | var p = "",
844 | q = 0;
845 | for (; q < e.lenth; q++) p += String.fromCharCode(e[q]);
846 | return p
847 | },
848 | _keys: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
849 | _keys_urlsafe: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",
850 | _subp_v2_keys: "uAL715W8e3jJCcNU0lT_FSXVgxpbEDdQ4vKaIOH2GBPtfzqsmYZo-wRM9i6hynrk=",
851 | _subp_v3_keys_3: "5WFh28sGziZTeS1lBxCK-HgPq9IdMUwknybo.LJrQD3uj_Va7pE0XfcNR4AOYvm6t"
852 | };
853 | this.Cookie = {
854 | decode: function(a) {
855 | var b = [],
856 | c = a.substr(0, 3),
857 | d = a.substr(3);
858 | switch (c) {
859 | case "v01":
860 | for (var e = 0; e < d.length; e += 2) b.push(parseInt(d.substr(e, 2), 16));
861 | return decodeURIComponent(j(sinaSSOEncoder.base64.decode(b, "binnary", "array")));
862 | case "v02":
863 | d = d.replace(/\./g, "=");
864 | b = sinaSSOEncoder.base64.decode(d, "urlsafe", "array");
865 | return j(sinaSSOEncoder.base64.decode(b, "binnary", "array"));
866 | default:
867 | return decodeURIComponent(a)
868 | }
869 | }
870 | };
871 | this.getSUBPCookie = {
872 | __parse: function(a) {
873 | var b, c, d, e, f, g = 0,
874 | h, i = {},
875 | k = "",
876 | l = "";
877 | if (!a) return i;
878 | do {
879 | c = a[g];
880 | b = ++g;
881 | for (h = g; h < c + b; h++, g++) k += String.fromCharCode(a[h]);
882 | e = a[g];
883 | b = ++g;
884 | if (k == "status" || k == "flag") for (h = g; h < e + b; h++, g++) l += a[h];
885 | else {
886 | l = a.slice(b, e + b);
887 | try {
888 | l = j(l)
889 | } catch(m) {
890 | l = ""
891 | }
892 | g += e
893 | }
894 | i[k] = l;
895 | k = "";
896 | l = ""
897 | } while ( g < a . length );
898 | return i
899 | },
900 | decode: function(a) {
901 | var b = [],
902 | c,
903 | d = a.substr(0, 3),
904 | e = decodeURIComponent(a.substr(3));
905 | switch (d) {
906 | case "002":
907 | b = sinaSSOEncoder.base64.decode(e, "subp_v2", "array");
908 | return sinaSSOEncoder.getSUBPCookie.__parse(b);
909 | case "003":
910 | c = e.substr(0, 1);
911 | e = e.substr(1);
912 | b = sinaSSOEncoder.base64.decode(e, "subp_v3_" + c, "array");
913 | return sinaSSOEncoder.getSUBPCookie.__parse(b);
914 | default:
915 | return decodeURIComponent(a)
916 | }
917 | }
918 | }
919 | }).call(sinaSSOEncoder);
920 |
921 | urlencode = function(a) {
922 | return encodeURIComponent(a)
923 | }
924 |
925 | function getsu(username) {
926 | return sinaSSOEncoder.base64.encode(urlencode(username))
927 | }
--------------------------------------------------------------------------------
/微博/weibo.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import rsa
3 | import time
4 | import re
5 | import random
6 | import urllib3
7 | import base64
8 | from urllib.parse import quote
9 | from binascii import b2a_hex
10 | urllib3.disable_warnings() # 取消警告
11 |
12 | import execjs
13 |
14 | def get_js():
15 | with open('weibo.js','r',encoding='utf8')as f:
16 | result=f.read()
17 | return result
18 | def getjssu(func,keyword):
19 | jsstr=get_js()
20 | ctx=execjs.compile(jsstr)
21 | return ctx.call(func,keyword)
22 | def getjssp(func,a,b,c,d):
23 | jsstr=get_js()
24 | ctx=execjs.compile(jsstr)
25 | return ctx.call(func,a,b,c,d)
26 |
27 | def get_timestamp():
28 | return int(time.time()) # 获取时间戳
29 |
30 | class WeiBo():
31 | def __init__(self,username,password):
32 | self.username = username
33 | self.password = password
34 | self.session = requests.session() #登录用session
35 | self.session.headers={
36 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'
37 | }
38 | self.session.verify = False # 取消证书验证
39 |
40 | def prelogin(self):
41 | '''预登录,获取一些必须的参数'''
42 | self.su = base64.b64encode(quote(self.username).encode()) #阅读js得知用户名进行base64转码
43 | url = 'https://login.sina.com.cn/sso/prelogin.php?entry=weibo&callback=sinaSSOController.preloginCallBack&su={}&rsakt=mod&checkpin=1&client=ssologin.js(v1.4.19)&_={}'.format(quote(self.su),get_timestamp()) #注意su要进行quote转码
44 | response = self.session.get(url).content.decode()
45 | # print(response)
46 | self.nonce = re.findall(r'"nonce":"(.*?)"',response)[0]
47 | self.pubkey = re.findall(r'"pubkey":"(.*?)"',response)[0]
48 | self.rsakv = re.findall(r'"rsakv":"(.*?)"',response)[0]
49 | self.servertime = re.findall(r'"servertime":(.*?),',response)[0]
50 | return self.nonce,self.pubkey,self.rsakv,self.servertime
51 |
52 | def get_sp(self):
53 | '''用rsa对明文密码进行加密,加密规则通过阅读js代码得知'''
54 | """
55 | function br(a, b) {
56 | if (a != null && b != null && a.length > 0 && b.length > 0) {
57 | this.n = bm(a, 16);
58 | this.e = parseInt(b, 16)
59 | } else alert("Invalid RSA public key")
60 | }
61 |
62 | var f = new sinaSSOEncoder.RSAKey;
63 | f.setPublic(me.pubkey, "10001");
64 | return f.encrypt([me.servertime, me.nonce].join("\t") + "\n" + password);
65 | """
66 | #PublicKey(5, 3)
67 | publickey = rsa.PublicKey(int(self.pubkey,16),int('10001',16))
68 | message = str(self.servertime) + '\t' + str(self.nonce) + '\n' + str(self.password)
69 | self.sp = rsa.encrypt(message.encode(),publickey)
70 | return b2a_hex(self.sp)#转化为16进制
71 |
72 | def login(self):
73 | url = 'https://login.sina.com.cn/sso/login.php?client=ssologin.js(v1.4.19)'
74 | data = {
75 | 'entry': 'weibo',
76 | 'gateway': '1',
77 | 'from':'',
78 | 'savestate': '7',
79 | 'qrcode_flag': 'false',
80 | 'useticket': '1',
81 | 'pagerefer': 'https://login.sina.com.cn/crossdomain2.php?action=logout&r=https%3A%2F%2Fweibo.com%2Flogout.php%3Fbackurl%3D%252F',
82 | 'vsnf': '1',
83 | # 'su': self.su,
84 | 'su': getjssu('getsu',self.username),
85 | 'service': 'miniblog',
86 | 'servertime': str(int(self.servertime)+random.randint(1,20)),
87 | 'nonce': self.nonce,
88 | 'pwencode': 'rsa2',
89 | 'rsakv': self.rsakv,
90 | #'sp': self.get_sp(),
91 | 'sp': getjssp('getsp',self.password,self.pubkey,self.servertime,self.nonce),
92 | 'sr': '1536 * 864',
93 | 'encoding': 'UTF - 8',
94 | 'prelt': '35',
95 | 'url': 'https://weibo.com/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack',
96 | 'returntype': 'META',
97 | }
98 | response = self.session.post(url,data=data,allow_redirects=False).text # 提交账号密码等参数
99 | redirect_url = re.findall(r'location.replace\("(.*?)"\);',response)[0] # 微博在提交数据后会跳转,此处获取跳转的url
100 | result = self.session.get(redirect_url,allow_redirects=False).text # 请求跳转页面
101 | ticket,ssosavestate = re.findall(r'ticket=(.*?)&ssosavestate=(.*?)"',result)[0] #获取ticket和ssosavestate参数
102 | uid_url = 'https://passport.weibo.com/wbsso/login?ticket={}&ssosavestate={}&callback=sinaSSOController.doCrossDomainCallBack&scriptId=ssoscript0&client=ssologin.js(v1.4.19)&_={}'.format(ticket,ssosavestate,get_timestamp())
103 | data = self.session.get(uid_url).text #请求获取uid
104 | uid = re.findall(r'"uniqueid":"(.*?)"',data)[0]
105 | print(uid)
106 | home_url = 'https://weibo.com/u/{}/home?wvr=5&lf=reg'.format(uid) #请求首页
107 | html = self.session.get(home_url)
108 | html.encoding = 'utf-8'
109 | print(html.text)
110 |
111 | def main(self):
112 | self.prelogin()
113 | self.get_sp()
114 | self.login()
115 |
116 | if __name__ == '__main__':
117 | username = '1234567899' # 微博账号
118 | password = '123456' # 微博密码
119 | weibo = WeiBo(username,password)
120 | weibo.main()
--------------------------------------------------------------------------------
/房天下/get_pwd.js:
--------------------------------------------------------------------------------
1 | function setMaxDigits(n) {
2 | maxDigits = n;
3 | ZERO_ARRAY = new Array(maxDigits);
4 | for (var t = 0; t < ZERO_ARRAY.length; t++)
5 | ZERO_ARRAY[t] = 0;
6 | bigZero = new BigInt;
7 | bigOne = new BigInt;
8 | bigOne.digits[0] = 1
9 | }
10 | function BigInt(n) {
11 | this.digits = typeof n == "boolean" && n == !0 ? null : ZERO_ARRAY.slice(0);
12 | this.isNeg = !1
13 | }
14 | function biFromDecimal(n) {
15 | for (var u = n.charAt(0) == "-", t = u ? 1 : 0, i, f, r; t < n.length && n.charAt(t) == "0"; )
16 | ++t;
17 | if (t == n.length)
18 | i = new BigInt;
19 | else {
20 | for (f = n.length - t,
21 | r = f % dpl10,
22 | r == 0 && (r = dpl10),
23 | i = biFromNumber(Number(n.substr(t, r))),
24 | t += r; t < n.length; )
25 | i = biAdd(biMultiply(i, lr10), biFromNumber(Number(n.substr(t, dpl10)))),
26 | t += dpl10;
27 | i.isNeg = u
28 | }
29 | return i
30 | }
31 | function biCopy(n) {
32 | var t = new BigInt(!0);
33 | return t.digits = n.digits.slice(0),
34 | t.isNeg = n.isNeg,
35 | t
36 | }
37 | function biFromNumber(n) {
38 | var t = new BigInt, i;
39 | for (t.isNeg = n < 0,
40 | n = Math.abs(n),
41 | i = 0; n > 0; )
42 | t.digits[i++] = n & maxDigitVal,
43 | n = Math.floor(n / biRadix);
44 | return t
45 | }
46 | function reverseStr(n) {
47 | for (var i = "", t = n.length - 1; t > -1; --t)
48 | i += n.charAt(t);
49 | return i
50 | }
51 | function biToString(n, t) {
52 | var r = new BigInt, i, u;
53 | for (r.digits[0] = t,
54 | i = biDivideModulo(n, r),
55 | u = hexatrigesimalToChar[i[1].digits[0]]; biCompare(i[0], bigZero) == 1; )
56 | i = biDivideModulo(i[0], r),
57 | digit = i[1].digits[0],
58 | u += hexatrigesimalToChar[i[1].digits[0]];
59 | return (n.isNeg ? "-" : "") + reverseStr(u)
60 | }
61 | function biToDecimal(n) {
62 | var i = new BigInt, t, r;
63 | for (i.digits[0] = 10,
64 | t = biDivideModulo(n, i),
65 | r = String(t[1].digits[0]); biCompare(t[0], bigZero) == 1; )
66 | t = biDivideModulo(t[0], i),
67 | r += String(t[1].digits[0]);
68 | return (n.isNeg ? "-" : "") + reverseStr(r)
69 | }
70 | function digitToHex(n) {
71 | var t = "";
72 | for (i = 0; i < 4; ++i)
73 | t += hexToChar[n & 15],
74 | n >>>= 4;
75 | return reverseStr(t)
76 | }
77 | function biToHex(n) {
78 | for (var i = "", r = biHighIndex(n), t = biHighIndex(n); t > -1; --t)
79 | i += digitToHex(n.digits[t]);
80 | return i
81 | }
82 | function charToHex(n) {
83 | var t = 48
84 | , u = t + 9
85 | , i = 97
86 | , f = i + 25
87 | , r = 65;
88 | return n >= t && n <= u ? n - t : n >= r && n <= 90 ? 10 + n - r : n >= i && n <= f ? 10 + n - i : 0
89 | }
90 | function hexToDigit(n) {
91 | for (var t = 0, r = Math.min(n.length, 4), i = 0; i < r; ++i)
92 | t <<= 4,
93 | t |= charToHex(n.charCodeAt(i));
94 | return t
95 | }
96 | function biFromHex(n) {
97 | for (var i = new BigInt, u = n.length, t = u, r = 0; t > 0; t -= 4,
98 | ++r)
99 | i.digits[r] = hexToDigit(n.substr(Math.max(t - 4, 0), Math.min(t, 4)));
100 | return i
101 | }
102 | function biFromString(n, t) {
103 | var f = n.charAt(0) == "-", e = f ? 1 : 0, i = new BigInt, r = new BigInt, u;
104 | for (r.digits[0] = 1,
105 | u = n.length - 1; u >= e; u--) {
106 | var o = n.charCodeAt(u)
107 | , s = charToHex(o)
108 | , h = biMultiplyDigit(r, s);
109 | i = biAdd(i, h);
110 | r = biMultiplyDigit(r, t)
111 | }
112 | return i.isNeg = f,
113 | i
114 | }
115 | function biDump(n) {
116 | return (n.isNeg ? "-" : "") + n.digits.join(" ")
117 | }
118 | function biAdd(n, t) {
119 | var r, u, f, i;
120 | if (n.isNeg != t.isNeg)
121 | t.isNeg = !t.isNeg,
122 | r = biSubtract(n, t),
123 | t.isNeg = !t.isNeg;
124 | else {
125 | for (r = new BigInt,
126 | u = 0,
127 | i = 0; i < n.digits.length; ++i)
128 | f = n.digits[i] + t.digits[i] + u,
129 | r.digits[i] = f % biRadix,
130 | u = Number(f >= biRadix);
131 | r.isNeg = n.isNeg
132 | }
133 | return r
134 | }
135 | function biSubtract(n, t) {
136 | var r, f, u, i;
137 | if (n.isNeg != t.isNeg)
138 | t.isNeg = !t.isNeg,
139 | r = biAdd(n, t),
140 | t.isNeg = !t.isNeg;
141 | else {
142 | for (r = new BigInt,
143 | u = 0,
144 | i = 0; i < n.digits.length; ++i)
145 | f = n.digits[i] - t.digits[i] + u,
146 | r.digits[i] = f % biRadix,
147 | r.digits[i] < 0 && (r.digits[i] += biRadix),
148 | u = 0 - Number(f < 0);
149 | if (u == -1) {
150 | for (u = 0,
151 | i = 0; i < n.digits.length; ++i)
152 | f = 0 - r.digits[i] + u,
153 | r.digits[i] = f % biRadix,
154 | r.digits[i] < 0 && (r.digits[i] += biRadix),
155 | u = 0 - Number(f < 0);
156 | r.isNeg = !n.isNeg
157 | } else
158 | r.isNeg = n.isNeg
159 | }
160 | return r
161 | }
162 | function biHighIndex(n) {
163 | for (var t = n.digits.length - 1; t > 0 && n.digits[t] == 0; )
164 | --t;
165 | return t
166 | }
167 | function biNumBits(n) {
168 | for (var i = biHighIndex(n), r = n.digits[i], u = (i + 1) * bitsPerDigit, t = u; t > u - bitsPerDigit; --t) {
169 | if ((r & 32768) != 0)
170 | break;
171 | r <<= 1
172 | }
173 | return t
174 | }
175 | function biMultiply(n, t) {
176 | for (var i = new BigInt, u, o = biHighIndex(n), s = biHighIndex(t), e, f, r = 0; r <= s; ++r) {
177 | for (u = 0,
178 | f = r,
179 | j = 0; j <= o; ++j,
180 | ++f)
181 | e = i.digits[f] + n.digits[j] * t.digits[r] + u,
182 | i.digits[f] = e & maxDigitVal,
183 | u = e >>> biRadixBits;
184 | i.digits[r + o + 1] = u
185 | }
186 | return i.isNeg = n.isNeg != t.isNeg,
187 | i
188 | }
189 | function biMultiplyDigit(n, t) {
190 | var u, r, f, i;
191 | for (result = new BigInt,
192 | u = biHighIndex(n),
193 | r = 0,
194 | i = 0; i <= u; ++i)
195 | f = result.digits[i] + n.digits[i] * t + r,
196 | result.digits[i] = f & maxDigitVal,
197 | r = f >>> biRadixBits;
198 | return result.digits[1 + u] = r,
199 | result
200 | }
201 | function arrayCopy(n, t, i, r, u) {
202 | for (var o = Math.min(t + u, n.length), f = t, e = r; f < o; ++f,
203 | ++e)
204 | i[e] = n[f]
205 | }
206 | function biShiftLeft(n, t) {
207 | var e = Math.floor(t / bitsPerDigit), i = new BigInt, u, o, r, f;
208 | for (arrayCopy(n.digits, 0, i.digits, e, i.digits.length - e),
209 | u = t % bitsPerDigit,
210 | o = bitsPerDigit - u,
211 | r = i.digits.length - 1,
212 | f = r - 1; r > 0; --r,
213 | --f)
214 | i.digits[r] = i.digits[r] << u & maxDigitVal | (i.digits[f] & highBitMasks[u]) >>> o;
215 | return i.digits[0] = i.digits[r] << u & maxDigitVal,
216 | i.isNeg = n.isNeg,
217 | i
218 | }
219 | function biShiftRight(n, t) {
220 | var e = Math.floor(t / bitsPerDigit), i = new BigInt, u, o, r, f;
221 | for (arrayCopy(n.digits, e, i.digits, 0, n.digits.length - e),
222 | u = t % bitsPerDigit,
223 | o = bitsPerDigit - u,
224 | r = 0,
225 | f = r + 1; r < i.digits.length - 1; ++r,
226 | ++f)
227 | i.digits[r] = i.digits[r] >>> u | (i.digits[f] & lowBitMasks[u]) << o;
228 | return i.digits[i.digits.length - 1] >>>= u,
229 | i.isNeg = n.isNeg,
230 | i
231 | }
232 | function biMultiplyByRadixPower(n, t) {
233 | var i = new BigInt;
234 | return arrayCopy(n.digits, 0, i.digits, t, i.digits.length - t),
235 | i
236 | }
237 | function biDivideByRadixPower(n, t) {
238 | var i = new BigInt;
239 | return arrayCopy(n.digits, t, i.digits, 0, i.digits.length - t),
240 | i
241 | }
242 | function biModuloByRadixPower(n, t) {
243 | var i = new BigInt;
244 | return arrayCopy(n.digits, 0, i.digits, 0, t),
245 | i
246 | }
247 | function biCompare(n, t) {
248 | if (n.isNeg != t.isNeg)
249 | return 1 - 2 * Number(n.isNeg);
250 | for (var i = n.digits.length - 1; i >= 0; --i)
251 | if (n.digits[i] != t.digits[i])
252 | return n.isNeg ? 1 - 2 * Number(n.digits[i] > t.digits[i]) : 1 - 2 * Number(n.digits[i] < t.digits[i]);
253 | return 0
254 | }
255 | function biDivideModulo(n, t) {
256 | var a = biNumBits(n), s = biNumBits(t), v = t.isNeg, r, i, u, e, h, o, f, y, p;
257 | if (a < s)
258 | return n.isNeg ? (r = biCopy(bigOne),
259 | r.isNeg = !t.isNeg,
260 | n.isNeg = !1,
261 | t.isNeg = !1,
262 | i = biSubtract(t, n),
263 | n.isNeg = !0,
264 | t.isNeg = v) : (r = new BigInt,
265 | i = biCopy(n)),
266 | [r, i];
267 | for (r = new BigInt,
268 | i = n,
269 | u = Math.ceil(s / bitsPerDigit) - 1,
270 | e = 0; t.digits[u] < biHalfRadix; )
271 | t = biShiftLeft(t, 1),
272 | ++e,
273 | ++s,
274 | u = Math.ceil(s / bitsPerDigit) - 1;
275 | for (i = biShiftLeft(i, e),
276 | a += e,
277 | h = Math.ceil(a / bitsPerDigit) - 1,
278 | o = biMultiplyByRadixPower(t, h - u); biCompare(i, o) != -1; )
279 | ++r.digits[h - u],
280 | i = biSubtract(i, o);
281 | for (f = h; f > u; --f) {
282 | var c = f >= i.digits.length ? 0 : i.digits[f]
283 | , w = f - 1 >= i.digits.length ? 0 : i.digits[f - 1]
284 | , b = f - 2 >= i.digits.length ? 0 : i.digits[f - 2]
285 | , l = u >= t.digits.length ? 0 : t.digits[u]
286 | , k = u - 1 >= t.digits.length ? 0 : t.digits[u - 1];
287 | for (r.digits[f - u - 1] = c == l ? maxDigitVal : Math.floor((c * biRadix + w) / l),
288 | y = r.digits[f - u - 1] * (l * biRadix + k),
289 | p = c * biRadixSquared + (w * biRadix + b); y > p; )
290 | --r.digits[f - u - 1],
291 | y = r.digits[f - u - 1] * (l * biRadix | k),
292 | p = c * biRadix * biRadix + (w * biRadix + b);
293 | o = biMultiplyByRadixPower(t, f - u - 1);
294 | i = biSubtract(i, biMultiplyDigit(o, r.digits[f - u - 1]));
295 | i.isNeg && (i = biAdd(i, o),
296 | --r.digits[f - u - 1])
297 | }
298 | return i = biShiftRight(i, e),
299 | r.isNeg = n.isNeg != v,
300 | n.isNeg && (r = v ? biAdd(r, bigOne) : biSubtract(r, bigOne),
301 | t = biShiftRight(t, e),
302 | i = biSubtract(t, i)),
303 | i.digits[0] == 0 && biHighIndex(i) == 0 && (i.isNeg = !1),
304 | [r, i]
305 | }
306 | function biDivide(n, t) {
307 | return biDivideModulo(n, t)[0]
308 | }
309 | function biModulo(n, t) {
310 | return biDivideModulo(n, t)[1]
311 | }
312 | function biMultiplyMod(n, t, i) {
313 | return biModulo(biMultiply(n, t), i)
314 | }
315 | function biPow(n, t) {
316 | for (var r = bigOne, i = n; ; ) {
317 | if ((t & 1) != 0 && (r = biMultiply(r, i)),
318 | t >>= 1,
319 | t == 0)
320 | break;
321 | i = biMultiply(i, i)
322 | }
323 | return r
324 | }
325 | function biPowMod(n, t, i) {
326 | for (var f = bigOne, u = n, r = t; ; ) {
327 | if ((r.digits[0] & 1) != 0 && (f = biMultiplyMod(f, u, i)),
328 | r = biShiftRight(r, 1),
329 | r.digits[0] == 0 && biHighIndex(r) == 0)
330 | break;
331 | u = biMultiplyMod(u, u, i)
332 | }
333 | return f
334 | }
335 | function BarrettMu(n) {
336 | this.modulus = biCopy(n);
337 | this.k = biHighIndex(this.modulus) + 1;
338 | var t = new BigInt;
339 | t.digits[2 * this.k] = 1;
340 | this.mu = biDivide(t, this.modulus);
341 | this.bkplus1 = new BigInt;
342 | this.bkplus1.digits[this.k + 1] = 1;
343 | this.modulo = BarrettMu_modulo;
344 | this.multiplyMod = BarrettMu_multiplyMod;
345 | this.powMod = BarrettMu_powMod
346 | }
347 | function BarrettMu_modulo(n) {
348 | var r = biDivideByRadixPower(n, this.k - 1), u = biMultiply(r, this.mu), f = biDivideByRadixPower(u, this.k + 1), e = biModuloByRadixPower(n, this.k + 1), o = biMultiply(f, this.modulus), s = biModuloByRadixPower(o, this.k + 1), t = biSubtract(e, s), i;
349 | for (t.isNeg && (t = biAdd(t, this.bkplus1)),
350 | i = biCompare(t, this.modulus) >= 0; i; )
351 | t = biSubtract(t, this.modulus),
352 | i = biCompare(t, this.modulus) >= 0;
353 | return t
354 | }
355 | function BarrettMu_multiplyMod(n, t) {
356 | var i = biMultiply(n, t);
357 | return this.modulo(i)
358 | }
359 | function BarrettMu_powMod(n, t) {
360 | var u = new BigInt, r, i;
361 | for (u.digits[0] = 1,
362 | r = n,
363 | i = t; ; ) {
364 | if ((i.digits[0] & 1) != 0 && (u = this.multiplyMod(u, r)),
365 | i = biShiftRight(i, 1),
366 | i.digits[0] == 0 && biHighIndex(i) == 0)
367 | break;
368 | r = this.multiplyMod(r, r)
369 | }
370 | return u
371 | }
372 | function RSAKeyPair(n, t, i) {
373 | this.e = biFromHex(n);
374 | this.d = biFromHex(t);
375 | this.m = biFromHex(i);
376 | this.digitSize = 2 * biHighIndex(this.m) + 2;
377 | this.chunkSize = this.digitSize - 11;
378 | this.radix = 16;
379 | this.barrett = new BarrettMu(this.m)
380 | }
381 | function twoDigit(n) {
382 | return (n < 10 ? "0" : "") + String(n)
383 | }
384 | function encryptedString(n, t) {
385 | var e, o, s, h, c, i, f, u, v, l, y;
386 | if (n.chunkSize > n.digitSize - 11)
387 | return "Error";
388 | for (var a = [], p = t.length, r = 0; r < p; )
389 | a[r] = t.charCodeAt(r),
390 | r++;
391 | for (e = a.length,
392 | o = "",
393 | r = 0; r < e; r += n.chunkSize) {
394 | for (c = new BigInt,
395 | s = 0,
396 | f = r + n.chunkSize > e ? e % n.chunkSize : n.chunkSize,
397 | u = [],
398 | i = 0; i < f; i++)
399 | u[i] = a[r + f - 1 - i];
400 | for (u[f] = 0,
401 | v = Math.max(8, n.digitSize - 3 - f),
402 | i = 0; i < v; i++)
403 | u[f + 1 + i] = Math.floor(Math.random() * 254) + 1;
404 | for (u[n.digitSize - 2] = 2,
405 | u[n.digitSize - 1] = 0,
406 | h = 0; h < n.digitSize; ++s)
407 | c.digits[s] = u[h++],
408 | c.digits[s] += u[h++] << 8;
409 | l = n.barrett.powMod(c, n.e);
410 | y = n.radix == 16 ? biToHex(l) : biToString(l, n.radix);
411 | o += y + " "
412 | }
413 | return o.substring(0, o.length - 1)
414 | }
415 | function decryptedString(n, t) {
416 | for (var e = t.split(" "), i = "", r, u, o, f = 0; f < e.length; ++f)
417 | for (o = n.radix == 16 ? biFromHex(e[f]) : biFromString(e[f], n.radix),
418 | u = n.barrett.powMod(o, n.d),
419 | r = 0; r <= biHighIndex(u); ++r)
420 | i += String.fromCharCode(u.digits[r] & 255, u.digits[r] >> 8);
421 | return i.charCodeAt(i.length - 1) == 0 && (i = i.substring(0, i.length - 1)),
422 | i
423 | }
424 | var biRadixBase = 2, biRadixBits = 16, bitsPerDigit = biRadixBits, biRadix = 65536, biHalfRadix = biRadix >>> 1, biRadixSquared = biRadix * biRadix, maxDigitVal = biRadix - 1, maxInteger = 9999999999999998, maxDigits, ZERO_ARRAY, bigZero, bigOne, dpl10, lr10, hexatrigesimalToChar, hexToChar, highBitMasks, lowBitMasks;
425 | setMaxDigits(20);
426 | dpl10 = 15;
427 | lr10 = biFromNumber(1e15);
428 | hexatrigesimalToChar = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
429 | hexToChar = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
430 | highBitMasks = [0, 32768, 49152, 57344, 61440, 63488, 64512, 65024, 65280, 65408, 65472, 65504, 65520, 65528, 65532, 65534, 65535];
431 | lowBitMasks = [0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535];
432 | setMaxDigits(129);
433 |
434 | var key_to_encode = new RSAKeyPair("010001", "", "978C0A92D2173439707498F0944AA476B1B62595877DD6FA87F6E2AC6DCB3D0BF0B82857439C99B5091192BC134889DFF60C562EC54EFBA4FF2F9D55ADBCCEA4A2FBA80CB398ED501280A007C83AF30C3D1A142D6133C63012B90AB26AC60C898FB66EDC3192C3EC4FF66925A64003B72496099F4F09A9FB72A2CF9E4D770C41")
435 | function encryptedString(n, t) {
436 | var e, o, s, h, c, i, f, u, v, l, y;
437 | if (n.chunkSize > n.digitSize - 11)
438 | return "Error";
439 | for (var a = [], p = t.length, r = 0; r < p; )
440 | a[r] = t.charCodeAt(r),
441 | r++;
442 | for (e = a.length,
443 | o = "",
444 | r = 0; r < e; r += n.chunkSize) {
445 | for (c = new BigInt,
446 | s = 0,
447 | f = r + n.chunkSize > e ? e % n.chunkSize : n.chunkSize,
448 | u = [],
449 | i = 0; i < f; i++)
450 | u[i] = a[r + f - 1 - i];
451 | for (u[f] = 0,
452 | v = Math.max(8, n.digitSize - 3 - f),
453 | i = 0; i < v; i++)
454 | u[f + 1 + i] = Math.floor(Math.random() * 254) + 1;
455 | for (u[n.digitSize - 2] = 2,
456 | u[n.digitSize - 1] = 0,
457 | h = 0; h < n.digitSize; ++s)
458 | c.digits[s] = u[h++],
459 | c.digits[s] += u[h++] << 8;
460 | l = n.barrett.powMod(c, n.e);
461 | y = n.radix == 16 ? biToHex(l) : biToString(l, n.radix);
462 | o += y + " "
463 | }
464 | return o.substring(0, o.length - 1)
465 | }
466 |
467 | function getpwd(password){
468 | return encryptedString(key_to_encode, password)
469 | }
--------------------------------------------------------------------------------
/有道/youdao.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import time,math
3 | import hashlib
4 |
5 | def getTranslate(keyword):
6 | """
7 | define("newweb/common/service", ["./utils", "./md5", "./jquery-1.7"], function(e, t) {
8 | var n = e("./jquery-1.7");
9 | e("./utils");
10 | e("./md5");
11 | var r = function(e) {
12 | var t = n.md5(navigator.appVersion)
13 | , r = "" + (new Date).getTime()
14 | , i = r + parseInt(10 * Math.random(), 10);
15 | return {
16 | ts: r,
17 | bv: t,
18 | salt: i,
19 | sign: n.md5("fanyideskweb" + e + i + "n%A-rKaT5fb[Gy?;N5@Tj")
20 | }
21 | };
22 | """
23 | headers={
24 | 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
25 | 'Referer': 'http://fanyi.youdao.com/',
26 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
27 | 'Cookie': 'OUTFOX_SEARCH_USER_ID=305915764@10.169.0.83; JSESSIONID=aaaEbYa4UDvop-HxobKax; OUTFOX_SEARCH_USER_ID_NCOO=1390983887.8620632; P_INFO=losenine; ANTICSRF=cleared; NTES_OSESS=cleared; S_OINFO=; DICT_UGC=be3af0da19b5c5e6aa4e17bd8d90b28a|; JSESSIONID=abciwFedFfjVF8Q3sRKax; _ntes_nnid=c3809d36e692bc7a2a8d5a612c2cf49c,1581163303922; ___rl__test__cookies=1581163610466'
28 | }
29 |
30 | url='http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule'
31 | data={
32 | 'i': keyword,
33 | 'from': 'AUTO',
34 | 'to': 'AUTO',
35 | 'smartresult': 'dict',
36 | 'client': 'fanyideskweb',
37 | 'salt': math.floor(time.time()*10000),
38 | 'sign': hashlib.md5(("fanyideskweb" + keyword + str(math.floor(time.time()*10000)) + "n%A-rKaT5fb[Gy?;N5@Tj").encode('utf-8')).hexdigest(),
39 | 'ts': math.floor(time.time()*1000),
40 | 'bv': '42160534cfa82a6884077598362bbc9d',
41 | 'doctype': 'json',
42 | 'version': '2.1',
43 | 'keyfrom': 'fanyi.web',
44 | 'action': 'FY_BY_REALTlME'
45 | }
46 | html=requests.post(url,data=data,headers=headers)
47 | print(html.json()['translateResult'][0][0]['tgt'])
48 |
49 | if __name__ == '__main__':
50 | keyword='北京大学'
51 | getTranslate(keyword)
--------------------------------------------------------------------------------
/淘宝/password2.js:
--------------------------------------------------------------------------------
1 | this.navigator={};
2 | this.window=this;
3 |
4 | var o;
5 |
6 | function i(t, e, n) {
7 | null != t && ("number" == typeof t ? this.fromNumber(t, e, n) : null == e && "string" != typeof t ? this.fromString(t, 256) : this.fromString(t, e))
8 | }
9 | function r() {
10 | return new i(null)
11 | }
12 | "Microsoft Internet Explorer" == navigator.appName ? (i.prototype.am = function(t, e, n, o, i, r) {
13 | for (var a = 32767 & e,
14 | s = e >> 15; --r >= 0;) {
15 | var c = 32767 & this[t],
16 | u = this[t++] >> 15,
17 | l = s * c + u * a;
18 | i = ((c = a * c + ((32767 & l) << 15) + n[o] + (1073741823 & i)) >>> 30) + (l >>> 15) + s * u + (i >>> 30),
19 | n[o++] = 1073741823 & c
20 | }
21 | return i
22 | },
23 | o = 30) : "Netscape" != navigator.appName ? (i.prototype.am = function(t, e, n, o, i, r) {
24 | for (; --r >= 0;) {
25 | var a = e * this[t++] + n[o] + i;
26 | i = Math.floor(a / 67108864),
27 | n[o++] = 67108863 & a
28 | }
29 | return i
30 | },
31 | o = 26) : (i.prototype.am = function(t, e, n, o, i, r) {
32 | for (var a = 16383 & e,
33 | s = e >> 14; --r >= 0;) {
34 | var c = 16383 & this[t],
35 | u = this[t++] >> 14,
36 | l = s * c + u * a;
37 | i = ((c = a * c + ((16383 & l) << 14) + n[o] + i) >> 28) + (l >> 14) + s * u,
38 | n[o++] = 268435455 & c
39 | }
40 | return i
41 | },
42 | o = 28),
43 | i.prototype.DB = o,
44 | i.prototype.DM = (1 << o) - 1,
45 | i.prototype.DV = 1 << o;
46 | i.prototype.FV = Math.pow(2, 52),
47 | i.prototype.F1 = 52 - o,
48 | i.prototype.F2 = 2 * o - 52;
49 | var a, s, c = "0123456789abcdefghijklmnopqrstuvwxyz",
50 | u = new Array;
51 | for (a = "0".charCodeAt(0), s = 0; s <= 9; ++s) u[a++] = s;
52 | for (a = "a".charCodeAt(0), s = 10; s < 36; ++s) u[a++] = s;
53 | for (a = "A".charCodeAt(0), s = 10; s < 36; ++s) u[a++] = s;
54 | function l(t) {
55 | return c.charAt(t)
56 | }
57 | function f(t, e) {
58 | var n = u[t.charCodeAt(e)];
59 | return null == n ? -1 : n
60 | }
61 | function p(t) {
62 | var e = r();
63 | return e.fromInt(t),
64 | e
65 | }
66 | function d(t) {
67 | var e, n = 1;
68 | return 0 != (e = t >>> 16) && (t = e, n += 16),
69 | 0 != (e = t >> 8) && (t = e, n += 8),
70 | 0 != (e = t >> 4) && (t = e, n += 4),
71 | 0 != (e = t >> 2) && (t = e, n += 2),
72 | 0 != (e = t >> 1) && (t = e, n += 1),
73 | n
74 | }
75 | function h(t) {
76 | this.m = t
77 | }
78 | function g(t) {
79 | this.m = t,
80 | this.mp = t.invDigit(),
81 | this.mpl = 32767 & this.mp,
82 | this.mph = this.mp >> 15,
83 | this.um = (1 << t.DB - 15) - 1,
84 | this.mt2 = 2 * t.t
85 | }
86 | function y() {
87 | this.i = 0,
88 | this.j = 0,
89 | this.S = new Array
90 | }
91 | h.prototype.convert = function(t) {
92 | return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t
93 | },
94 | h.prototype.revert = function(t) {
95 | return t
96 | },
97 | h.prototype.reduce = function(t) {
98 | t.divRemTo(this.m, null, t)
99 | },
100 | h.prototype.mulTo = function(t, e, n) {
101 | t.multiplyTo(e, n),
102 | this.reduce(n)
103 | },
104 | h.prototype.sqrTo = function(t, e) {
105 | t.squareTo(e),
106 | this.reduce(e)
107 | },
108 | g.prototype.convert = function(t) {
109 | var e = r();
110 | return t.abs().dlShiftTo(this.m.t, e),
111 | e.divRemTo(this.m, null, e),
112 | t.s < 0 && e.compareTo(i.ZERO) > 0 && this.m.subTo(e, e),
113 | e
114 | },
115 | g.prototype.revert = function(t) {
116 | var e = r();
117 | return t.copyTo(e),
118 | this.reduce(e),
119 | e
120 | },
121 | g.prototype.reduce = function(t) {
122 | for (; t.t <= this.mt2;) t[t.t++] = 0;
123 | for (var e = 0; e < this.m.t; ++e) {
124 | var n = 32767 & t[e],
125 | o = n * this.mpl + ((n * this.mph + (t[e] >> 15) * this.mpl & this.um) << 15) & t.DM;
126 | for (t[n = e + this.m.t] += this.m.am(0, o, t, e, 0, this.m.t); t[n] >= t.DV;) t[n] -= t.DV,
127 | t[++n]++
128 | }
129 | t.clamp(),
130 | t.drShiftTo(this.m.t, t),
131 | t.compareTo(this.m) >= 0 && t.subTo(this.m, t)
132 | },
133 | g.prototype.mulTo = function(t, e, n) {
134 | t.multiplyTo(e, n),
135 | this.reduce(n)
136 | },
137 | g.prototype.sqrTo = function(t, e) {
138 | t.squareTo(e),
139 | this.reduce(e)
140 | },
141 | i.prototype.copyTo = function(t) {
142 | for (var e = this.t - 1; e >= 0; --e) t[e] = this[e];
143 | t.t = this.t,
144 | t.s = this.s
145 | },
146 | i.prototype.fromInt = function(t) {
147 | this.t = 1,
148 | this.s = t < 0 ? -1 : 0,
149 | t > 0 ? this[0] = t: t < -1 ? this[0] = t + this.DV: this.t = 0
150 | },
151 | i.prototype.fromString = function(t, e) {
152 | var n;
153 | if (16 == e) n = 4;
154 | else if (8 == e) n = 3;
155 | else if (256 == e) n = 8;
156 | else if (2 == e) n = 1;
157 | else if (32 == e) n = 5;
158 | else {
159 | if (4 != e) return void this.fromRadix(t, e);
160 | n = 2
161 | }
162 | this.t = 0,
163 | this.s = 0;
164 | for (var o = t.length,
165 | r = !1,
166 | a = 0; --o >= 0;) {
167 | var s = 8 == n ? 255 & t[o] : f(t, o);
168 | s < 0 ? "-" == t.charAt(o) && (r = !0) : (r = !1, 0 == a ? this[this.t++] = s: a + n > this.DB ? (this[this.t - 1] |= (s & (1 << this.DB - a) - 1) << a, this[this.t++] = s >> this.DB - a) : this[this.t - 1] |= s << a, (a += n) >= this.DB && (a -= this.DB))
169 | }
170 | 8 == n && 0 != (128 & t[0]) && (this.s = -1, a > 0 && (this[this.t - 1] |= (1 << this.DB - a) - 1 << a)),
171 | this.clamp(),
172 | r && i.ZERO.subTo(this, this)
173 | },
174 | i.prototype.clamp = function() {
175 | for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t;)--this.t
176 | },
177 | i.prototype.dlShiftTo = function(t, e) {
178 | var n;
179 | for (n = this.t - 1; n >= 0; --n) e[n + t] = this[n];
180 | for (n = t - 1; n >= 0; --n) e[n] = 0;
181 | e.t = this.t + t,
182 | e.s = this.s
183 | },
184 | i.prototype.drShiftTo = function(t, e) {
185 | for (var n = t; n < this.t; ++n) e[n - t] = this[n];
186 | e.t = Math.max(this.t - t, 0),
187 | e.s = this.s
188 | },
189 | i.prototype.lShiftTo = function(t, e) {
190 | var n, o = t % this.DB,
191 | i = this.DB - o,
192 | r = (1 << i) - 1,
193 | a = Math.floor(t / this.DB),
194 | s = this.s << o & this.DM;
195 | for (n = this.t - 1; n >= 0; --n) e[n + a + 1] = this[n] >> i | s,
196 | s = (this[n] & r) << o;
197 | for (n = a - 1; n >= 0; --n) e[n] = 0;
198 | e[a] = s,
199 | e.t = this.t + a + 1,
200 | e.s = this.s,
201 | e.clamp()
202 | },
203 | i.prototype.rShiftTo = function(t, e) {
204 | e.s = this.s;
205 | var n = Math.floor(t / this.DB);
206 | if (n >= this.t) e.t = 0;
207 | else {
208 | var o = t % this.DB,
209 | i = this.DB - o,
210 | r = (1 << o) - 1;
211 | e[0] = this[n] >> o;
212 | for (var a = n + 1; a < this.t; ++a) e[a - n - 1] |= (this[a] & r) << i,
213 | e[a - n] = this[a] >> o;
214 | o > 0 && (e[this.t - n - 1] |= (this.s & r) << i),
215 | e.t = this.t - n,
216 | e.clamp()
217 | }
218 | },
219 | i.prototype.subTo = function(t, e) {
220 | for (var n = 0,
221 | o = 0,
222 | i = Math.min(t.t, this.t); n < i;) o += this[n] - t[n],
223 | e[n++] = o & this.DM,
224 | o >>= this.DB;
225 | if (t.t < this.t) {
226 | for (o -= t.s; n < this.t;) o += this[n],
227 | e[n++] = o & this.DM,
228 | o >>= this.DB;
229 | o += this.s
230 | } else {
231 | for (o += this.s; n < t.t;) o -= t[n],
232 | e[n++] = o & this.DM,
233 | o >>= this.DB;
234 | o -= t.s
235 | }
236 | e.s = o < 0 ? -1 : 0,
237 | o < -1 ? e[n++] = this.DV + o: o > 0 && (e[n++] = o),
238 | e.t = n,
239 | e.clamp()
240 | },
241 | i.prototype.multiplyTo = function(t, e) {
242 | var n = this.abs(),
243 | o = t.abs(),
244 | r = n.t;
245 | for (e.t = r + o.t; --r >= 0;) e[r] = 0;
246 | for (r = 0; r < o.t; ++r) e[r + n.t] = n.am(0, o[r], e, r, 0, n.t);
247 | e.s = 0,
248 | e.clamp(),
249 | this.s != t.s && i.ZERO.subTo(e, e)
250 | },
251 | i.prototype.squareTo = function(t) {
252 | for (var e = this.abs(), n = t.t = 2 * e.t; --n >= 0;) t[n] = 0;
253 | for (n = 0; n < e.t - 1; ++n) {
254 | var o = e.am(n, e[n], t, 2 * n, 0, 1); (t[n + e.t] += e.am(n + 1, 2 * e[n], t, 2 * n + 1, o, e.t - n - 1)) >= e.DV && (t[n + e.t] -= e.DV, t[n + e.t + 1] = 1)
255 | }
256 | t.t > 0 && (t[t.t - 1] += e.am(n, e[n], t, 2 * n, 0, 1)),
257 | t.s = 0,
258 | t.clamp()
259 | },
260 | i.prototype.divRemTo = function(t, e, n) {
261 | var o = t.abs();
262 | if (! (o.t <= 0)) {
263 | var a = this.abs();
264 | if (a.t < o.t) return null != e && e.fromInt(0),
265 | void(null != n && this.copyTo(n));
266 | null == n && (n = r());
267 | var s = r(),
268 | c = this.s,
269 | u = t.s,
270 | l = this.DB - d(o[o.t - 1]);
271 | l > 0 ? (o.lShiftTo(l, s), a.lShiftTo(l, n)) : (o.copyTo(s), a.copyTo(n));
272 | var f = s.t,
273 | p = s[f - 1];
274 | if (0 != p) {
275 | var h = p * (1 << this.F1) + (f > 1 ? s[f - 2] >> this.F2: 0),
276 | g = this.FV / h,
277 | y = (1 << this.F1) / h,
278 | m = 1 << this.F2,
279 | v = n.t,
280 | M = v - f,
281 | w = null == e ? r() : e;
282 | for (s.dlShiftTo(M, w), n.compareTo(w) >= 0 && (n[n.t++] = 1, n.subTo(w, n)), i.ONE.dlShiftTo(f, w), w.subTo(s, s); s.t < f;) s[s.t++] = 0;
283 | for (; --M >= 0;) {
284 | var b = n[--v] == p ? this.DM: Math.floor(n[v] * g + (n[v - 1] + m) * y);
285 | if ((n[v] += s.am(0, b, n, M, 0, f)) < b) for (s.dlShiftTo(M, w), n.subTo(w, n); n[v] < --b;) n.subTo(w, n)
286 | }
287 | null != e && (n.drShiftTo(f, e), c != u && i.ZERO.subTo(e, e)),
288 | n.t = f,
289 | n.clamp(),
290 | l > 0 && n.rShiftTo(l, n),
291 | c < 0 && i.ZERO.subTo(n, n)
292 | }
293 | }
294 | },
295 | i.prototype.invDigit = function() {
296 | if (this.t < 1) return 0;
297 | var t = this[0];
298 | if (0 == (1 & t)) return 0;
299 | var e = 3 & t;
300 | return (e = (e = (e = (e = e * (2 - (15 & t) * e) & 15) * (2 - (255 & t) * e) & 255) * (2 - ((65535 & t) * e & 65535)) & 65535) * (2 - t * e % this.DV) % this.DV) > 0 ? this.DV - e: -e
301 | },
302 | i.prototype.isEven = function() {
303 | return 0 == (this.t > 0 ? 1 & this[0] : this.s)
304 | },
305 | i.prototype.exp = function(t, e) {
306 | if (t > 4294967295 || t < 1) return i.ONE;
307 | var n = r(),
308 | o = r(),
309 | a = e.convert(this),
310 | s = d(t) - 1;
311 | for (a.copyTo(n); --s >= 0;) if (e.sqrTo(n, o), (t & 1 << s) > 0) e.mulTo(o, a, n);
312 | else {
313 | var c = n;
314 | n = o,
315 | o = c
316 | }
317 | return e.revert(n)
318 | },
319 | i.prototype.toString = function(t) {
320 | if (this.s < 0) return "-" + this.negate().toString(t);
321 | var e;
322 | if (16 == t) e = 4;
323 | else if (8 == t) e = 3;
324 | else if (2 == t) e = 1;
325 | else if (32 == t) e = 5;
326 | else {
327 | if (4 != t) return this.toRadix(t);
328 | e = 2
329 | }
330 | var n, o = (1 << e) - 1,
331 | i = !1,
332 | r = "",
333 | a = this.t,
334 | s = this.DB - a * this.DB % e;
335 | if (a-->0) for (s < this.DB && (n = this[a] >> s) > 0 && (i = !0, r = l(n)); a >= 0;) s < e ? (n = (this[a] & (1 << s) - 1) << e - s, n |= this[--a] >> (s += this.DB - e)) : (n = this[a] >> (s -= e) & o, s <= 0 && (s += this.DB, --a)),
336 | n > 0 && (i = !0),
337 | i && (r += l(n));
338 | return i ? r: "0"
339 | },
340 | i.prototype.negate = function() {
341 | var t = r();
342 | return i.ZERO.subTo(this, t),
343 | t
344 | },
345 | i.prototype.abs = function() {
346 | return this.s < 0 ? this.negate() : this
347 | },
348 | i.prototype.compareTo = function(t) {
349 | var e = this.s - t.s;
350 | if (0 != e) return e;
351 | var n = this.t;
352 | if (0 != (e = n - t.t)) return this.s < 0 ? -e: e;
353 | for (; --n >= 0;) if (0 != (e = this[n] - t[n])) return e;
354 | return 0
355 | },
356 | i.prototype.bitLength = function() {
357 | return this.t <= 0 ? 0 : this.DB * (this.t - 1) + d(this[this.t - 1] ^ this.s & this.DM)
358 | },
359 | i.prototype.mod = function(t) {
360 | var e = r();
361 | return this.abs().divRemTo(t, null, e),
362 | this.s < 0 && e.compareTo(i.ZERO) > 0 && t.subTo(e, e),
363 | e
364 | },
365 | i.prototype.modPowInt = function(t, e) {
366 | var n;
367 | return n = t < 256 || e.isEven() ? new h(e) : new g(e),
368 | this.exp(t, n)
369 | },
370 | i.ZERO = p(0),
371 | i.ONE = p(1),
372 | y.prototype.init = function(t) {
373 | var e, n, o;
374 | for (e = 0; e < 256; ++e) this.S[e] = e;
375 | for (n = 0, e = 0; e < 256; ++e) n = n + this.S[e] + t[e % t.length] & 255,
376 | o = this.S[e],
377 | this.S[e] = this.S[n],
378 | this.S[n] = o;
379 | this.i = 0,
380 | this.j = 0
381 | },
382 | y.prototype.next = function() {
383 | var t;
384 | return this.i = this.i + 1 & 255,
385 | this.j = this.j + this.S[this.i] & 255,
386 | t = this.S[this.i],
387 | this.S[this.i] = this.S[this.j],
388 | this.S[this.j] = t,
389 | this.S[t + this.S[this.i] & 255]
390 | };
391 | var m, v, M, w = 256;
392 | function b() { !
393 | function(t) {
394 | v[M++] ^= 255 & t,
395 | v[M++] ^= t >> 8 & 255,
396 | v[M++] ^= t >> 16 & 255,
397 | v[M++] ^= t >> 24 & 255,
398 | M >= w && (M -= w)
399 | } ((new Date).getTime())
400 | }
401 | if (null == v) {
402 | var N;
403 | if (v = new Array, M = 0, window.crypto && window.crypto.getRandomValues) {
404 | var C = new Uint8Array(32);
405 | for (window.crypto.getRandomValues(C), N = 0; N < 32; ++N) v[M++] = C[N]
406 | }
407 | if ("Netscape" == navigator.appName && navigator.appVersion < "5" && window.crypto && window.crypto.random) {
408 | var T = window.crypto.random(32);
409 | for (N = 0; N < T.length; ++N) v[M++] = 255 & T.charCodeAt(N)
410 | }
411 | for (; M < w;) N = Math.floor(65536 * Math.random()),
412 | v[M++] = N >>> 8,
413 | v[M++] = 255 & N;
414 | M = 0,
415 | b()
416 | }
417 | function I() {
418 | if (null == m) {
419 | for (b(), (m = new y).init(v), M = 0; M < v.length; ++M) v[M] = 0;
420 | M = 0
421 | }
422 | return m.next()
423 | }
424 | function j() {}
425 | function D() {
426 | this.n = null,
427 | this.e = 0,
428 | this.d = null,
429 | this.p = null,
430 | this.q = null,
431 | this.dmp1 = null,
432 | this.dmq1 = null,
433 | this.coeff = null
434 | }
435 | j.prototype.nextBytes = function(t) {
436 | var e;
437 | for (e = 0; e < t.length; ++e) t[e] = I()
438 | },
439 | D.prototype.doPublic = function(t) {
440 | return t.modPowInt(this.e, this.n)
441 | },
442 | D.prototype.setPublic = function(t, e) {
443 | null != t && null != e && t.length > 0 && e.length > 0 ? (this.n = function(t, e) {
444 | return new i(t, e)
445 | } (t, 16), this.e = parseInt(e, 16)) : alert("Invalid RSA public key")
446 | },
447 | D.prototype.encrypt = function(t) {
448 | var e = function(t, e) {
449 | if (e < t.length + 11) return alert("Message too long for RSA"),
450 | null;
451 | for (var n = new Array,
452 | o = t.length - 1; o >= 0 && e > 0;) {
453 | var r = t.charCodeAt(o--);
454 | r < 128 ? n[--e] = r: r > 127 && r < 2048 ? (n[--e] = 63 & r | 128, n[--e] = r >> 6 | 192) : (n[--e] = 63 & r | 128, n[--e] = r >> 6 & 63 | 128, n[--e] = r >> 12 | 224)
455 | }
456 | n[--e] = 0;
457 | for (var a = new j,
458 | s = new Array; e > 2;) {
459 | for (s[0] = 0; 0 == s[0];) a.nextBytes(s);
460 | n[--e] = s[0]
461 | }
462 | return n[--e] = 2,
463 | n[--e] = 0,
464 | new i(n)
465 | } (t, this.n.bitLength() + 7 >> 3);
466 | if (null == e) return null;
467 | var n = this.doPublic(e);
468 | if (null == n) return null;
469 | var o = n.toString(16);
470 | return 0 == (1 & o.length) ? o: "0" + o
471 | };
472 |
473 |
474 | rsaPassword = function(t) {
475 | var e = new D;
476 | return e.setPublic("d3bcef1f00424f3261c89323fa8cdfa12bbac400d9fe8bb627e8d27a44bd5d59dce559135d678a8143beb5b8d7056c4e1f89c4e1f152470625b7b41944a97f02da6f605a49a93ec6eb9cbaf2e7ac2b26a354ce69eb265953d2c29e395d6d8c1cdb688978551aa0f7521f290035fad381178da0bea8f9e6adce39020f513133fb", "10001"),
477 | e.encrypt(t)
478 | }
479 |
480 | function getPwd(pwd) {
481 | return rsaPassword(pwd);
482 | }
--------------------------------------------------------------------------------
/淘宝/tb.py:
--------------------------------------------------------------------------------
1 | import execjs
2 |
3 | def getpwd(password):
4 | with open('password2.js', 'r', encoding='utf8')as f:
5 | content = f.read()
6 | jsdata = execjs.compile(content)
7 | pw = jsdata.call('getPwd', password)
8 | print('pw:', pw)
9 | return pw
10 |
11 | if __name__ == '__main__':
12 | getpwd('123456')
--------------------------------------------------------------------------------
/知乎/x-zse-96.js:
--------------------------------------------------------------------------------
1 | window=global;
2 |
3 | window.navigator={
4 | userAgent:'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36'
5 | };
6 |
7 | function myL(e, t, n) {
8 | var r;
9 | function o(e, t) {
10 | var n = (65535 & e) + (65535 & t);
11 | return (e >> 16) + (t >> 16) + (n >> 16) << 16 | 65535 & n
12 | }
13 | function a(e, t, n, r, i, a) {
14 | return o((c = o(o(t, e), o(r, a))) << (u = i) | c >>> 32 - u, n);
15 | var c, u
16 | }
17 | function c(e, t, n, r, i, o, c) {
18 | return a(t & n | ~t & r, e, t, i, o, c)
19 | }
20 | function u(e, t, n, r, i, o, c) {
21 | return a(t & r | n & ~r, e, t, i, o, c)
22 | }
23 | function s(e, t, n, r, i, o, c) {
24 | return a(t ^ n ^ r, e, t, i, o, c)
25 | }
26 | function l(e, t, n, r, i, o, c) {
27 | return a(n ^ (t | ~r), e, t, i, o, c)
28 | }
29 | function d(e, t) {
30 | var n, r, i, a, d;
31 | e[t >> 5] |= 128 << t % 32,
32 | e[14 + (t + 64 >>> 9 << 4)] = t;
33 | var f = 1732584193
34 | , p = -271733879
35 | , h = -1732584194
36 | , b = 271733878;
37 | for (n = 0; n < e.length; n += 16)
38 | r = f,
39 | i = p,
40 | a = h,
41 | d = b,
42 | f = c(f, p, h, b, e[n], 7, -680876936),
43 | b = c(b, f, p, h, e[n + 1], 12, -389564586),
44 | h = c(h, b, f, p, e[n + 2], 17, 606105819),
45 | p = c(p, h, b, f, e[n + 3], 22, -1044525330),
46 | f = c(f, p, h, b, e[n + 4], 7, -176418897),
47 | b = c(b, f, p, h, e[n + 5], 12, 1200080426),
48 | h = c(h, b, f, p, e[n + 6], 17, -1473231341),
49 | p = c(p, h, b, f, e[n + 7], 22, -45705983),
50 | f = c(f, p, h, b, e[n + 8], 7, 1770035416),
51 | b = c(b, f, p, h, e[n + 9], 12, -1958414417),
52 | h = c(h, b, f, p, e[n + 10], 17, -42063),
53 | p = c(p, h, b, f, e[n + 11], 22, -1990404162),
54 | f = c(f, p, h, b, e[n + 12], 7, 1804603682),
55 | b = c(b, f, p, h, e[n + 13], 12, -40341101),
56 | h = c(h, b, f, p, e[n + 14], 17, -1502002290),
57 | f = u(f, p = c(p, h, b, f, e[n + 15], 22, 1236535329), h, b, e[n + 1], 5, -165796510),
58 | b = u(b, f, p, h, e[n + 6], 9, -1069501632),
59 | h = u(h, b, f, p, e[n + 11], 14, 643717713),
60 | p = u(p, h, b, f, e[n], 20, -373897302),
61 | f = u(f, p, h, b, e[n + 5], 5, -701558691),
62 | b = u(b, f, p, h, e[n + 10], 9, 38016083),
63 | h = u(h, b, f, p, e[n + 15], 14, -660478335),
64 | p = u(p, h, b, f, e[n + 4], 20, -405537848),
65 | f = u(f, p, h, b, e[n + 9], 5, 568446438),
66 | b = u(b, f, p, h, e[n + 14], 9, -1019803690),
67 | h = u(h, b, f, p, e[n + 3], 14, -187363961),
68 | p = u(p, h, b, f, e[n + 8], 20, 1163531501),
69 | f = u(f, p, h, b, e[n + 13], 5, -1444681467),
70 | b = u(b, f, p, h, e[n + 2], 9, -51403784),
71 | h = u(h, b, f, p, e[n + 7], 14, 1735328473),
72 | f = s(f, p = u(p, h, b, f, e[n + 12], 20, -1926607734), h, b, e[n + 5], 4, -378558),
73 | b = s(b, f, p, h, e[n + 8], 11, -2022574463),
74 | h = s(h, b, f, p, e[n + 11], 16, 1839030562),
75 | p = s(p, h, b, f, e[n + 14], 23, -35309556),
76 | f = s(f, p, h, b, e[n + 1], 4, -1530992060),
77 | b = s(b, f, p, h, e[n + 4], 11, 1272893353),
78 | h = s(h, b, f, p, e[n + 7], 16, -155497632),
79 | p = s(p, h, b, f, e[n + 10], 23, -1094730640),
80 | f = s(f, p, h, b, e[n + 13], 4, 681279174),
81 | b = s(b, f, p, h, e[n], 11, -358537222),
82 | h = s(h, b, f, p, e[n + 3], 16, -722521979),
83 | p = s(p, h, b, f, e[n + 6], 23, 76029189),
84 | f = s(f, p, h, b, e[n + 9], 4, -640364487),
85 | b = s(b, f, p, h, e[n + 12], 11, -421815835),
86 | h = s(h, b, f, p, e[n + 15], 16, 530742520),
87 | f = l(f, p = s(p, h, b, f, e[n + 2], 23, -995338651), h, b, e[n], 6, -198630844),
88 | b = l(b, f, p, h, e[n + 7], 10, 1126891415),
89 | h = l(h, b, f, p, e[n + 14], 15, -1416354905),
90 | p = l(p, h, b, f, e[n + 5], 21, -57434055),
91 | f = l(f, p, h, b, e[n + 12], 6, 1700485571),
92 | b = l(b, f, p, h, e[n + 3], 10, -1894986606),
93 | h = l(h, b, f, p, e[n + 10], 15, -1051523),
94 | p = l(p, h, b, f, e[n + 1], 21, -2054922799),
95 | f = l(f, p, h, b, e[n + 8], 6, 1873313359),
96 | b = l(b, f, p, h, e[n + 15], 10, -30611744),
97 | h = l(h, b, f, p, e[n + 6], 15, -1560198380),
98 | p = l(p, h, b, f, e[n + 13], 21, 1309151649),
99 | f = l(f, p, h, b, e[n + 4], 6, -145523070),
100 | b = l(b, f, p, h, e[n + 11], 10, -1120210379),
101 | h = l(h, b, f, p, e[n + 2], 15, 718787259),
102 | p = l(p, h, b, f, e[n + 9], 21, -343485551),
103 | f = o(f, r),
104 | p = o(p, i),
105 | h = o(h, a),
106 | b = o(b, d);
107 | return [f, p, h, b]
108 | }
109 | function f(e) {
110 | var t, n = "", r = 32 * e.length;
111 | for (t = 0; t < r; t += 8)
112 | n += String.fromCharCode(e[t >> 5] >>> t % 32 & 255);
113 | return n
114 | }
115 | function p(e) {
116 | var t, n = [];
117 | for (n[(e.length >> 2) - 1] = void 0,
118 | t = 0; t < n.length; t += 1)
119 | n[t] = 0;
120 | var r = 8 * e.length;
121 | for (t = 0; t < r; t += 8)
122 | n[t >> 5] |= (255 & e.charCodeAt(t / 8)) << t % 32;
123 | return n
124 | }
125 | function h(e) {
126 | var t, n, r = "";
127 | for (n = 0; n < e.length; n += 1)
128 | t = e.charCodeAt(n),
129 | r += "0123456789abcdef".charAt(t >>> 4 & 15) + "0123456789abcdef".charAt(15 & t);
130 | return r
131 | }
132 | function b(e) {
133 | return unescape(encodeURIComponent(e))
134 | }
135 | function v(e) {
136 | return function(e) {
137 | return f(d(p(e), 8 * e.length))
138 | }(b(e))
139 | }
140 | function O(e, t) {
141 | return function(e, t) {
142 | var n, r, i = p(e), o = [], a = [];
143 | for (o[15] = a[15] = void 0,
144 | i.length > 16 && (i = d(i, 8 * e.length)),
145 | n = 0; n < 16; n += 1)
146 | o[n] = 909522486 ^ i[n],
147 | a[n] = 1549556828 ^ i[n];
148 | return r = d(o.concat(p(t)), 512 + 8 * t.length),
149 | f(d(a.concat(r), 640))
150 | }(b(e), b(t))
151 | }
152 | function g(e, t, n) {
153 | return t ? n ? O(t, e) : h(O(t, e)) : n ? v(e) : h(v(e))
154 | };
155 | return g(e,t,n);
156 | }
157 |
158 | function myA(data) {
159 | function t(e) {
160 | return (t = "function" == typeof Symbol && "symbol" == typeof Symbol.A ? function(e) {
161 | return typeof e
162 | }
163 | : function(e) {
164 | return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
165 | }
166 | )(e)
167 | }
168 | Object.defineProperty(exports, "__esModule", {
169 | value: !0
170 | });
171 | var A = "2.0"
172 | , __g = {};
173 | function s() {}
174 | function i(e) {
175 | this.t = (2048 & e) >> 11,
176 | this.s = (1536 & e) >> 9,
177 | this.i = 511 & e,
178 | this.h = 511 & e
179 | }
180 | function h(e) {
181 | this.s = (3072 & e) >> 10,
182 | this.h = 1023 & e
183 | }
184 | function a(e) {
185 | this.a = (3072 & e) >> 10,
186 | this.c = (768 & e) >> 8,
187 | this.n = (192 & e) >> 6,
188 | this.t = 63 & e
189 | }
190 | function c(e) {
191 | this.s = e >> 10 & 3,
192 | this.i = 1023 & e
193 | }
194 | function n() {}
195 | function e(e) {
196 | this.a = (3072 & e) >> 10,
197 | this.c = (768 & e) >> 8,
198 | this.n = (192 & e) >> 6,
199 | this.t = 63 & e
200 | }
201 | function o(e) {
202 | this.h = (4095 & e) >> 2,
203 | this.t = 3 & e
204 | }
205 | function r(e) {
206 | this.s = e >> 10 & 3,
207 | this.i = e >> 2 & 255,
208 | this.t = 3 & e
209 | }
210 | s.prototype.e = function(e) {
211 | e.o = !1
212 | }
213 | ,
214 | i.prototype.e = function(e) {
215 | switch (this.t) {
216 | case 0:
217 | e.r[this.s] = this.i;
218 | break;
219 | case 1:
220 | e.r[this.s] = e.k[this.h]
221 | }
222 | }
223 | ,
224 | h.prototype.e = function(e) {
225 | e.k[this.h] = e.r[this.s]
226 | }
227 | ,
228 | a.prototype.e = function(e) {
229 | switch (this.t) {
230 | case 0:
231 | e.r[this.a] = e.r[this.c] + e.r[this.n];
232 | break;
233 | case 1:
234 | e.r[this.a] = e.r[this.c] - e.r[this.n];
235 | break;
236 | case 2:
237 | e.r[this.a] = e.r[this.c] * e.r[this.n];
238 | break;
239 | case 3:
240 | e.r[this.a] = e.r[this.c] / e.r[this.n];
241 | break;
242 | case 4:
243 | e.r[this.a] = e.r[this.c] % e.r[this.n];
244 | break;
245 | case 5:
246 | e.r[this.a] = e.r[this.c] == e.r[this.n];
247 | break;
248 | case 6:
249 | e.r[this.a] = e.r[this.c] >= e.r[this.n];
250 | break;
251 | case 7:
252 | e.r[this.a] = e.r[this.c] || e.r[this.n];
253 | break;
254 | case 8:
255 | e.r[this.a] = e.r[this.c] && e.r[this.n];
256 | break;
257 | case 9:
258 | e.r[this.a] = e.r[this.c] !== e.r[this.n];
259 | break;
260 | case 10:
261 | e.r[this.a] = t(e.r[this.c]);
262 | break;
263 | case 11:
264 | e.r[this.a] = e.r[this.c]in e.r[this.n];
265 | break;
266 | case 12:
267 | e.r[this.a] = e.r[this.c] > e.r[this.n];
268 | break;
269 | case 13:
270 | e.r[this.a] = -e.r[this.c];
271 | break;
272 | case 14:
273 | e.r[this.a] = e.r[this.c] < e.r[this.n];
274 | break;
275 | case 15:
276 | e.r[this.a] = e.r[this.c] & e.r[this.n];
277 | break;
278 | case 16:
279 | e.r[this.a] = e.r[this.c] ^ e.r[this.n];
280 | break;
281 | case 17:
282 | e.r[this.a] = e.r[this.c] << e.r[this.n];
283 | break;
284 | case 18:
285 | e.r[this.a] = e.r[this.c] >>> e.r[this.n];
286 | break;
287 | case 19:
288 | e.r[this.a] = e.r[this.c] | e.r[this.n];
289 | break;
290 | case 20:
291 | e.r[this.a] = !e.r[this.c]
292 | }
293 | }
294 | ,
295 | c.prototype.e = function(e) {
296 | e.Q.push(e.C),
297 | e.B.push(e.k),
298 | e.C = e.r[this.s],
299 | e.k = [];
300 | for (var t = 0; t < this.i; t++)
301 | e.k.unshift(e.f.pop());
302 | e.g.push(e.f),
303 | e.f = []
304 | }
305 | ,
306 | n.prototype.e = function(e) {
307 | e.C = e.Q.pop(),
308 | e.k = e.B.pop(),
309 | e.f = e.g.pop()
310 | }
311 | ,
312 | e.prototype.e = function(e) {
313 | switch (this.t) {
314 | case 0:
315 | e.u = e.r[this.a] >= e.r[this.c];
316 | break;
317 | case 1:
318 | e.u = e.r[this.a] <= e.r[this.c];
319 | break;
320 | case 2:
321 | e.u = e.r[this.a] > e.r[this.c];
322 | break;
323 | case 3:
324 | e.u = e.r[this.a] < e.r[this.c];
325 | break;
326 | case 4:
327 | e.u = e.r[this.a] == e.r[this.c];
328 | break;
329 | case 5:
330 | e.u = e.r[this.a] != e.r[this.c];
331 | break;
332 | case 6:
333 | e.u = e.r[this.a];
334 | break;
335 | case 7:
336 | e.u = !e.r[this.a]
337 | }
338 | }
339 | ,
340 | o.prototype.e = function(e) {
341 | switch (this.t) {
342 | case 0:
343 | e.C = this.h;
344 | break;
345 | case 1:
346 | e.u && (e.C = this.h);
347 | break;
348 | case 2:
349 | e.u || (e.C = this.h);
350 | break;
351 | case 3:
352 | e.C = this.h,
353 | e.w = null
354 | }
355 | e.u = !1
356 | }
357 | ,
358 | r.prototype.e = function(e) {
359 | switch (this.t) {
360 | case 0:
361 | for (var t = [], n = 0; n < this.i; n++)
362 | t.unshift(e.f.pop());
363 | e.r[3] = e.r[this.s](t[0], t[1]);
364 | break;
365 | case 1:
366 | for (var r = e.f.pop(), i = [], o = 0; o < this.i; o++)
367 | i.unshift(e.f.pop());
368 | e.r[3] = e.r[this.s][r](i[0], i[1]);
369 | break;
370 | case 2:
371 | for (var a = [], c = 0; c < this.i; c++)
372 | a.unshift(e.f.pop());
373 | e.r[3] = new e.r[this.s](a[0],a[1])
374 | }
375 | }
376 | ;
377 | var k = function(e) {
378 | for (var t = 66, n = [], r = 0; r < e.length; r++) {
379 | var i = 24 ^ e.charCodeAt(r) ^ t;
380 | n.push(String.fromCharCode(i)),
381 | t = i
382 | }
383 | return n.join("")
384 | };
385 | function Q(e) {
386 | this.t = (4095 & e) >> 10,
387 | this.s = (1023 & e) >> 8,
388 | this.i = 1023 & e,
389 | this.h = 63 & e
390 | }
391 | function C(e) {
392 | this.t = (4095 & e) >> 10,
393 | this.a = (1023 & e) >> 8,
394 | this.c = (255 & e) >> 6
395 | }
396 | function B(e) {
397 | this.s = (3072 & e) >> 10,
398 | this.h = 1023 & e
399 | }
400 | function f(e) {
401 | this.h = 4095 & e
402 | }
403 | function g(e) {
404 | this.s = (3072 & e) >> 10
405 | }
406 | function u(e) {
407 | this.h = 4095 & e
408 | }
409 | function w(e) {
410 | this.t = (3840 & e) >> 8,
411 | this.s = (192 & e) >> 6,
412 | this.i = 63 & e
413 | }
414 | function G() {
415 | this.r = [0, 0, 0, 0],
416 | this.C = 0,
417 | this.Q = [],
418 | this.k = [],
419 | this.B = [],
420 | this.f = [],
421 | this.g = [],
422 | this.u = !1,
423 | this.G = [],
424 | this.b = [],
425 | this.o = !1,
426 | this.w = null,
427 | this.U = null,
428 | this.F = [],
429 | this.R = 0,
430 | this.J = {
431 | 0: s,
432 | 1: i,
433 | 2: h,
434 | 3: a,
435 | 4: c,
436 | 5: n,
437 | 6: e,
438 | 7: o,
439 | 8: r,
440 | 9: Q,
441 | 10: C,
442 | 11: B,
443 | 12: f,
444 | 13: g,
445 | 14: u,
446 | 15: w
447 | }
448 | }
449 | Q.prototype.e = function(e) {
450 | switch (this.t) {
451 | case 0:
452 | e.f.push(e.r[this.s]);
453 | break;
454 | case 1:
455 | e.f.push(this.i);
456 | break;
457 | case 2:
458 | e.f.push(e.k[this.h]);
459 | break;
460 | case 3:
461 | e.f.push(k(e.b[this.h]))
462 | }
463 | }
464 | ,
465 | C.prototype.e = function(A) {
466 | switch (this.t) {
467 | case 0:
468 | var t = A.f.pop();
469 | A.r[this.a] = A.r[this.c][t];
470 | break;
471 | case 1:
472 | var s = A.f.pop()
473 | , i = A.f.pop();
474 | A.r[this.c][s] = i;
475 | break;
476 | case 2:
477 | var h = A.f.pop();
478 | A.r[this.a] = eval(h)
479 | }
480 | }
481 | ,
482 | B.prototype.e = function(e) {
483 | e.r[this.s] = k(e.b[this.h])
484 | }
485 | ,
486 | f.prototype.e = function(e) {
487 | e.w = this.h
488 | }
489 | ,
490 | g.prototype.e = function(e) {
491 | throw e.r[this.s]
492 | }
493 | ,
494 | u.prototype.e = function(e) {
495 | var t = this
496 | , n = [0];
497 | e.k.forEach((function(e) {
498 | n.push(e)
499 | }
500 | ));
501 | var r = function(r) {
502 | var i = new G;
503 | return i.k = n,
504 | i.k[0] = r,
505 | i.v(e.G, t.h, e.b, e.F),
506 | i.r[3]
507 | };
508 | r.toString = function() {
509 | return "() { [native code] }"
510 | }
511 | ,
512 | e.r[3] = r
513 | }
514 | ,
515 | w.prototype.e = function(e) {
516 | switch (this.t) {
517 | case 0:
518 | for (var t = {}, n = 0; n < this.i; n++) {
519 | var r = e.f.pop();
520 | t[e.f.pop()] = r
521 | }
522 | e.r[this.s] = t;
523 | break;
524 | case 1:
525 | for (var i = [], o = 0; o < this.i; o++)
526 | i.unshift(e.f.pop());
527 | e.r[this.s] = i
528 | }
529 | }
530 | ,
531 | G.prototype.D = function(e) {
532 | for (var t = atob(e), n = t.charCodeAt(0) << 8 | t.charCodeAt(1), r = [], i = 2; i < n + 2; i += 2)
533 | r.push(t.charCodeAt(i) << 8 | t.charCodeAt(i + 1));
534 | this.G = r;
535 | for (var o = [], a = n + 2; a < t.length; ) {
536 | var c = t.charCodeAt(a) << 8 | t.charCodeAt(a + 1)
537 | , u = t.slice(a + 2, a + 2 + c);
538 | o.push(u),
539 | a += c + 2
540 | }
541 | this.b = o
542 | }
543 | ,
544 | G.prototype.v = function(e, t, n) {
545 | for (t = t || 0,
546 | n = n || [],
547 | this.C = t,
548 | "string" == typeof e ? this.D(e) : (this.G = e,
549 | this.b = n),
550 | this.o = !0,
551 | this.R = Date.now(); this.o; ) {
552 | var r = this.G[this.C++];
553 | if ("number" != typeof r)
554 | break;
555 | var i = Date.now();
556 | if (500 < i - this.R)
557 | return;
558 | this.R = i;
559 | try {
560 | this.e(r)
561 | } catch (e) {
562 | this.U = e,
563 | this.w && (this.C = this.w)
564 | }
565 | }
566 | }
567 | ,
568 | G.prototype.e = function(e) {
569 | var t = (61440 & e) >> 12;
570 | new this.J[t](e).e(this)
571 | }
572 | ,
573 | "undefined" != typeof window && (new G).v("AxjgB5MAnACoAJwBpAAAABAAIAKcAqgAMAq0AzRJZAZwUpwCqACQACACGAKcBKAAIAOcBagAIAQYAjAUGgKcBqFAuAc5hTSHZAZwqrAIGgA0QJEAJAAYAzAUGgOcCaFANRQ0R2QGcOKwChoANECRACQAsAuQABgDnAmgAJwMgAGcDYwFEAAzBmAGcSqwDhoANECRACQAGAKcD6AAGgKcEKFANEcYApwRoAAxB2AGcXKwEhoANECRACQAGAKcE6AAGgKcFKFANEdkBnGqsBUaADRAkQAkABgCnBagAGAGcdKwFxoANECRACQAGAKcGKAAYAZx+rAZGgA0QJEAJAAYA5waoABgBnIisBsaADRAkQAkABgCnBygABoCnB2hQDRHZAZyWrAeGgA0QJEAJAAYBJwfoAAwFGAGcoawIBoANECRACQAGAOQALAJkAAYBJwfgAlsBnK+sCEaADRAkQAkABgDkACwGpAAGAScH4AJbAZy9rAiGgA0QJEAJACwI5AAGAScH6AAkACcJKgAnCWgAJwmoACcJ4AFnA2MBRAAMw5gBnNasCgaADRAkQAkABgBEio0R5EAJAGwKSAFGACcKqAAEgM0RCQGGAYSATRFZAZzshgAtCs0QCQAGAYSAjRFZAZz1hgAtCw0QCQAEAAgB7AtIAgYAJwqoAASATRBJAkYCRIANEZkBnYqEAgaBxQBOYAoBxQEOYQ0giQKGAmQABgAnC6ABRgBGgo0UhD/MQ8zECALEAgaBxQBOYAoBxQEOYQ0gpEAJAoYARoKNFIQ/zEPkAAgChgLGgkUATmBkgAaAJwuhAUaCjdQFAg5kTSTJAsQCBoHFAE5gCgHFAQ5hDSCkQAkChgBGgo0UhD/MQ+QACAKGAsaCRQCOYGSABoAnC6EBRoKN1AUEDmRNJMkCxgFGgsUPzmPkgAaCJwvhAU0wCQFGAUaCxQGOZISPzZPkQAaCJwvhAU0wCQFGAUaCxQMOZISPzZPkQAaCJwvhAU0wCQFGAUaCxQSOZISPzZPkQAaCJwvhAU0wCQFGAkSAzRBJAlz/B4FUAAAAwUYIAAIBSITFQkTERwABi0GHxITAAAJLwMSGRsXHxMZAAk0Fw8HFh4NAwUABhU1EBceDwAENBcUEAAGNBkTGRcBAAFKAAkvHg4PKz4aEwIAAUsACDIVHB0QEQ4YAAsuAzs7AAoPKToKDgAHMx8SGQUvMQABSAALORoVGCQgERcCAxoACAU3ABEXAgMaAAsFGDcAERcCAxoUCgABSQAGOA8LGBsPAAYYLwsYGw8AAU4ABD8QHAUAAU8ABSkbCQ4BAAFMAAktCh8eDgMHCw8AAU0ADT4TGjQsGQMaFA0FHhkAFz4TGjQsGQMaFA0FHhk1NBkCHgUbGBEPAAFCABg9GgkjIAEmOgUHDQ8eFSU5DggJAwEcAwUAAUMAAUAAAUEADQEtFw0FBwtdWxQTGSAACBwrAxUPBR4ZAAkqGgUDAwMVEQ0ACC4DJD8eAx8RAAQ5GhUYAAFGAAAABjYRExELBAACWhgAAVoAQAg/PTw0NxcQPCQ5C3JZEBs9fkcnDRcUAXZia0Q4EhQgXHojMBY3MWVCNT0uDhMXcGQ7AUFPHigkQUwQFkhaAkEACjkTEQspNBMZPC0ABjkTEQsrLQ==");
574 | var b = function(e) {
575 | return __g._encrypt(encodeURIComponent(e))
576 | };
577 | exports.ENCRYPT_VERSION = A,
578 | exports.default = b;
579 | return b(data);
580 | }
581 |
582 | function sign() {
583 | var e='/api/v4/search_v3?t=general&q=%E8%AE%A1%E7%AE%97%E6%9C%BA&correction=1&offset=0&limit=20&filter_fields=&lc_idx=0&show_all_topics=0&search_source=Normal';
584 | var t;
585 | var n={
586 | "zse93": "101_3_2.0",
587 | "dc0": "\"AKAd6l0dWxSPTms8XrZqgIZ_svQ7C2gshxg=|1642491988\"",
588 | "xZst81": null
589 | };
590 | U = function(e) {
591 | var t = new URL(e,"https://www.zhihu.com");
592 | return "" + t.pathname + t.search
593 | }
594 | , M = function(e) {
595 | return null == e ? "" : "string" == typeof e ? e : "undefined" != typeof URLSearchParams && e instanceof URLSearchParams ? e.toString() : u()(e) ? JSON.stringify(e) : ("object" == typeof (t = e) ? null === t : "function" != typeof t) ? String(e) : "";
596 | var t
597 | }
598 | , B = function(e, t) {
599 | return void 0 === t && (t = 4096),
600 | !!e && function(e) {
601 | return new Blob([e]).size
602 | }(e) <= t
603 | };
604 | var r = n.zse93
605 | , i = n.dc0
606 | , o = n.xZst81
607 | , c = U(e)
608 | , u = M(t)
609 | , s = [r, c, i, B(u) && u, o].filter(Boolean).join("+");
610 | var signature = "2.0_"+myA(myL(s));
611 | console.log(signature);
612 | return signature;
613 | }
614 | sign();
--------------------------------------------------------------------------------
/知乎/知乎x-zse-96.py:
--------------------------------------------------------------------------------
1 | """
2 | __title__ = '23.知乎x-zse-96'
3 | __author__ = '小肩膀教育'
4 | __mtime__ = '2022/1/18'
5 | """
6 | import execjs,requests
7 |
8 | file=open('./js/zh.js','r',encoding='utf8').read()
9 | js_code=execjs.compile(file)
10 | sign=js_code.call('sign')
11 | print(sign)
12 |
13 | url='https://www.zhihu.com/api/v4/search_v3?t=general&q=%E8%AE%A1%E7%AE%97%E6%9C%BA&correction=1&offset=0&limit=20&filter_fields=&lc_idx=0&show_all_topics=0&search_source=Normal'
14 | headers={
15 | 'sec-ch-ua': '" Not;A Brand";v="99", "Google Chrome";v="97", "Chromium";v="97"',
16 | 'sec-ch-ua-mobile': '?0',
17 | 'sec-ch-ua-platform': 'Windows',
18 | 'sec-fetch-dest': 'empty',
19 | 'sec-fetch-mode': 'cors',
20 | 'sec-fetch-site': 'same-origin',
21 | 'cookie': '_xsrf=tqG2Nx23Nco8Ld5DKwQeombW9SgymjRW; _zap=fec0b45f-a986-47a9-944c-651d127c8468; d_c0="AKAd6l0dWxSPTms8XrZqgIZ_svQ7C2gshxg=|1642491988"; Hm_lvt_98beee57fd2ef70ccdd5ca52b9740c49=1642491996; Hm_lpvt_98beee57fd2ef70ccdd5ca52b9740c49=1642495306; KLBRSID=4efa8d1879cb42f8c5b48fe9f8d37c16|1642495299|1642491987',
22 | 'referer': 'https://www.zhihu.com/search?type=content&q=%E8%AE%A1%E7%AE%97%E6%9C%BA',
23 | 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36',
24 | 'x-ab-param': 'tp_topic_style=0;qap_question_author=0;se_ffzx_jushen1=0;tp_contents=2;zr_slotpaidexp=1;qap_question_visitor= 0;zr_expslotpaid=1;tp_zrec=0;pf_adjust=0;pf_noti_entry_num=0;tp_dingyue_video=0;top_test_4_liguangyi=1',
25 | 'x-ab-pb': 'CtgBQAE/ACoDTwNQA1wGQwALBIwE1gSLBTQM4AubC7ULRwC3A/QDKQUyBTsCjQQVBQEGTwdpAVcE+gZmBzcMdAHcCw8LUQUqBqsGcgebB+kE5wXrBtMH8wOhAzcFuQfaBD8GhAKeBVcHeweyB+QKQQZUB88L9gJqAVIFjAUWBrkCpgQzBYkMfQLYArIFBwcBC1YMzAKUBqMH1wvsCqADGQXCBaIGdwfYB+MFUgu0ClYFfgZ4B7QAgAUxBqYGYAszBNcCogMbABEFeQfcBwcM9AvGBjIDMAbdBycHEmwAAAIAAAAYAAAAAAAAAgMAAAAAAAAAAAAAAAAAAAEAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAsAAAAAAAsAAAAAAAAAAAEAAAAAAQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=',
26 | 'x-api-version': '3.0.91',
27 | 'x-app-za': 'OS=Web',
28 | 'x-requested-with': 'fetch',
29 | 'x-zse-93': '101_3_2.0',
30 | 'x-zse-96': sign
31 | }
32 | html=requests.get(url,headers=headers)
33 | print(html.json())
--------------------------------------------------------------------------------
/空中网/analyse.txt:
--------------------------------------------------------------------------------
1 | 1.eval混淆的代码先解析
2 | 2.在JS中调用的JSON函数可能在返回的包
3 | 而不再JS中,如下边的例子
4 | jsonpCallbackKongZ
--------------------------------------------------------------------------------
/空中网/kzw.js:
--------------------------------------------------------------------------------
1 | var KZLoginHandler = {
2 | 'id': 'kongzhong-login-agent',
3 | 'loginServer': 'http://sso.kongzhong.com',
4 | 'service': '',
5 | 'targetService': '',
6 | 'j_data': null,
7 | 'f_call_back': null,
8 | 'timestamp': 0,
9 | 'completed': false,
10 | 'renew': false,
11 | 'init': function() {
12 | this.j_data = null;
13 | this.f_call_back = null;
14 | this.timestamp = 0;
15 | this.completed = true;
16 | },
17 | 'check': function(call_back) {
18 | this.init();
19 | this.f_call_back = call_back;
20 | var param = "jsonp=j";
21 | if (this.service != null && jQuery.trim(this.service) != "") {
22 | param += "&service=" + decodeURIComponent(this.service)
23 | };
24 | if (this.targetService != null && jQuery.trim(this.targetService) != "") {
25 | param += "&targetService=" + decodeURIComponent(this.targetService)
26 | };
27 | if (this.renew) {
28 | param += "&renew=1"
29 | };
30 | this.exec_login(param)
31 | },
32 | 'exec_login': function(param) {
33 | if (this.completed == false) {
34 | return false
35 | };
36 | if (this.j_data != null && this.j_data["state"] == "1") {
37 | var data = {};
38 | data["user"] = this.j_data["user"];
39 | data["service"] = this.j_data["service"];
40 | data["logged"] = true;
41 | data["dc"] = this.j_data["dc"];
42 | this.f_call_back(data);
43 | return false
44 | };
45 | var url = this.loginServer + "/ajaxLogin";
46 | jQuery.ajax({
47 | async: false,
48 | url: url,
49 | type: 'post',
50 | dataType: 'jsonp',
51 | jsonp: 'j',
52 | data: param,
53 | jsonpCallback: "j",
54 | timeout: 5000,
55 | success: function(json) {},
56 | error: function(xhr) {}
57 | })
58 | },
59 | 'jsonpCallbackKongZ': function(vData) {
60 | this.j_data = vData;
61 | this.timestamp = Date.parse(new Date());
62 | if (this.f_call_back != null) {
63 | var data = {};
64 | if (vData["state"] == "0") {
65 | data["service"] = vData["service"];
66 | data["logged"] = false;
67 | data["errors"] = vData["kzmsg"];
68 | if (vData["requirevcode"] != null && vData["requirevcode"] == "1") {
69 | data["requirevcode"] = true
70 | } else {
71 | data["requirevcode"] = false
72 | }
73 | } else if (vData["state"] == "1") {
74 | data["user"] = vData["user"];
75 | data["service"] = vData["service"];
76 | data["logged"] = true
77 | };
78 | data["dc"] = this.j_data["dc"];
79 | this.f_call_back(data)
80 | };
81 | this.completed = true
82 | },
83 | 'login': function(user, pwd, to_save, vcode, call_back) {
84 | var tempTime = Date.parse(new Date()) - this.timestamp;
85 | if ((tempTime / 1000) >= 180) {
86 | this.j_data = null
87 | };
88 | if (this.j_data == null || this.j_data == "") {
89 | this.check(function(data) {
90 | this.f_call_back = call_back;
91 | var param = "";
92 | param += "&type=1";
93 | if (this.service != null && jQuery.trim(this.service) != "") {
94 | param += "&service=" + decodeURIComponent(this.service)
95 | };
96 | param += "&username=" + user;
97 | param += "&password=" + this.encrypt(pwd, data["dc"]);
98 | param += "&vcode=" + vcode;
99 | if (to_save) {
100 | param += "&toSave=1"
101 | } else {
102 | param += "&toSave=0"
103 | };
104 | if (this.targetService != null && jQuery.trim(this.targetService) != "") {
105 | param += "&targetService=" + decodeURIComponent(this.targetService)
106 | };
107 | if (this.renew) {
108 | param += "&renew=1"
109 | };
110 | this.exec_login(param)
111 | })
112 | } else {
113 | this.f_call_back = call_back;
114 | var param = "";
115 | param += "&type=1";
116 | if (this.service != null && jQuery.trim(this.service) != "") {
117 | param += "&service=" + decodeURIComponent(this.service)
118 | };
119 | param += "&username=" + user;
120 | param += "&password=" + this.encrypt(pwd, this.j_data["dc"]);
121 | param += "&vcode=" + vcode;
122 | if (to_save) {
123 | param += "&toSave=1"
124 | } else {
125 | param += "&toSave=0"
126 | };
127 | if (this.targetService != null && jQuery.trim(this.targetService) != "") {
128 | param += "&targetService=" + decodeURIComponent(this.targetService)
129 | };
130 | if (this.renew) {
131 | param += "&renew=1"
132 | };
133 | this.exec_login(param)
134 | }
135 | },
136 | 'login_sms': function(user, smscode, to_save, vcode, call_back) {
137 | var tempTime = Date.parse(new Date()) - this.timestamp;
138 | if ((tempTime / 1000) >= 180) {
139 | this.j_data = null
140 | };
141 | if (this.j_data == null || this.j_data == "") {
142 | this.check(function() {
143 | this.f_call_back = call_back;
144 | var param = "";
145 | param += "&type=2";
146 | param += "&service=" + this.service;
147 | param += "&username=" + user;
148 | param += "&vcode=" + vcode;
149 | param += "&smscode=" + smscode;
150 | if (to_save) {
151 | param += "&toSave=1"
152 | } else {
153 | param += "&toSave=0"
154 | };
155 | if (this.targetService != null) {
156 | param += "&targetService=" + decodeURIComponent(this.targetService)
157 | };
158 | if (this.renew) {
159 | param += "&renew=1"
160 | };
161 | this.exec_login(param)
162 | })
163 | } else {
164 | this.f_call_back = call_back;
165 | var param = "";
166 | param += "&type=2";
167 | param += "&service=" + this.service;
168 | param += "&username=" + user;
169 | param += "&vcode=" + vcode;
170 | param += "&smscode=" + smscode;
171 | if (to_save) {
172 | param += "&toSave=1"
173 | } else {
174 | param += "&toSave=0"
175 | };
176 | if (this.targetService != null) {
177 | param += "&targetService=" + decodeURIComponent(this.targetService)
178 | };
179 | if (this.renew) {
180 | param += "&renew=1"
181 | };
182 | this.exec_login(param)
183 | }
184 | },
185 | 'login_reg': function(user, pwd, to_save, call_back) {
186 | var tempTime = Date.parse(new Date()) - this.timestamp;
187 | if ((tempTime / 1000) >= 180) {
188 | this.j_data = null
189 | };
190 | if (this.j_data == null || this.j_data == "") {
191 | this.check(function() {
192 | this.f_call_back = call_back;
193 | var param = "";
194 | param += "&type=101";
195 | param += "&service=" + this.service;
196 | param += "&username=" + user;
197 | param += "&password=" + pwd;
198 | if (to_save) {
199 | param += "&toSave=1"
200 | } else {
201 | param += "&toSave=0"
202 | };
203 | if (this.renew) {
204 | param += "&renew=1"
205 | };
206 | this.exec_login(param)
207 | })
208 | } else {
209 | this.f_call_back = call_back;
210 | var param = "";
211 | param += "&type=101";
212 | param += "&service=" + this.service;
213 | param += "&username=" + user;
214 | param += "&password=" + pwd;
215 | if (to_save) {
216 | param += "&toSave=1"
217 | } else {
218 | param += "&toSave=0"
219 | };
220 | if (this.renew) {
221 | param += "&renew=1"
222 | };
223 | this.exec_login(param)
224 | }
225 | },
226 | 'encrypt': function(str, pwd) {
227 | if (pwd == null || pwd.length <= 0) {
228 | return null
229 | };
230 | var prand = "";
231 | for (var i = 0; i < pwd.length; i++) {
232 | prand += pwd.charCodeAt(i).toString()
233 | };
234 | var sPos = Math.floor(prand.length / 5);
235 | var mult = parseInt(prand.charAt(sPos) + prand.charAt(sPos * 2) + prand.charAt(sPos * 3) + prand.charAt(sPos * 4) + prand.charAt(sPos * 5));
236 | var incr = Math.ceil(pwd.length / 2);
237 | var modu = Math.pow(2, 31) - 1;
238 | if (mult < 2) {
239 | return null
240 | };
241 | var salt = Math.round(Math.random() * 1000000000) % 100000000;
242 | prand += salt;
243 | while (prand.length > 10) {
244 | var a = prand.substring(0, 1);
245 | var b = prand.substring(10, prand.length);
246 | if (b.length > 10) {
247 | prand = b
248 | } else {
249 | prand = (parseInt(a) + parseInt(b)).toString()
250 | }
251 | };
252 | prand = (mult * prand + incr) % modu;
253 | var enc_chr = "";
254 | var enc_str = "";
255 | for (var i = 0; i < str.length; i++) {
256 | enc_chr = parseInt(str.charCodeAt(i) ^ Math.floor((prand / modu) * 255));
257 | if (enc_chr < 16) {
258 | enc_str += "0" + enc_chr.toString(16)
259 | } else enc_str += enc_chr.toString(16);
260 | prand = (mult * prand + incr) % modu
261 | };
262 | salt = salt.toString(16);
263 | while (salt.length < 8) salt = "0" + salt;
264 | enc_str += salt;
265 | return enc_str
266 | }
267 | };
--------------------------------------------------------------------------------
/空中网/kzw2.js:
--------------------------------------------------------------------------------
1 | encrypt = function(str, pwd) {
2 | if (pwd == null || pwd.length <= 0) {
3 | return null
4 | };
5 | var prand = "";
6 | for (var i = 0; i < pwd.length; i++) {
7 | prand += pwd.charCodeAt(i).toString()
8 | };
9 | var sPos = Math.floor(prand.length / 5);
10 | var mult = parseInt(prand.charAt(sPos) + prand.charAt(sPos * 2) + prand.charAt(sPos * 3) + prand.charAt(sPos * 4) + prand.charAt(sPos * 5));
11 | var incr = Math.ceil(pwd.length / 2);
12 | var modu = Math.pow(2, 31) - 1;
13 | if (mult < 2) {
14 | return null
15 | };
16 | var salt = Math.round(Math.random() * 1000000000) % 100000000;
17 | prand += salt;
18 | while (prand.length > 10) {
19 | var a = prand.substring(0, 1);
20 | var b = prand.substring(10, prand.length);
21 | if (b.length > 10) {
22 | prand = b
23 | } else {
24 | prand = (parseInt(a) + parseInt(b)).toString()
25 | }
26 | };
27 | prand = (mult * prand + incr) % modu;
28 | var enc_chr = "";
29 | var enc_str = "";
30 | for (var i = 0; i < str.length; i++) {
31 | enc_chr = parseInt(str.charCodeAt(i) ^ Math.floor((prand / modu) * 255));
32 | if (enc_chr < 16) {
33 | enc_str += "0" + enc_chr.toString(16)
34 | } else enc_str += enc_chr.toString(16);
35 | prand = (mult * prand + incr) % modu
36 | };
37 | salt = salt.toString(16);
38 | while (salt.length < 8) salt = "0" + salt;
39 | enc_str += salt;
40 | return enc_str
41 | }
--------------------------------------------------------------------------------
/网易/netease.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import time,math
3 | import execjs
4 |
5 | class Netease:
6 | def __init__(self,username,pwd):
7 | self.username=username
8 | self.pwssword=pwd
9 | self.session=requests.session()
10 | self.session.headers={
11 | 'Content-Type': 'application/json',
12 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
13 | 'Cookie': 'JSESSIONID-WYTXZ=wVLPprkMsrmAn30MXs8Ybew%2FccT09%2BuRSNAlyTZkMAT%5C8uCL9bqlaE7ST5VPxEBQ5feIHpDAJXll7Wrz3E7cfoNsdW2B7FafEMfMGHRVNi7vsitG2Ya9xkpkomkxRoGArHDR1GzZBE%2Bfx9Pn3OY8ZLeS0%2BjRmNV6ENTElja31b5pKofy%3A1576837035294; _mloixed92=30; _ihtxzdilxldP8_=30; ntes_zc_cid=e08850b5-d601-4231-be90-6fd6c7ac92d2; _9755xjdesxxd_=32; YD00000710348764%3AWM_TID=UVPb4b1EsftABARUVVZt7kxZwtCzX1uy; l_yd_sign=-020170531dRcJz1xcUE_bbAmOKnWeEXVsB1YWrmodrMHy3rnXq2FUgRLyhJ1UXm7zN2VGisRlLd9YoRqSdZrgluO7j5tXpT1kW5kpIzKqfzOAjYR0wDWg..; _ntes_nnid=e090390db2c38403d3e29f61797522e4,1578922608044; UM_distinctid=16f9f1f0a058d6-00c2ac32ae1d1f-6701b35-144000-16f9f1f0a066bd; hb_MA-BFF5-63705950A31C_u=%7B%22utm_source%22%3A%20%22cp-400000000446017%22%2C%22utm_medium%22%3A%20%22share%22%2C%22utm_campaign%22%3A%20%22commission%22%2C%22utm_content%22%3A%20%22%22%2C%22utm_term%22%3A%20%22%22%2C%22promotional_id%22%3A%20%22%22%7D; _ntes_nuid=e090390db2c38403d3e29f61797522e4; vinfo_n_f_l_n3=0be26d80ec537070.1.1.1578922608054.1578924079245.1580868814230; hb_MA-BFF5-63705950A31C_source=cp.study.163.com; NTES_hp_textlink1=old; NNSSPID=d14918c7ed6f44e081ed37dfa3df71b0; YD00000710348764%3AWM_NI=whs5GSCePDhQiaJp9Yhmm1GhEnQF%2BfM8%2FyXt3uYovupfF9DFbdptJKKl2racwBvrp%2FZ09nNn0YjsAAMYv28yRGJWOnF58YaywflgG6a6fTkXFGoiQBwz6q%2BPLg3lkDc1RXQ%3D; YD00000710348764%3AWM_NIKE=9ca17ae2e6ffcda170e2e6eed5c23e9abfbb93c67f8bb08fa6c55b968e9f85ae4b93b5ffa5f3608dabfaa8cf2af0fea7c3b92ab5b8bdd6c65981bba0a5eb5babbf8691bc53acb3a3d2c66487b29fa7aa6e8fe8e19adb80f1ab9790f57fb4ba8adac74ea2bcc095c94189b4fe93e469b59eba93f3259af0f78fcd66f487a694c44b8f87bad3bb73929986b8ce6686ebf8bae473b5baa488c63ea3eaaab5ea548699a18ad44ab5a6fa92aa5c90b9fd8dea50a1ef9eb9d437e2a3; THE_LAST_LOGIN=losenine@163.com; cm_newmsg=user%3Dlosenine%40163.com%26new%3D14%26total%3D27; BAIDU_SSP_lcr=https://www.baidu.com/link?url=ZxbKp4j-KfU975P8ZEDVLfGHjLiRcfOQNeJgk0gcsp3&wd=&eqid=a8b2b577003f0d7b000000035e3e92c4; utid=cxJxu9csTK15MomIxtwtGNx0y0KQoiXp; P_INFO=losenine@163.com|1581160870|0|163|00&99|bej&1581160852&caldav#bej&null#10#0#0|&0|163&youdaodict_client&study|losenine@163.com; webzjcookiecheck=1; l_s_163MODXOXd=5B4AE6BFF238CE247A553C01A50AC390DD270BB7D69E4B49CECE2D089A2E61D79662EDE0B5061E5F49B92D325B0DF41C7238221AADB64C65293408C10DAA9800F4C44D9840BBDAD8C6F2C4E50B9ECF7825D413DB60BC0CDF0BB42AF4B4AD1BA9CD9C1F88078EA8F6B7EFF6DC14F80A6B; gdxidpyhxdE=ovC9lzvB4gyKhBG%2BJtApI7Hd%2BS%2FbjMaxYKz5rciPLYMElyKudSzmpr9QvxvoRafC%5CG%5CzDhdd7e8w5SI3WY69E5zZ4z6PJ03q69qZsYu3jRj%2Bu3cNPnKz5%2FQyYIK8j5RhgEnhI7OqZgYA%2FylYA0twEZe%5CAz6fCWmILXeeHn2gje88Hxji%3A1581163008893; JSESSIONID-WYTXZDL=DRfGdPPHjW6MdVfDs5JuQOP5wSwOhO3YE5LJbZjJTpXiliKEhjG9L9INOdG2ghMDmF29nO2R%5CvW7ZFcpK0GeMMZghE7ZHhHNHVYDsOIOrPkYvSreeA%5CB%5CIDQDLNFFT4nGStizhfzTRoo7rSR8rsu1yGGVagsQ%2Bmvxa0LQ%2BZv1QjSys7o%3A1581163029305'}
14 |
15 | def getTime(self):
16 | return str(math.floor(time.time()*1000))
17 |
18 | def getRtid(self):
19 | with open('rtid.js','r',encoding='utf8')as f:
20 | content=f.read()
21 | jsdata=execjs.compile(content)
22 | rtid=jsdata.call('getRtid')
23 |
24 | self.rtid=rtid
25 | print('rtid:', self.rtid)
26 |
27 | def getTK(self):
28 | params={
29 | 'un': self.username,
30 | 'pkid': 'MODXOXd',
31 | 'pd': '163',
32 | 'channel': '0',
33 | 'topURL': 'https://www.163.com/',
34 | 'rtid': self.rtid,
35 | 'nocache': self.getTime()
36 | }
37 | html=self.session.get('https://dl.reg.163.com/dl/gt',params=params)
38 | self.tk=html.json()['tk']
39 | print('tk:',self.tk)
40 |
41 | def getpwd(self):
42 | with open('netease.js','r',encoding='utf8')as f:
43 | content=f.read()
44 | jsdata=execjs.compile(content)
45 | pw=jsdata.call('getpwd',self.pwssword)
46 | print('pw:',pw)
47 | return pw
48 |
49 | def login(self):
50 | json_data={"un":self.username,
51 | "pw":self.getpwd(),
52 | "pd":"163",
53 | "l":0,
54 | "d":10,
55 | "t":self.getTime(),
56 | "pkid":"MODXOXd",
57 | "domains":"163.com",
58 | "tk":self.tk,
59 | "pwdKeyUp":1,
60 | "channel":0,
61 | "topURL":"https://www.163.com/",
62 | "rtid":self.rtid}
63 |
64 | url='https://dl.reg.163.com/dl/l'
65 | html=self.session.post(url,json=json_data).text
66 | print(html)
67 |
68 | def start(self):
69 | self.getRtid()
70 | self.getTK()
71 |
72 | self.login()
73 |
74 | if __name__ == '__main__':
75 | username="losenine@163.com"
76 | pwd='123456'
77 | N=Netease(username,pwd)
78 | N.start()
--------------------------------------------------------------------------------
/网易/rtid.js:
--------------------------------------------------------------------------------
1 | function getRtid() {
2 | var e = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
3 | , t = 32
4 | , i = [];
5 | for (; t-- > 0; )
6 | i[t] = e.charAt(Math.random() * e.length);
7 | return i.join("")
8 | };
--------------------------------------------------------------------------------
/网易云音乐/music.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LoseNine/Crack-JS-Spider/9d36933c032b47498e09f2451624ebfd2645b825/网易云音乐/music.mp3
--------------------------------------------------------------------------------
/网易云音乐/wyy.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LoseNine/Crack-JS-Spider/9d36933c032b47498e09f2451624ebfd2645b825/网易云音乐/wyy.js
--------------------------------------------------------------------------------
/网易云音乐/wyy.py:
--------------------------------------------------------------------------------
1 | import requests
2 | import execjs
3 | from urllib import parse
4 |
5 | def getArgs(fun,songid):
6 | data=str({'ids': "[" + str(songid) + "]", 'br': 128000, 'csrf_token': ""})
7 | with open('./wyy.js','r',encoding='gbk')as f:
8 | content=f.read()
9 | jsData=execjs.compile(content)
10 | data=jsData.call(fun,data)
11 | return data
12 |
13 | headers={
14 | 'Referer': 'https://music.163.com/',
15 | 'Content-Type': 'application/x-www-form-urlencoded',
16 | 'User-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36'
17 | }
18 | session=requests.session()
19 | session.headers=headers
20 |
21 | def get_music(songid):
22 | url='https://music.163.com/weapi/song/enhance/player/url?csrf_token='
23 | jsdata=getArgs('getargs',songid)
24 | data={
25 | 'params': parse.quote(jsdata['encText']),
26 | 'encSecKey': parse.quote(jsdata['encSecKey'])
27 | }
28 | html=session.post(url,data=data,headers=headers)
29 | print('正在获取Music....')
30 | try:
31 | url=html.json()['data'][0]['url']
32 | print('正在下载歌曲....')
33 | download(url)
34 | print('歌曲下载完毕....')
35 | except:
36 | get_music(songid)
37 |
38 | def download(url):
39 | with open('music.mp3','wb')as f:
40 | f.write(requests.get(url).content)
41 |
42 | def main():
43 | sid=input('输入歌曲所在URL,如 https://music.163.com/#/song?id=1413142894>>>')
44 | number=sid.split('=')[-1]
45 | get_music(number)
46 |
47 | if __name__ == '__main__':
48 | main()
--------------------------------------------------------------------------------
/财联社/cls.js:
--------------------------------------------------------------------------------
1 |
2 | var tres=function(){
3 | var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
4 | , n = {
5 | rotl: function(e, t) {
6 | return e << t | e >>> 32 - t
7 | },
8 | rotr: function(e, t) {
9 | return e << 32 - t | e >>> t
10 | },
11 | endian: function(e) {
12 | if (e.constructor == Number)
13 | return 16711935 & n.rotl(e, 8) | 4278255360 & n.rotl(e, 24);
14 | for (var t = 0; t < e.length; t++)
15 | e[t] = n.endian(e[t]);
16 | return e
17 | },
18 | randomBytes: function(e) {
19 | for (var t = []; e > 0; e--)
20 | t.push(Math.floor(256 * Math.random()));
21 | return t
22 | },
23 | bytesToWords: function(e) {
24 | for (var t = [], n = 0, r = 0; n < e.length; n++,
25 | r += 8)
26 | t[r >>> 5] |= e[n] << 24 - r % 32;
27 | return t
28 | },
29 | wordsToBytes: function(e) {
30 | for (var t = [], n = 0; n < 32 * e.length; n += 8)
31 | t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
32 | return t
33 | },
34 | bytesToHex: function(e) {
35 | for (var t = [], n = 0; n < e.length; n++)
36 | t.push((e[n] >>> 4).toString(16)),
37 | t.push((15 & e[n]).toString(16));
38 | return t.join("")
39 | },
40 | hexToBytes: function(e) {
41 | for (var t = [], n = 0; n < e.length; n += 2)
42 | t.push(parseInt(e.substr(n, 2), 16));
43 | return t
44 | },
45 | bytesToBase64: function(e) {
46 | for (var n = [], r = 0; r < e.length; r += 3)
47 | for (var o = e[r] << 16 | e[r + 1] << 8 | e[r + 2], i = 0; i < 4; i++)
48 | 8 * r + 6 * i <= 8 * e.length ? n.push(t.charAt(o >>> 6 * (3 - i) & 63)) : n.push("=");
49 | return n.join("")
50 | },
51 | base64ToBytes: function(e) {
52 | e = e.replace(/[^A-Z0-9+\/]/gi, "");
53 | for (var n = [], r = 0, o = 0; r < e.length; o = ++r % 4)
54 | 0 != o && n.push((t.indexOf(e.charAt(r - 1)) & Math.pow(2, -2 * o + 8) - 1) << 2 * o | t.indexOf(e.charAt(r)) >>> 6 - 2 * o);
55 | return n
56 | }
57 | };
58 | return n
59 | }();
60 |
61 |
62 |
63 | var ores=function(){
64 | function n(e) {
65 | return !!e.constructor && "function" === typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
66 | }
67 | return function(e) {
68 | return null != e && (n(e) || function(e) {
69 | return "function" === typeof e.readFloatLE && "function" === typeof e.slice && n(e.slice(0, 0))
70 | }(e) || !!e._isBuffer)
71 | }
72 |
73 | }();
74 |
75 | var ires=function(){
76 | var n = {
77 | utf8: {
78 | stringToBytes: function(e) {
79 | return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
80 | },
81 | bytesToString: function(e) {
82 | return decodeURIComponent(escape(n.bin.bytesToString(e)))
83 | }
84 | },
85 | bin: {
86 | stringToBytes: function(e) {
87 | for (var t = [], n = 0; n < e.length; n++)
88 | t.push(255 & e.charCodeAt(n));
89 | return t
90 | },
91 | bytesToString: function(e) {
92 | for (var t = [], n = 0; n < e.length; n++)
93 | t.push(String.fromCharCode(e[n]));
94 | return t.join("")
95 | }
96 | }
97 | };
98 | return n
99 | }();
100 |
101 | var rres=function(){
102 | var n = {
103 | utf8: {
104 | stringToBytes: function(e) {
105 | return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
106 | },
107 | bytesToString: function(e) {
108 | return decodeURIComponent(escape(n.bin.bytesToString(e)))
109 | }
110 | },
111 | bin: {
112 | stringToBytes: function(e) {
113 | for (var t = [], n = 0; n < e.length; n++)
114 | t.push(255 & e.charCodeAt(n));
115 | return t
116 | },
117 | bytesToString: function(e) {
118 | for (var t = [], n = 0; n < e.length; n++)
119 | t.push(String.fromCharCode(e[n]));
120 | return t.join("")
121 | }
122 | }
123 | };
124 | return n
125 | }();
126 | var t = tres
127 | , r = rres.utf8
128 | , o = ores
129 | , i = ires.bin
130 | , u = function(e, n) {
131 | e.constructor == String ? e = n && "binary" === n.encoding ? i.stringToBytes(e) : r.stringToBytes(e) : o(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString());
132 | for (var a = t.bytesToWords(e), s = 8 * e.length, c = 1732584193, f = -271733879, p = -1732584194, h = 271733878, l = 0; l < a.length; l++)
133 | a[l] = 16711935 & (a[l] << 8 | a[l] >>> 24) | 4278255360 & (a[l] << 24 | a[l] >>> 8);
134 | a[s >>> 5] |= 128 << s % 32,
135 | a[14 + (s + 64 >>> 9 << 4)] = s;
136 | var d = u._ff
137 | , y = u._gg
138 | , m = u._hh
139 | , g = u._ii;
140 | for (l = 0; l < a.length; l += 16) {
141 | var v = c
142 | , w = f
143 | , x = p
144 | , b = h;
145 | c = d(c, f, p, h, a[l + 0], 7, -680876936),
146 | h = d(h, c, f, p, a[l + 1], 12, -389564586),
147 | p = d(p, h, c, f, a[l + 2], 17, 606105819),
148 | f = d(f, p, h, c, a[l + 3], 22, -1044525330),
149 | c = d(c, f, p, h, a[l + 4], 7, -176418897),
150 | h = d(h, c, f, p, a[l + 5], 12, 1200080426),
151 | p = d(p, h, c, f, a[l + 6], 17, -1473231341),
152 | f = d(f, p, h, c, a[l + 7], 22, -45705983),
153 | c = d(c, f, p, h, a[l + 8], 7, 1770035416),
154 | h = d(h, c, f, p, a[l + 9], 12, -1958414417),
155 | p = d(p, h, c, f, a[l + 10], 17, -42063),
156 | f = d(f, p, h, c, a[l + 11], 22, -1990404162),
157 | c = d(c, f, p, h, a[l + 12], 7, 1804603682),
158 | h = d(h, c, f, p, a[l + 13], 12, -40341101),
159 | p = d(p, h, c, f, a[l + 14], 17, -1502002290),
160 | c = y(c, f = d(f, p, h, c, a[l + 15], 22, 1236535329), p, h, a[l + 1], 5, -165796510),
161 | h = y(h, c, f, p, a[l + 6], 9, -1069501632),
162 | p = y(p, h, c, f, a[l + 11], 14, 643717713),
163 | f = y(f, p, h, c, a[l + 0], 20, -373897302),
164 | c = y(c, f, p, h, a[l + 5], 5, -701558691),
165 | h = y(h, c, f, p, a[l + 10], 9, 38016083),
166 | p = y(p, h, c, f, a[l + 15], 14, -660478335),
167 | f = y(f, p, h, c, a[l + 4], 20, -405537848),
168 | c = y(c, f, p, h, a[l + 9], 5, 568446438),
169 | h = y(h, c, f, p, a[l + 14], 9, -1019803690),
170 | p = y(p, h, c, f, a[l + 3], 14, -187363961),
171 | f = y(f, p, h, c, a[l + 8], 20, 1163531501),
172 | c = y(c, f, p, h, a[l + 13], 5, -1444681467),
173 | h = y(h, c, f, p, a[l + 2], 9, -51403784),
174 | p = y(p, h, c, f, a[l + 7], 14, 1735328473),
175 | c = m(c, f = y(f, p, h, c, a[l + 12], 20, -1926607734), p, h, a[l + 5], 4, -378558),
176 | h = m(h, c, f, p, a[l + 8], 11, -2022574463),
177 | p = m(p, h, c, f, a[l + 11], 16, 1839030562),
178 | f = m(f, p, h, c, a[l + 14], 23, -35309556),
179 | c = m(c, f, p, h, a[l + 1], 4, -1530992060),
180 | h = m(h, c, f, p, a[l + 4], 11, 1272893353),
181 | p = m(p, h, c, f, a[l + 7], 16, -155497632),
182 | f = m(f, p, h, c, a[l + 10], 23, -1094730640),
183 | c = m(c, f, p, h, a[l + 13], 4, 681279174),
184 | h = m(h, c, f, p, a[l + 0], 11, -358537222),
185 | p = m(p, h, c, f, a[l + 3], 16, -722521979),
186 | f = m(f, p, h, c, a[l + 6], 23, 76029189),
187 | c = m(c, f, p, h, a[l + 9], 4, -640364487),
188 | h = m(h, c, f, p, a[l + 12], 11, -421815835),
189 | p = m(p, h, c, f, a[l + 15], 16, 530742520),
190 | c = g(c, f = m(f, p, h, c, a[l + 2], 23, -995338651), p, h, a[l + 0], 6, -198630844),
191 | h = g(h, c, f, p, a[l + 7], 10, 1126891415),
192 | p = g(p, h, c, f, a[l + 14], 15, -1416354905),
193 | f = g(f, p, h, c, a[l + 5], 21, -57434055),
194 | c = g(c, f, p, h, a[l + 12], 6, 1700485571),
195 | h = g(h, c, f, p, a[l + 3], 10, -1894986606),
196 | p = g(p, h, c, f, a[l + 10], 15, -1051523),
197 | f = g(f, p, h, c, a[l + 1], 21, -2054922799),
198 | c = g(c, f, p, h, a[l + 8], 6, 1873313359),
199 | h = g(h, c, f, p, a[l + 15], 10, -30611744),
200 | p = g(p, h, c, f, a[l + 6], 15, -1560198380),
201 | f = g(f, p, h, c, a[l + 13], 21, 1309151649),
202 | c = g(c, f, p, h, a[l + 4], 6, -145523070),
203 | h = g(h, c, f, p, a[l + 11], 10, -1120210379),
204 | p = g(p, h, c, f, a[l + 2], 15, 718787259),
205 | f = g(f, p, h, c, a[l + 9], 21, -343485551),
206 | c = c + v >>> 0,
207 | f = f + w >>> 0,
208 | p = p + x >>> 0,
209 | h = h + b >>> 0
210 | }
211 | return t.endian([c, f, p, h])
212 | };
213 | u._ff = function(e, t, n, r, o, i, u) {
214 | var a = e + (t & n | ~t & r) + (o >>> 0) + u;
215 | return (a << i | a >>> 32 - i) + t
216 | }
217 | ,
218 | u._gg = function(e, t, n, r, o, i, u) {
219 | var a = e + (t & r | n & ~r) + (o >>> 0) + u;
220 | return (a << i | a >>> 32 - i) + t
221 | }
222 | ,
223 | u._hh = function(e, t, n, r, o, i, u) {
224 | var a = e + (t ^ n ^ r) + (o >>> 0) + u;
225 | return (a << i | a >>> 32 - i) + t
226 | }
227 | ,
228 | u._ii = function(e, t, n, r, o, i, u) {
229 | var a = e + (n ^ (t | ~r)) + (o >>> 0) + u;
230 | return (a << i | a >>> 32 - i) + t
231 | }
232 | ,
233 | u._blocksize = 16,
234 | u._digestsize = 16,
235 | result = function(e, n) {
236 | if (void 0 === e || null === e)
237 | throw new Error("Illegal argument " + e);
238 | var r = t.wordsToBytes(u(e, n));
239 | return n && n.asBytes ? r : n && n.asString ? i.bytesToString(r) : t.bytesToHex(r)
240 | }
--------------------------------------------------------------------------------
/酷狗/kg_mid.js:
--------------------------------------------------------------------------------
1 | function guid() {
2 | function e() {
3 | return (65536 * (1 + Math.random()) | 0).toString(16).substring(1)
4 | }
5 | return e() + e() + "-" + e() + "-" + e() + "-" + e() + "-" + e() + e() + e()
6 | };
7 | function md5(e) {
8 | var t, n = 0, o = 8;
9 | function a(e, t, r, i, n, o) {
10 | return m((o = m(m(t, e), m(i, o))) << (n = n) | o >>> 32 - n, r)
11 | }
12 | function u(e, t, r, i, n, o, s) {
13 | return a(t & r | ~t & i, e, t, n, o, s)
14 | }
15 | function l(e, t, r, i, n, o, s) {
16 | return a(t & i | r & ~i, e, t, n, o, s)
17 | }
18 | function p(e, t, r, i, n, o, s) {
19 | return a(t ^ r ^ i, e, t, n, o, s)
20 | }
21 | function f(e, t, r, i, n, o, s) {
22 | return a(r ^ (t | ~i), e, t, n, o, s)
23 | }
24 | function m(e, t) {
25 | var r = (65535 & e) + (65535 & t);
26 | return (e >> 16) + (t >> 16) + (r >> 16) << 16 | 65535 & r
27 | }
28 | return e = e ? function(e) {
29 | for (var t = n ? "0123456789ABCDEF" : "0123456789abcdef", r = "", i = 0; i < 4 * e.length; i++)
30 | r += t.charAt(e[i >> 2] >> i % 4 * 8 + 4 & 15) + t.charAt(e[i >> 2] >> i % 4 * 8 & 15);
31 | return r
32 | }(function(e, t) {
33 | e[t >> 5] |= 128 << t % 32,
34 | e[14 + (t + 64 >>> 9 << 4)] = t;
35 | for (var r = 1732584193, i = -271733879, n = -1732584194, o = 271733878, s = 0; s < e.length; s += 16) {
36 | var a = r
37 | , g = i
38 | , c = n
39 | , d = o;
40 | r = u(r, i, n, o, e[s + 0], 7, -680876936),
41 | o = u(o, r, i, n, e[s + 1], 12, -389564586),
42 | n = u(n, o, r, i, e[s + 2], 17, 606105819),
43 | i = u(i, n, o, r, e[s + 3], 22, -1044525330),
44 | r = u(r, i, n, o, e[s + 4], 7, -176418897),
45 | o = u(o, r, i, n, e[s + 5], 12, 1200080426),
46 | n = u(n, o, r, i, e[s + 6], 17, -1473231341),
47 | i = u(i, n, o, r, e[s + 7], 22, -45705983),
48 | r = u(r, i, n, o, e[s + 8], 7, 1770035416),
49 | o = u(o, r, i, n, e[s + 9], 12, -1958414417),
50 | n = u(n, o, r, i, e[s + 10], 17, -42063),
51 | i = u(i, n, o, r, e[s + 11], 22, -1990404162),
52 | r = u(r, i, n, o, e[s + 12], 7, 1804603682),
53 | o = u(o, r, i, n, e[s + 13], 12, -40341101),
54 | n = u(n, o, r, i, e[s + 14], 17, -1502002290),
55 | i = u(i, n, o, r, e[s + 15], 22, 1236535329),
56 | r = l(r, i, n, o, e[s + 1], 5, -165796510),
57 | o = l(o, r, i, n, e[s + 6], 9, -1069501632),
58 | n = l(n, o, r, i, e[s + 11], 14, 643717713),
59 | i = l(i, n, o, r, e[s + 0], 20, -373897302),
60 | r = l(r, i, n, o, e[s + 5], 5, -701558691),
61 | o = l(o, r, i, n, e[s + 10], 9, 38016083),
62 | n = l(n, o, r, i, e[s + 15], 14, -660478335),
63 | i = l(i, n, o, r, e[s + 4], 20, -405537848),
64 | r = l(r, i, n, o, e[s + 9], 5, 568446438),
65 | o = l(o, r, i, n, e[s + 14], 9, -1019803690),
66 | n = l(n, o, r, i, e[s + 3], 14, -187363961),
67 | i = l(i, n, o, r, e[s + 8], 20, 1163531501),
68 | r = l(r, i, n, o, e[s + 13], 5, -1444681467),
69 | o = l(o, r, i, n, e[s + 2], 9, -51403784),
70 | n = l(n, o, r, i, e[s + 7], 14, 1735328473),
71 | i = l(i, n, o, r, e[s + 12], 20, -1926607734),
72 | r = p(r, i, n, o, e[s + 5], 4, -378558),
73 | o = p(o, r, i, n, e[s + 8], 11, -2022574463),
74 | n = p(n, o, r, i, e[s + 11], 16, 1839030562),
75 | i = p(i, n, o, r, e[s + 14], 23, -35309556),
76 | r = p(r, i, n, o, e[s + 1], 4, -1530992060),
77 | o = p(o, r, i, n, e[s + 4], 11, 1272893353),
78 | n = p(n, o, r, i, e[s + 7], 16, -155497632),
79 | i = p(i, n, o, r, e[s + 10], 23, -1094730640),
80 | r = p(r, i, n, o, e[s + 13], 4, 681279174),
81 | o = p(o, r, i, n, e[s + 0], 11, -358537222),
82 | n = p(n, o, r, i, e[s + 3], 16, -722521979),
83 | i = p(i, n, o, r, e[s + 6], 23, 76029189),
84 | r = p(r, i, n, o, e[s + 9], 4, -640364487),
85 | o = p(o, r, i, n, e[s + 12], 11, -421815835),
86 | n = p(n, o, r, i, e[s + 15], 16, 530742520),
87 | i = p(i, n, o, r, e[s + 2], 23, -995338651),
88 | r = f(r, i, n, o, e[s + 0], 6, -198630844),
89 | o = f(o, r, i, n, e[s + 7], 10, 1126891415),
90 | n = f(n, o, r, i, e[s + 14], 15, -1416354905),
91 | i = f(i, n, o, r, e[s + 5], 21, -57434055),
92 | r = f(r, i, n, o, e[s + 12], 6, 1700485571),
93 | o = f(o, r, i, n, e[s + 3], 10, -1894986606),
94 | n = f(n, o, r, i, e[s + 10], 15, -1051523),
95 | i = f(i, n, o, r, e[s + 1], 21, -2054922799),
96 | r = f(r, i, n, o, e[s + 8], 6, 1873313359),
97 | o = f(o, r, i, n, e[s + 15], 10, -30611744),
98 | n = f(n, o, r, i, e[s + 6], 15, -1560198380),
99 | i = f(i, n, o, r, e[s + 13], 21, 1309151649),
100 | r = f(r, i, n, o, e[s + 4], 6, -145523070),
101 | o = f(o, r, i, n, e[s + 11], 10, -1120210379),
102 | n = f(n, o, r, i, e[s + 2], 15, 718787259),
103 | i = f(i, n, o, r, e[s + 9], 21, -343485551),
104 | r = m(r, a),
105 | i = m(i, g),
106 | n = m(n, c),
107 | o = m(o, d)
108 | }
109 | return Array(r, i, n, o)
110 | }(function(e) {
111 | for (var t = Array(), r = (1 << o) - 1, i = 0; i < e.length * o; i += o)
112 | t[i >> 5] |= (e.charCodeAt(i / o) & r) << i % 32;
113 | return t
114 | }(t = e), t.length * o)) : ""
115 | };
116 |
117 | function test(){
118 | (a = new Date).setTime(a.getTime() + 1e3 * 864000000);
119 | var g = ";expires=" + a.toGMTString();
120 | var i= "; path=/";
121 | var n= "; domain=kugou.com";
122 | var o = "; secure";
123 | var s= "; sameSite=None";
124 | var tt=md5(guid());
125 | var t=encodeURIComponent(tt);
126 | var e="kg_mid";
127 | var cookie = [e, "=", t, g, i, n, o, s].join("");
128 | console.log("cookie:",cookie);
129 | console.log("kg_mid:",tt);
130 | return tt;
131 | };
132 |
--------------------------------------------------------------------------------
/重庆科技资源共享平台/cq.js:
--------------------------------------------------------------------------------
1 | var hexcase = 0;
2 | var b64pad = "";
3 | var chrsz = 8;
4 | function hex_md5(s) {
5 | return binl2hex(core_md5(str2binl(s), s.length * chrsz));
6 | }
7 | function b64_md5(s) {
8 | return binl2b64(core_md5(str2binl(s), s.length * chrsz));
9 | }
10 | function str_md5(s) {
11 | return binl2str(core_md5(str2binl(s), s.length * chrsz));
12 | }
13 | function hex_hmac_md5(key, data) {
14 | return binl2hex(core_hmac_md5(key, data));
15 | }
16 | function b64_hmac_md5(key, data) {
17 | return binl2b64(core_hmac_md5(key, data));
18 | }
19 | function str_hmac_md5(key, data) {
20 | return binl2str(core_hmac_md5(key, data));
21 | }
22 | function md5_vm_test() {
23 | return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
24 | }
25 | function core_md5(x, len) {
26 | x[len >> 5] |= 0x80 << ((len) % 32);
27 | x[(((len + 64) >>> 9) << 4) + 14] = len;
28 | var a = 1732584193;
29 | var b = -271733879;
30 | var c = -1732584194;
31 | var d = 271733878;
32 | for (var i = 0; i < x.length; i += 16) {
33 | var olda = a;
34 | var oldb = b;
35 | var oldc = c;
36 | var oldd = d;
37 | a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
38 | d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
39 | c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
40 | b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
41 | a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
42 | d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
43 | c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
44 | b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
45 | a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
46 | d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
47 | c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
48 | b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
49 | a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
50 | d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
51 | c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
52 | b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
53 | a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
54 | d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
55 | c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
56 | b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
57 | a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
58 | d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
59 | c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
60 | b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
61 | a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
62 | d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
63 | c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
64 | b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
65 | a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
66 | d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
67 | c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
68 | b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
69 | a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
70 | d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
71 | c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
72 | b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
73 | a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
74 | d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
75 | c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
76 | b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
77 | a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
78 | d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
79 | c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
80 | b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
81 | a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
82 | d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
83 | c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
84 | b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
85 | a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
86 | d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
87 | c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
88 | b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
89 | a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
90 | d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
91 | c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
92 | b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
93 | a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
94 | d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
95 | c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
96 | b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
97 | a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
98 | d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
99 | c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
100 | b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
101 | a = safe_add(a, olda);
102 | b = safe_add(b, oldb);
103 | c = safe_add(c, oldc);
104 | d = safe_add(d, oldd);
105 | }
106 | return Array(a, b, c, d);
107 | }
108 | function md5_cmn(q, a, b, x, s, t) {
109 | return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
110 | }
111 | function md5_ff(a, b, c, d, x, s, t) {
112 | return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
113 | }
114 | function md5_gg(a, b, c, d, x, s, t) {
115 | return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
116 | }
117 | function md5_hh(a, b, c, d, x, s, t) {
118 | return md5_cmn(b ^ c ^ d, a, b, x, s, t);
119 | }
120 | function md5_ii(a, b, c, d, x, s, t) {
121 | return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
122 | }
123 | function core_hmac_md5(key, data) {
124 | var bkey = str2binl(key);
125 | if (bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
126 | var ipad = Array(16),
127 | opad = Array(16);
128 | for (var i = 0; i < 16; i++) {
129 | ipad[i] = bkey[i] ^ 0x36363636;
130 | opad[i] = bkey[i] ^ 0x5C5C5C5C;
131 | }
132 | var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
133 | return core_md5(opad.concat(hash), 512 + 128);
134 | }
135 | function safe_add(x, y) {
136 | var lsw = (x & 0xFFFF) + (y & 0xFFFF);
137 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
138 | return (msw << 16) | (lsw & 0xFFFF);
139 | }
140 | function bit_rol(num, cnt) {
141 | return (num << cnt) | (num >>> (32 - cnt));
142 | }
143 | function str2binl(str) {
144 | var bin = Array();
145 | var mask = (1 << chrsz) - 1;
146 | for (var i = 0; i < str.length * chrsz; i += chrsz) bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32);
147 | return bin;
148 | }
149 | function binl2str(bin) {
150 | var str = "";
151 | var mask = (1 << chrsz) - 1;
152 | for (var i = 0; i < bin.length * 32; i += chrsz) str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask);
153 | return str;
154 | }
155 | function binl2hex(binarray) {
156 | var hex_tab = hexcase ? "0123456789ABCDEF": "0123456789abcdef";
157 | var str = "";
158 | for (var i = 0; i < binarray.length * 4; i++) {
159 | str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF);
160 | }
161 | return str;
162 | }
163 | function binl2b64(binarray) {
164 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
165 | var str = "";
166 | for (var i = 0; i < binarray.length * 4; i += 3) {
167 | var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16) | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8) | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF);
168 | for (var j = 0; j < 4; j++) {
169 | if (i * 8 + j * 6 > binarray.length * 32) str += b64pad;
170 | else str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
171 | }
172 | }
173 | return str;
174 | }
175 |
176 | function toMD5Str(s) {
177 | var salt = "1#2$3%4(5)6@7!poeeww$3%4(5)djjkkldss";
178 | return hex_md5(s + "{" + salt + "}");
179 | }
180 | var login_salt = "299431";
181 | function getpwd(password) {
182 |
183 | return toMD5Str(toMD5Str(password) + login_salt);
184 | }
--------------------------------------------------------------------------------