mirror of
https://github.com/luzhisheng/js_reverse.git
synced 2025-04-20 10:25:01 +08:00
更新js逆向代码
This commit is contained in:
parent
d757d0dd89
commit
36332d7b7c
File diff suppressed because one or more lines are too long
15
6-代码包/test
15
6-代码包/test
@ -1,15 +0,0 @@
|
||||
function start_debug(){
|
||||
debugger;
|
||||
}
|
||||
console.log(1111);
|
||||
console.log(2222);
|
||||
console.log(3333);
|
||||
var i=0;
|
||||
while (i < 10){
|
||||
start_debug();
|
||||
i++;
|
||||
console.log("i:", i);
|
||||
}
|
||||
console.log(4444);
|
||||
console.log(5555);
|
||||
console.log(6666);
|
@ -1,54 +0,0 @@
|
||||
|
||||
s = {'include': []};
|
||||
|
||||
var r;
|
||||
|
||||
function y(e, t) {
|
||||
if (null == e)
|
||||
throw new Error("Illegal argument " + e);
|
||||
var n = wordsToBytes(e);
|
||||
return t && t.asBytes ? n : t && t.asString ? a.bytesToString(n) : bytesToHex(n)
|
||||
}
|
||||
|
||||
function A(e, t, n) {
|
||||
var r = null != t ? t : {}
|
||||
, i = r.include
|
||||
, o = r.enforceWithKeys
|
||||
, a = void 0 === o ? [] : o
|
||||
, s = Object.keys(e);
|
||||
|
||||
if (n && i) {
|
||||
var l = i.concat(["service_name", "service_method", "sign_strict"]);
|
||||
s = s.filter((function(e) {
|
||||
return l.includes(e)
|
||||
}
|
||||
))
|
||||
}
|
||||
var c = s.sort().map((function(t) {
|
||||
var n = e[t];
|
||||
return function(e) {
|
||||
return null == e
|
||||
}(n) ? "" : t + (!a.includes(t) && function(e) {
|
||||
return ["string", "number"].includes("string")
|
||||
}(n) ? n : t)
|
||||
}
|
||||
)).join("");
|
||||
return y(e, t)
|
||||
}
|
||||
|
||||
function bytesToHex(e) {
|
||||
for (var t = [], n = 0; n < e.length; n++)
|
||||
t.push((e[n] >>> 4).toString(16)),
|
||||
t.push((15 & e[n]).toString(16));
|
||||
return t.join("")
|
||||
}
|
||||
|
||||
function wordsToBytes(e) {
|
||||
for (var t = [], n = 0; n < 32 * e.length; n += 8)
|
||||
t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
|
||||
return t
|
||||
}
|
||||
|
||||
sign = A("demander.AdStarDemanderService", "GetDemanderInformation", {'demander_id': "1660820368794647"}, s, false);
|
||||
|
||||
console.log(sign);
|
@ -1,87 +0,0 @@
|
||||
import requests
|
||||
import json
|
||||
import time
|
||||
from setting import xhs_account
|
||||
|
||||
|
||||
class XhsApp(object):
|
||||
def __init__(self):
|
||||
self.nodejs_x_s_url = "http://127.0.0.1:3000/get_x_s"
|
||||
self.nodejs_id_url = "http://127.0.0.1:3001/get_sign"
|
||||
self.cookie_url = "https://www.xiaohongshu.com/fe_api/burdock/v2/shield/registerCanvas"
|
||||
self.login_url = "https://customer.xiaohongshu.com/api/cas/loginWithAccount"
|
||||
|
||||
self.sign = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4280.141 " \
|
||||
"Safari/537.36~~~unknown~~~zh-CN~~~24~~~8~~~4~~~-480~~~Asia/Shanghai~~~1~~~1~~~1~~~1~~~unkno" \
|
||||
"wn~~~Linux x86_64~~~Chrome PDF Plugin::Portable Document Format::application/x-google-chrome" \
|
||||
"-pdf~pdf,Chrome PDF Viewer::::application/pdf~pdf,Native Client::::application/x-nacl~,appl" \
|
||||
"ication/x-pnacl~~~~canvas winding:yes~canvas fp:4ed6498d31241a0323aabbcc7f6d68a0~~~false~~~f" \
|
||||
"alse~~~false~~~false~~~false~~~0;false;false~~~0;1;2;3;4;5;6;7;8;9~~~124.04347730432432"
|
||||
|
||||
def get_timestamp(self):
|
||||
t = time.time()
|
||||
return str(round(t * 1000))
|
||||
|
||||
def get_x_s(self, x_t):
|
||||
x_s_data = 'test1test/api/cas/loginWithAccount{"account":"test2","password":"test3",' \
|
||||
'"service":"https://pgy.xiaohongshu.com"}'
|
||||
x_s_data = x_s_data.replace("test1", x_t)\
|
||||
.replace("test2", xhs_account.get('account'))\
|
||||
.replace("test3", xhs_account.get('password'))
|
||||
|
||||
data = {
|
||||
'sign': x_s_data
|
||||
}
|
||||
req = requests.post(self.nodejs_x_s_url, data=data)
|
||||
id = req.text
|
||||
return id
|
||||
|
||||
def get_id(self):
|
||||
data = {
|
||||
'sign': self.sign
|
||||
}
|
||||
req = requests.post(self.nodejs_id_url, data=data)
|
||||
id = req.text
|
||||
return id
|
||||
|
||||
def get_cookie_timestamp2(self, id):
|
||||
data = {
|
||||
'id': id,
|
||||
'sign': self.sign
|
||||
}
|
||||
req = requests.post(self.cookie_url, data=data)
|
||||
canvas = json.loads(req.text).get('data').get('canvas')
|
||||
return canvas
|
||||
|
||||
def get_html(self, timestamp2, x_s, x_t):
|
||||
headers = {
|
||||
'cookie': "timestamp2=" + timestamp2,
|
||||
'x-s': x_s,
|
||||
'x-t': x_t,
|
||||
'content-type': 'application/json;charset=UTF-8'
|
||||
}
|
||||
|
||||
payload = "{\"account\":\"test1\",\"password\":\"test2\"," \
|
||||
"\"service\":\"https://pgy.xiaohongshu.com\"}"
|
||||
payload = payload.replace("test1", xhs_account.get('account')).replace("test2", xhs_account.get('password'))
|
||||
|
||||
req = requests.post(self.login_url, headers=headers, data=payload)
|
||||
return req.text, req.headers
|
||||
|
||||
def run(self):
|
||||
x_t = self.get_timestamp()
|
||||
print('x_t : {}'.format(x_t))
|
||||
|
||||
x_s = self.get_x_s(x_t)
|
||||
print('x_s : {}'.format(x_s))
|
||||
|
||||
id = self.get_id()
|
||||
timestamp2 = self.get_cookie_timestamp2(id)
|
||||
text, headers = self.get_html(timestamp2, x_s, x_t)
|
||||
print(text)
|
||||
print(headers)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
xhs_app = XhsApp()
|
||||
xhs_app.run()
|
@ -1,53 +0,0 @@
|
||||
import requests
|
||||
import json
|
||||
|
||||
|
||||
class XhsApp(object):
|
||||
def __init__(self):
|
||||
self.node_js_url = "http://127.0.0.1:3001/get_sign"
|
||||
self.cookie_url = "https://www.xiaohongshu.com/fe_api/burdock/v2/shield/registerCanvas"
|
||||
self.html_url = "https://www.xiaohongshu.com/discovery/item/5ea02f090000000001001a90"
|
||||
# sign 中的参数按需要改动后获取id值
|
||||
self.sign = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4280.141 " \
|
||||
"Safari/537.36~~~unknown~~~zh-CN~~~24~~~8~~~4~~~-480~~~Asia/Shanghai~~~1~~~1~~~1~~~1~~~unkno" \
|
||||
"wn~~~Linux x86_64~~~Chrome PDF Plugin::Portable Document Format::application/x-google-chrome" \
|
||||
"-pdf~pdf,Chrome PDF Viewer::::application/pdf~pdf,Native Client::::application/x-nacl~,appl" \
|
||||
"ication/x-pnacl~~~~canvas winding:yes~canvas fp:4ed6498d31241a0323aabbcc7f6d68a0~~~false~~~f" \
|
||||
"alse~~~false~~~false~~~false~~~0;false;false~~~0;1;2;3;4;5;6;7;8;9~~~124.04347730432432"
|
||||
|
||||
def get_id(self):
|
||||
data = {
|
||||
'sign': self.sign
|
||||
}
|
||||
req = requests.post(self.node_js_url, data=data)
|
||||
id = req.text
|
||||
return id
|
||||
|
||||
def get_cookie(self, id):
|
||||
data = {
|
||||
'id': id,
|
||||
'sign': self.sign
|
||||
}
|
||||
req = requests.post(self.cookie_url, data=data)
|
||||
canvas = json.loads(req.text).get('data').get('canvas')
|
||||
return canvas
|
||||
|
||||
def get_html(self, cookie):
|
||||
Headers = {
|
||||
'cookie': "timestamp2=" + cookie
|
||||
}
|
||||
req = requests.get(self.html_url, headers=Headers)
|
||||
return req.text
|
||||
|
||||
def run(self):
|
||||
id = self.get_id()
|
||||
print(id)
|
||||
canvas = self.get_cookie(id)
|
||||
print(canvas)
|
||||
html = self.get_html(canvas)
|
||||
print(html)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
xhs_app =XhsApp()
|
||||
xhs_app.run()
|
@ -1,17 +0,0 @@
|
||||
import requests
|
||||
|
||||
url = "https://customer.xiaohongshu.com/api/cas/loginWithAccount"
|
||||
|
||||
payload = "{\"account\":\"feng.bao@winndoo.com\",\"password\":\"Winndoo@com123\"," \
|
||||
"\"service\":\"https://pgy.xiaohongshu.com\"}"
|
||||
|
||||
headers = {
|
||||
'content-type': 'application/json;charset=UTF-8',
|
||||
'x-s': 'OiZk125KZga6ZjcWslMlOidB12MbOY1K0jwvOgACZgA3',
|
||||
'x-t': '1623396152975',
|
||||
'cookie': 'timestamp2=20210611efba504df43e1e6daff3fe96'
|
||||
}
|
||||
|
||||
response = requests.request("POST", url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
@ -1,75 +0,0 @@
|
||||
function encryption(t) {
|
||||
function c(t, e) {
|
||||
return t << e | t >>> 32 - e
|
||||
}
|
||||
|
||||
function u(t, e) {
|
||||
var n, r, o, i, a;
|
||||
return o = 2147483648 & t,
|
||||
i = 2147483648 & e,
|
||||
a = (1073741823 & t) + (1073741823 & e),
|
||||
(n = 1073741824 & t) & (r = 1073741824 & e) ? 2147483648 ^ a ^ o ^ i : n | r ? 1073741824 & a ? 3221225472 ^ a ^ o ^ i : 1073741824 ^ a ^ o ^ i : a ^ o ^ i
|
||||
}
|
||||
|
||||
function e(t, e, n, r, o, i, a) {
|
||||
return u(c(t = u(t, u(u(e & n | ~e & r, o), a)), i), e)
|
||||
}
|
||||
|
||||
function n(t, e, n, r, o, i, a) {
|
||||
return u(c(t = u(t, u(u(e & r | n & ~r, o), a)), i), e)
|
||||
}
|
||||
|
||||
function r(t, e, n, r, o, i, a) {
|
||||
return u(c(t = u(t, u(u(e ^ n ^ r, o), a)), i), e)
|
||||
}
|
||||
|
||||
function o(t, e, n, r, o, i, a) {
|
||||
return u(c(t = u(t, u(u(n ^ (e | ~r), o), a)), i), e)
|
||||
}
|
||||
|
||||
function i(t) {
|
||||
var e, n = "", r = "";
|
||||
for (e = 0; e <= 3; e++)
|
||||
n += (r = "0" + (t >>> 8 * e & 255).toString(16)).substr(r.length - 2, 2);
|
||||
return n
|
||||
}
|
||||
|
||||
var a, s, l, f, p, d, v, h, g, y = Array();
|
||||
for (y = function (t) {
|
||||
for (var e, n = t.length, r = n + 8, o = 16 * ((r - r % 64) / 64 + 1), i = Array(o - 1), a = 0, c = 0; c < n;)
|
||||
a = c % 4 * 8,
|
||||
i[e = (c - c % 4) / 4] = i[e] | t.charCodeAt(c) << a,
|
||||
c++;
|
||||
return a = c % 4 * 8,
|
||||
i[e = (c - c % 4) / 4] = i[e] | 128 << a,
|
||||
i[o - 2] = n << 3,
|
||||
i[o - 1] = n >>> 29,
|
||||
i
|
||||
}(t = function (t) {
|
||||
t = t.replace(/\r\n/g, "\n");
|
||||
for (var e = "", n = 0; n < t.length; n++) {
|
||||
var r = t.charCodeAt(n);
|
||||
r < 128 ? e += String.fromCharCode(r) : (127 < r && r < 2048 ? e += String.fromCharCode(r >> 6 | 192) : (e += String.fromCharCode(r >> 12 | 224),
|
||||
e += String.fromCharCode(r >> 6 & 63 | 128)),
|
||||
e += String.fromCharCode(63 & r | 128))
|
||||
}
|
||||
return e
|
||||
}(t)),
|
||||
d = 1732584193,
|
||||
v = 4023233417,
|
||||
h = 2562383102,
|
||||
g = 271733878,
|
||||
a = 0; a < y.length; a += 16)
|
||||
d = o(d = r(d = r(d = r(d = r(d = n(d = n(d = n(d = n(d = e(d = e(d = e(d = e(s = d, l = v, f = h, p = g, y[a + 0], 7, 3614090360), v = e(v, h = e(h, g = e(g, d, v, h, y[a + 1], 12, 3905402710), d, v, y[a + 2], 17, 606105819), g, d, y[a + 3], 22, 3250441966), h, g, y[a + 4], 7, 4118548399), v = e(v, h = e(h, g = e(g, d, v, h, y[a + 5], 12, 1200080426), d, v, y[a + 6], 17, 2821735955), g, d, y[a + 7], 22, 4249261313), h, g, y[a + 8], 7, 1770035416), v = e(v, h = e(h, g = e(g, d, v, h, y[a + 9], 12, 2336552879), d, v, y[a + 10], 17, 4294925233), g, d, y[a + 11], 22, 2304563134), h, g, y[a + 12], 7, 1804603682), v = e(v, h = e(h, g = e(g, d, v, h, y[a + 13], 12, 4254626195), d, v, y[a + 14], 17, 2792965006), g, d, y[a + 15], 22, 1236535329), h, g, y[a + 1], 5, 4129170786), v = n(v, h = n(h, g = n(g, d, v, h, y[a + 6], 9, 3225465664), d, v, y[a + 11], 14, 643717713), g, d, y[a + 0], 20, 3921069994), h, g, y[a + 5], 5, 3593408605), v = n(v, h = n(h, g = n(g, d, v, h, y[a + 10], 9, 38016083), d, v, y[a + 15], 14, 3634488961), g, d, y[a + 4], 20, 3889429448), h, g, y[a + 9], 5, 568446438), v = n(v, h = n(h, g = n(g, d, v, h, y[a + 14], 9, 3275163606), d, v, y[a + 3], 14, 4107603335), g, d, y[a + 8], 20, 1163531501), h, g, y[a + 13], 5, 2850285829), v = n(v, h = n(h, g = n(g, d, v, h, y[a + 2], 9, 4243563512), d, v, y[a + 7], 14, 1735328473), g, d, y[a + 12], 20, 2368359562), h, g, y[a + 5], 4, 4294588738), v = r(v, h = r(h, g = r(g, d, v, h, y[a + 8], 11, 2272392833), d, v, y[a + 11], 16, 1839030562), g, d, y[a + 14], 23, 4259657740), h, g, y[a + 1], 4, 2763975236), v = r(v, h = r(h, g = r(g, d, v, h, y[a + 4], 11, 1272893353), d, v, y[a + 7], 16, 4139469664), g, d, y[a + 10], 23, 3200236656), h, g, y[a + 13], 4, 681279174), v = r(v, h = r(h, g = r(g, d, v, h, y[a + 0], 11, 3936430074), d, v, y[a + 3], 16, 3572445317), g, d, y[a + 6], 23, 76029189), h, g, y[a + 9], 4, 3654602809), v = r(v, h = r(h, g = r(g, d, v, h, y[a + 12], 11, 3873151461), d, v, y[a + 15], 16, 530742520), g, d, y[a + 2], 23, 3299628645), h, g, y[a + 0], 6, 4096336452),
|
||||
v = o(v = o(v = o(v = o(v, h = o(h, g = o(g, d, v, h, y[a + 7], 10, 1126891415), d, v, y[a + 14], 15, 2878612391), g, d, y[a + 5], 21, 4237533241), h = o(h, g = o(g, d = o(d, v, h, g, y[a + 12], 6, 1700485571), v, h, y[a + 3], 10, 2399980690), d, v, y[a + 10], 15, 4293915773), g, d, y[a + 1], 21, 2240044497), h = o(h, g = o(g, d = o(d, v, h, g, y[a + 8], 6, 1873313359), v, h, y[a + 15], 10, 4264355552), d, v, y[a + 6], 15, 2734768916), g, d, y[a + 13], 21, 1309151649), h = o(h, g = o(g, d = o(d, v, h, g, y[a + 4], 6, 4149444226), v, h, y[a + 11], 10, 3174756917), d, v, y[a + 2], 15, 718787259), g, d, y[a + 9], 21, 3951481745),
|
||||
d = u(d, s),
|
||||
v = u(v, l),
|
||||
h = u(h, f),
|
||||
g = u(g, p);
|
||||
return (i(d) + i(v) + i(h) + i(g)).toLowerCase()
|
||||
}
|
||||
|
||||
module.exports =
|
||||
{
|
||||
encryption
|
||||
};
|
@ -1,18 +0,0 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
const encryption = require("../xhs-x-s");
|
||||
var bodyParser = require('body-parser');
|
||||
app.use(bodyParser());
|
||||
|
||||
|
||||
app.post('/get_x_s', function (req, res) {
|
||||
let result = req.body;
|
||||
let sign = result.sign;
|
||||
console.log(sign);
|
||||
result = encryption.encryption(sign);
|
||||
res.send(result.toString());
|
||||
});
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log("开启服务,端口3000")
|
||||
});
|
@ -1,18 +0,0 @@
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
const encryption = require("../encryption");
|
||||
var bodyParser = require('body-parser');
|
||||
app.use(bodyParser());
|
||||
|
||||
|
||||
app.post('/get_sign', function (req, res) {
|
||||
let result = req.body;
|
||||
let sign = result.sign;
|
||||
console.log(sign);
|
||||
result = encryption.encryption(sign + "hasaki");
|
||||
res.send(result.toString());
|
||||
});
|
||||
|
||||
app.listen(3001, () => {
|
||||
console.log("开启服务,端口3001")
|
||||
});
|
1287
xhs/xhs-x-s.js
1287
xhs/xhs-x-s.js
File diff suppressed because it is too large
Load Diff
@ -1,208 +0,0 @@
|
||||
var _0xafb7 = ['0123456789abcdef', 'charAt', 'length', 'abc', '900150983cd24fb0d6963f7d28e17f72', 'concat', 'charCodeAt', '0123456789ABCDEF'];
|
||||
(function (_0x1d2076, _0x2a7e5a) {
|
||||
var _0x6ffefc = function (_0x3ddd21) {
|
||||
while (--_0x3ddd21) {
|
||||
_0x1d2076['push'](_0x1d2076['shift']());
|
||||
}
|
||||
};
|
||||
_0x6ffefc(++_0x2a7e5a);
|
||||
}(_0xafb7, 0x132));
|
||||
var _0x4f75 = function (_0x254029, _0x1d4b71) {
|
||||
_0x254029 = _0x254029 - 0x0;
|
||||
var _0x18b07e = _0xafb7[_0x254029];
|
||||
return _0x18b07e;
|
||||
};
|
||||
var hexcase = 0x0;
|
||||
var b64pad = '';
|
||||
var chrsz = 0x8;
|
||||
|
||||
function hex_md5(_0x3066e8) {
|
||||
return binl2hex(core_md5(str2binl(_0x3066e8), _0x3066e8[_0x4f75('0x0')] * chrsz));
|
||||
}
|
||||
|
||||
function b64_md5(_0x3e6d2a) {
|
||||
return binl2b64(core_md5(str2binl(_0x3e6d2a), _0x3e6d2a[_0x4f75('0x0')] * chrsz));
|
||||
}
|
||||
|
||||
function str_md5(_0x299d77) {
|
||||
return binl2str(core_md5(str2binl(_0x299d77), _0x299d77[_0x4f75('0x0')] * chrsz));
|
||||
}
|
||||
|
||||
function hex_hmac_md5(_0x527dc3, _0x2917f0) {
|
||||
return binl2hex(core_hmac_md5(_0x527dc3, _0x2917f0));
|
||||
}
|
||||
|
||||
function b64_hmac_md5(_0xef9e7f, _0x59c8eb) {
|
||||
return binl2b64(core_hmac_md5(_0xef9e7f, _0x59c8eb));
|
||||
}
|
||||
|
||||
function str_hmac_md5(_0x281d11, _0x378864) {
|
||||
return binl2str(core_hmac_md5(_0x281d11, _0x378864));
|
||||
}
|
||||
|
||||
function md5_vm_test() {
|
||||
return hex_md5(_0x4f75('0x1')) == _0x4f75('0x2');
|
||||
}
|
||||
|
||||
function core_md5(_0x22ee7b, _0x5112e5) {
|
||||
_0x22ee7b[_0x5112e5 >> 0x5] |= 0x80 << _0x5112e5 % 0x20;
|
||||
_0x22ee7b[(_0x5112e5 + 0x40 >>> 0x9 << 0x4) + 0xe] = _0x5112e5;
|
||||
var _0x24dc11 = 0x67452301;
|
||||
var _0x4d8080 = -0x10325477;
|
||||
var _0x5a0e38 = -0x67452302;
|
||||
var _0x1bea03 = 0x10325476;
|
||||
for (var _0x19201a = 0x0; _0x19201a < _0x22ee7b['length']; _0x19201a += 0x10) {
|
||||
var _0x5690f3 = _0x24dc11;
|
||||
var _0x278f34 = _0x4d8080;
|
||||
var _0x39995b = _0x5a0e38;
|
||||
var _0x43e134 = _0x1bea03;
|
||||
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x0], 0x7, -0x28955b88);
|
||||
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x1], 0xc, -0x173848aa);
|
||||
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x2], 0x11, 0x242070db);
|
||||
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x3], 0x16, -0x3e423112);
|
||||
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x4], 0x7, -0xa83f051);
|
||||
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x5], 0xc, 0x4787c62a);
|
||||
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x6], 0x11, -0x57cfb9ed);
|
||||
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x7], 0x16, -0x2b96aff);
|
||||
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x8], 0x7, 0x698098d8);
|
||||
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x9], 0xc, -0x74bb0851);
|
||||
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xa], 0x11, -0xa44f);
|
||||
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xb], 0x16, -0x76a32842);
|
||||
_0x24dc11 = md5_ff(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xc], 0x7, 0x6b901122);
|
||||
_0x1bea03 = md5_ff(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xd], 0xc, -0x2678e6d);
|
||||
_0x5a0e38 = md5_ff(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xe], 0x11, -0x5986bc72);
|
||||
_0x4d8080 = md5_ff(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xf], 0x16, 0x49b40821);
|
||||
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x1], 0x5, -0x9e1da9e);
|
||||
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x6], 0x9, -0x3fbf4cc0);
|
||||
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xb], 0xe, 0x265e5a51);
|
||||
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x0], 0x14, -0x16493856);
|
||||
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x5], 0x5, -0x29d0efa3);
|
||||
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xa], 0x9, 0x2441453);
|
||||
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xf], 0xe, -0x275e197f);
|
||||
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x4], 0x14, -0x182c0438);
|
||||
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x9], 0x5, 0x21e1cde6);
|
||||
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xe], 0x9, -0x3cc8f82a);
|
||||
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x3], 0xe, -0xb2af279);
|
||||
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x8], 0x14, 0x455a14ed);
|
||||
_0x24dc11 = md5_gg(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xd], 0x5, -0x561c16fb);
|
||||
_0x1bea03 = md5_gg(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x2], 0x9, -0x3105c08);
|
||||
_0x5a0e38 = md5_gg(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x7], 0xe, 0x676f02d9);
|
||||
_0x4d8080 = md5_gg(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xc], 0x14, -0x72d5b376);
|
||||
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x5], 0x4, -0x5c6be);
|
||||
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x8], 0xb, -0x788e097f);
|
||||
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xb], 0x10, 0x6d9d6122);
|
||||
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xe], 0x17, -0x21ac7f4);
|
||||
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x1], 0x4, -0x5b4115bc);
|
||||
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x4], 0xb, 0x4bdecfa9);
|
||||
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x7], 0x10, -0x944b4a0);
|
||||
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xa], 0x17, -0x41404390);
|
||||
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xd], 0x4, 0x289b7ec6);
|
||||
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x0], 0xb, -0x155ed806);
|
||||
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x3], 0x10, -0x2b10cf7b);
|
||||
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x6], 0x17, 0x4881d05);
|
||||
_0x24dc11 = md5_hh(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x9], 0x4, -0x262b2fc7);
|
||||
_0x1bea03 = md5_hh(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xc], 0xb, -0x1924661b);
|
||||
_0x5a0e38 = md5_hh(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xf], 0x10, 0x1fa27cf8);
|
||||
_0x4d8080 = md5_hh(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x2], 0x17, -0x3b53a99b);
|
||||
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x0], 0x6, -0xbd6ddbc);
|
||||
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x7], 0xa, 0x432aff97);
|
||||
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xe], 0xf, -0x546bdc59);
|
||||
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x5], 0x15, -0x36c5fc7);
|
||||
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0xc], 0x6, 0x655b59c3);
|
||||
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0x3], 0xa, -0x70f3336e);
|
||||
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0xa], 0xf, -0x100b83);
|
||||
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x1], 0x15, -0x7a7ba22f);
|
||||
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x8], 0x6, 0x6fa87e4f);
|
||||
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xf], 0xa, -0x1d31920);
|
||||
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x6], 0xf, -0x5cfebcec);
|
||||
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0xd], 0x15, 0x4e0811a1);
|
||||
_0x24dc11 = md5_ii(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03, _0x22ee7b[_0x19201a + 0x4], 0x6, -0x8ac817e);
|
||||
_0x1bea03 = md5_ii(_0x1bea03, _0x24dc11, _0x4d8080, _0x5a0e38, _0x22ee7b[_0x19201a + 0xb], 0xa, -0x42c50dcb);
|
||||
_0x5a0e38 = md5_ii(_0x5a0e38, _0x1bea03, _0x24dc11, _0x4d8080, _0x22ee7b[_0x19201a + 0x2], 0xf, 0x2ad7d2bb);
|
||||
_0x4d8080 = md5_ii(_0x4d8080, _0x5a0e38, _0x1bea03, _0x24dc11, _0x22ee7b[_0x19201a + 0x9], 0x15, -0x14792c6f);
|
||||
_0x24dc11 = safe_add(_0x24dc11, _0x5690f3);
|
||||
_0x4d8080 = safe_add(_0x4d8080, _0x278f34);
|
||||
_0x5a0e38 = safe_add(_0x5a0e38, _0x39995b);
|
||||
_0x1bea03 = safe_add(_0x1bea03, _0x43e134);
|
||||
}
|
||||
return Array(_0x24dc11, _0x4d8080, _0x5a0e38, _0x1bea03);
|
||||
}
|
||||
|
||||
function md5_cmn(_0x13da99, _0x4e97a4, _0x35d420, _0x2be282, _0x30ef48, _0x31cceb) {
|
||||
return safe_add(bit_rol(safe_add(safe_add(_0x4e97a4, _0x13da99), safe_add(_0x2be282, _0x31cceb)), _0x30ef48), _0x35d420);
|
||||
}
|
||||
|
||||
function md5_ff(_0x3470ed, _0xb5effa, _0x477770, _0x33e34f, _0x356226, _0x13dc1d, _0x1e29c9) {
|
||||
return md5_cmn(_0xb5effa & _0x477770 | ~_0xb5effa & _0x33e34f, _0x3470ed, _0xb5effa, _0x356226, _0x13dc1d, _0x1e29c9);
|
||||
}
|
||||
|
||||
function md5_gg(_0x489772, _0x4cd15b, _0x53464d, _0x48aa94, _0x6a0a55, _0x12dbfb, _0x410e93) {
|
||||
return md5_cmn(_0x4cd15b & _0x48aa94 | _0x53464d & ~_0x48aa94, _0x489772, _0x4cd15b, _0x6a0a55, _0x12dbfb, _0x410e93);
|
||||
}
|
||||
|
||||
function md5_hh(_0x2fb64f, _0x38b15b, _0x102f48, _0x3dc19b, _0x5e25aa, _0x3ae390, _0x89e2fc) {
|
||||
return md5_cmn(_0x38b15b ^ _0x102f48 ^ _0x3dc19b, _0x2fb64f, _0x38b15b, _0x5e25aa, _0x3ae390, _0x89e2fc);
|
||||
}
|
||||
|
||||
function md5_ii(_0x1a821d, _0x1e15bd, _0x2e26e7, _0x1a3729, _0x3ef1a2, _0x32fa53, _0x163466) {
|
||||
return md5_cmn(_0x2e26e7 ^ (_0x1e15bd | ~_0x1a3729), _0x1a821d, _0x1e15bd, _0x3ef1a2, _0x32fa53, _0x163466);
|
||||
}
|
||||
|
||||
function core_hmac_md5(_0x5d2cea, _0x5c190a) {
|
||||
var _0x4e64d3 = str2binl(_0x5d2cea);
|
||||
if (_0x4e64d3[_0x4f75('0x0')] > 0x10) _0x4e64d3 = core_md5(_0x4e64d3, _0x5d2cea['length'] * chrsz);
|
||||
var _0x33c231 = Array(0x10), _0xe018a = Array(0x10);
|
||||
for (var _0x5f0b9b = 0x0; _0x5f0b9b < 0x10; _0x5f0b9b++) {
|
||||
_0x33c231[_0x5f0b9b] = _0x4e64d3[_0x5f0b9b] ^ 0x36363636;
|
||||
_0xe018a[_0x5f0b9b] = _0x4e64d3[_0x5f0b9b] ^ 0x5c5c5c5c;
|
||||
}
|
||||
var _0x30e59b = core_md5(_0x33c231[_0x4f75('0x3')](str2binl(_0x5c190a)), 0x200 + _0x5c190a[_0x4f75('0x0')] * chrsz);
|
||||
return core_md5(_0xe018a[_0x4f75('0x3')](_0x30e59b), 0x200 + 0x80);
|
||||
}
|
||||
|
||||
function safe_add(_0x3f936b, _0x452433) {
|
||||
var _0x2830ca = (_0x3f936b & 0xffff) + (_0x452433 & 0xffff);
|
||||
var _0x558dbe = (_0x3f936b >> 0x10) + (_0x452433 >> 0x10) + (_0x2830ca >> 0x10);
|
||||
return _0x558dbe << 0x10 | _0x2830ca & 0xffff;
|
||||
}
|
||||
|
||||
function bit_rol(_0x4ae01b, _0x223c0d) {
|
||||
return _0x4ae01b << _0x223c0d | _0x4ae01b >>> 0x20 - _0x223c0d;
|
||||
}
|
||||
|
||||
function str2binl(_0x5c42d1) {
|
||||
var _0x18b049 = Array();
|
||||
var _0x4fdd09 = (0x1 << chrsz) - 0x1;
|
||||
for (var _0x3fe83f = 0x0; _0x3fe83f < _0x5c42d1[_0x4f75('0x0')] * chrsz; _0x3fe83f += chrsz) _0x18b049[_0x3fe83f >> 0x5] |= (_0x5c42d1[_0x4f75('0x4')](_0x3fe83f / chrsz) & _0x4fdd09) << _0x3fe83f % 0x20;
|
||||
return _0x18b049;
|
||||
}
|
||||
|
||||
function binl2str(_0xf5e77a) {
|
||||
var _0x2c8aff = '';
|
||||
var _0x4a565 = (0x1 << chrsz) - 0x1;
|
||||
for (var _0x24957b = 0x0; _0x24957b < _0xf5e77a[_0x4f75('0x0')] * 0x20; _0x24957b += chrsz) _0x2c8aff += String['fromCharCode'](_0xf5e77a[_0x24957b >> 0x5] >>> _0x24957b % 0x20 & _0x4a565);
|
||||
return _0x2c8aff;
|
||||
}
|
||||
|
||||
function binl2hex(_0x2a8297) {
|
||||
var _0x15a7cb = hexcase ? _0x4f75('0x5') : _0x4f75('0x6');
|
||||
var _0x1be29d = '';
|
||||
for (var _0x112c2f = 0x0; _0x112c2f < _0x2a8297[_0x4f75('0x0')] * 0x4; _0x112c2f++) {
|
||||
_0x1be29d += _0x15a7cb['charAt'](_0x2a8297[_0x112c2f >> 0x2] >> _0x112c2f % 0x4 * 0x8 + 0x4 & 0xf) + _0x15a7cb[_0x4f75('0x7')](_0x2a8297[_0x112c2f >> 0x2] >> _0x112c2f % 0x4 * 0x8 & 0xf);
|
||||
}
|
||||
return _0x1be29d;
|
||||
}
|
||||
|
||||
function binl2b64(_0x1f399a) {
|
||||
var _0x4657e3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||
var _0x3409f2 = '';
|
||||
for (var _0x54da0a = 0x0; _0x54da0a < _0x1f399a[_0x4f75('0x0')] * 0x4; _0x54da0a += 0x3) {
|
||||
var _0x71178d = (_0x1f399a[_0x54da0a >> 0x2] >> 0x8 * (_0x54da0a % 0x4) & 0xff) << 0x10 | (_0x1f399a[_0x54da0a + 0x1 >> 0x2] >> 0x8 * ((_0x54da0a + 0x1) % 0x4) & 0xff) << 0x8 | _0x1f399a[_0x54da0a + 0x2 >> 0x2] >> 0x8 * ((_0x54da0a + 0x2) % 0x4) & 0xff;
|
||||
for (var _0x33e70d = 0x0; _0x33e70d < 0x4; _0x33e70d++) {
|
||||
if (_0x54da0a * 0x8 + _0x33e70d * 0x6 > _0x1f399a[_0x4f75('0x0')] * 0x20) _0x3409f2 += b64pad; else _0x3409f2 += _0x4657e3[_0x4f75('0x7')](_0x71178d >> 0x6 * (0x3 - _0x33e70d) & 0x3f);
|
||||
}
|
||||
}
|
||||
return _0x3409f2;
|
||||
}
|
||||
|
||||
console.log(hex_md5("NightTeam"));
|
@ -1,14 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @时间 : 2019-12-15 14:31
|
||||
# @作者 : 陈祥安
|
||||
# @文件名 : client.py
|
||||
# @公众号: Python学习开发
|
||||
import requests
|
||||
|
||||
url = "http://127.0.0.1:3000/get_num"
|
||||
|
||||
data = {
|
||||
"a": 1, "b": 2
|
||||
}
|
||||
req = requests.post(url,data)
|
||||
print(req.text)
|
@ -1,15 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @时间 : 2019-12-15 14:31
|
||||
# @作者 : 陈祥安
|
||||
# @文件名 : client.py
|
||||
# @公众号: Python学习开发
|
||||
import requests
|
||||
|
||||
|
||||
url = "http://127.0.0.1:3000/crypto"
|
||||
|
||||
data = {
|
||||
"user": "liming", "password": "1234qwer"
|
||||
}
|
||||
req = requests.post(url,data)
|
||||
print(req.text)
|
@ -1,766 +0,0 @@
|
||||
var CryptoJS = function (o, e) {
|
||||
var h = {}
|
||||
, g = h.lib = {}
|
||||
, z = function () {
|
||||
}
|
||||
, y = g.Base = {
|
||||
extend: function (b) {
|
||||
z.prototype = this;
|
||||
var d = new z;
|
||||
b && d.mixIn(b);
|
||||
d.hasOwnProperty("init") || (d.init = function () {
|
||||
d.$super.init.apply(this, arguments)
|
||||
}
|
||||
);
|
||||
d.init.prototype = d;
|
||||
d.$super = this;
|
||||
return d
|
||||
},
|
||||
create: function () {
|
||||
var b = this.extend();
|
||||
b.init.apply(b, arguments);
|
||||
return b
|
||||
},
|
||||
init: function () {
|
||||
},
|
||||
mixIn: function (b) {
|
||||
for (var d in b) {
|
||||
b.hasOwnProperty(d) && (this[d] = b[d])
|
||||
}
|
||||
b.hasOwnProperty("toString") && (this.toString = b.toString)
|
||||
},
|
||||
clone: function () {
|
||||
return this.init.prototype.extend(this)
|
||||
}
|
||||
}
|
||||
, a = g.WordArray = y.extend({
|
||||
init: function (b, d) {
|
||||
b = this.words = b || [];
|
||||
this.sigBytes = d != e ? d : 4 * b.length
|
||||
},
|
||||
toString: function (b) {
|
||||
return (b || m).stringify(this)
|
||||
},
|
||||
concat: function (b) {
|
||||
var p = this.words
|
||||
, n = b.words
|
||||
, l = this.sigBytes;
|
||||
b = b.sigBytes;
|
||||
this.clamp();
|
||||
if (l % 4) {
|
||||
for (var d = 0; d < b; d++) {
|
||||
p[l + d >>> 2] |= (n[d >>> 2] >>> 24 - 8 * (d % 4) & 255) << 24 - 8 * ((l + d) % 4)
|
||||
}
|
||||
} else {
|
||||
if (65535 < n.length) {
|
||||
for (d = 0; d < b; d += 4) {
|
||||
p[l + d >>> 2] = n[d >>> 2]
|
||||
}
|
||||
} else {
|
||||
p.push.apply(p, n)
|
||||
}
|
||||
}
|
||||
this.sigBytes += b;
|
||||
return this
|
||||
},
|
||||
clamp: function () {
|
||||
var b = this.words
|
||||
, d = this.sigBytes;
|
||||
b[d >>> 2] &= 4294967295 << 32 - 8 * (d % 4);
|
||||
b.length = o.ceil(d / 4)
|
||||
},
|
||||
clone: function () {
|
||||
var b = y.clone.call(this);
|
||||
b.words = this.words.slice(0);
|
||||
return b
|
||||
},
|
||||
random: function (b) {
|
||||
for (var l = [], d = 0; d < b; d += 4) {
|
||||
l.push(4294967296 * o.random() | 0)
|
||||
}
|
||||
return new a.init(l, b)
|
||||
}
|
||||
})
|
||||
, k = h.enc = {}
|
||||
, m = k.Hex = {
|
||||
stringify: function (b) {
|
||||
var p = b.words;
|
||||
b = b.sigBytes;
|
||||
for (var n = [], l = 0; l < b; l++) {
|
||||
var d = p[l >>> 2] >>> 24 - 8 * (l % 4) & 255;
|
||||
n.push((d >>> 4).toString(16));
|
||||
n.push((d & 15).toString(16))
|
||||
}
|
||||
return n.join("")
|
||||
},
|
||||
parse: function (b) {
|
||||
for (var n = b.length, l = [], d = 0; d < n; d += 2) {
|
||||
l[d >>> 3] |= parseInt(b.substr(d, 2), 16) << 24 - 4 * (d % 8)
|
||||
}
|
||||
return new a.init(l, n / 2)
|
||||
}
|
||||
}
|
||||
, i = k.Latin1 = {
|
||||
stringify: function (b) {
|
||||
var n = b.words;
|
||||
b = b.sigBytes;
|
||||
for (var l = [], d = 0; d < b; d++) {
|
||||
l.push(String.fromCharCode(n[d >>> 2] >>> 24 - 8 * (d % 4) & 255))
|
||||
}
|
||||
return l.join("")
|
||||
},
|
||||
parse: function (b) {
|
||||
for (var n = b.length, l = [], d = 0; d < n; d++) {
|
||||
l[d >>> 2] |= (b.charCodeAt(d) & 255) << 24 - 8 * (d % 4)
|
||||
}
|
||||
return new a.init(l, n)
|
||||
}
|
||||
}
|
||||
, j = k.Utf8 = {
|
||||
stringify: function (b) {
|
||||
try {
|
||||
return decodeURIComponent(escape(i.stringify(b)))
|
||||
} catch (d) {
|
||||
throw Error("Malformed UTF-8 data")
|
||||
}
|
||||
},
|
||||
parse: function (b) {
|
||||
return i.parse(unescape(encodeURIComponent(b)))
|
||||
}
|
||||
}
|
||||
, c = g.BufferedBlockAlgorithm = y.extend({
|
||||
reset: function () {
|
||||
this._data = new a.init;
|
||||
this._nDataBytes = 0
|
||||
},
|
||||
_append: function (b) {
|
||||
"string" == typeof b && (b = j.parse(b));
|
||||
this._data.concat(b);
|
||||
this._nDataBytes += b.sigBytes
|
||||
},
|
||||
_process: function (l) {
|
||||
var t = this._data
|
||||
, s = t.words
|
||||
, p = t.sigBytes
|
||||
, n = this.blockSize
|
||||
, d = p / (4 * n)
|
||||
, d = l ? o.ceil(d) : o.max((d | 0) - this._minBufferSize, 0);
|
||||
l = d * n;
|
||||
p = o.min(4 * l, p);
|
||||
if (l) {
|
||||
for (var r = 0; r < l; r += n) {
|
||||
this._doProcessBlock(s, r)
|
||||
}
|
||||
r = s.splice(0, l);
|
||||
t.sigBytes -= p
|
||||
}
|
||||
return new a.init(r, p)
|
||||
},
|
||||
clone: function () {
|
||||
var b = y.clone.call(this);
|
||||
b._data = this._data.clone();
|
||||
return b
|
||||
},
|
||||
_minBufferSize: 0
|
||||
});
|
||||
g.Hasher = c.extend({
|
||||
cfg: y.extend(),
|
||||
init: function (b) {
|
||||
this.cfg = this.cfg.extend(b);
|
||||
this.reset()
|
||||
},
|
||||
reset: function () {
|
||||
c.reset.call(this);
|
||||
this._doReset()
|
||||
},
|
||||
update: function (b) {
|
||||
this._append(b);
|
||||
this._process();
|
||||
return this
|
||||
},
|
||||
finalize: function (b) {
|
||||
b && this._append(b);
|
||||
return this._doFinalize()
|
||||
},
|
||||
blockSize: 16,
|
||||
_createHelper: function (b) {
|
||||
return function (d, l) {
|
||||
return (new b.init(l)).finalize(d)
|
||||
}
|
||||
},
|
||||
_createHmacHelper: function (b) {
|
||||
return function (d, l) {
|
||||
return (new f.HMAC.init(b, l)).finalize(d)
|
||||
}
|
||||
}
|
||||
});
|
||||
var f = h.algo = {};
|
||||
return h
|
||||
}(Math);
|
||||
(function () {
|
||||
var a = CryptoJS
|
||||
, b = a.lib.WordArray;
|
||||
a.enc.Base64 = {
|
||||
stringify: function (j) {
|
||||
var e = j.words
|
||||
, i = j.sigBytes
|
||||
, g = this._map;
|
||||
j.clamp();
|
||||
j = [];
|
||||
for (var h = 0; h < i; h += 3) {
|
||||
for (var c = (e[h >>> 2] >>> 24 - 8 * (h % 4) & 255) << 16 | (e[h + 1 >>> 2] >>> 24 - 8 * ((h + 1) % 4) & 255) << 8 | e[h + 2 >>> 2] >>> 24 - 8 * ((h + 2) % 4) & 255, f = 0; 4 > f && h + 0.75 * f < i; f++) {
|
||||
j.push(g.charAt(c >>> 6 * (3 - f) & 63))
|
||||
}
|
||||
}
|
||||
if (e = g.charAt(64)) {
|
||||
for (; j.length % 4;) {
|
||||
j.push(e)
|
||||
}
|
||||
}
|
||||
return j.join("")
|
||||
},
|
||||
parse: function (k) {
|
||||
var f = k.length
|
||||
, i = this._map
|
||||
, h = i.charAt(64);
|
||||
h && (h = k.indexOf(h),
|
||||
-1 != h && (f = h));
|
||||
for (var h = [], j = 0, e = 0; e < f; e++) {
|
||||
if (e % 4) {
|
||||
var g = i.indexOf(k.charAt(e - 1)) << 2 * (e % 4)
|
||||
, c = i.indexOf(k.charAt(e)) >>> 6 - 2 * (e % 4);
|
||||
h[j >>> 2] |= (g | c) << 24 - 8 * (j % 4);
|
||||
j++
|
||||
}
|
||||
}
|
||||
return b.create(h, j)
|
||||
},
|
||||
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
||||
}
|
||||
}
|
||||
)();
|
||||
(function (k) {
|
||||
function c(d, s, l, r, q, p, o) {
|
||||
d = d + (s & l | ~s & r) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
|
||||
function f(d, s, l, r, q, p, o) {
|
||||
d = d + (s & r | l & ~r) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
|
||||
function e(d, s, l, r, q, p, o) {
|
||||
d = d + (s ^ l ^ r) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
|
||||
function n(d, s, l, r, q, p, o) {
|
||||
d = d + (l ^ (s | ~r)) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
|
||||
for (var m = CryptoJS, a = m.lib, i = a.WordArray, j = a.Hasher, a = m.algo, g = [], h = 0; 64 > h; h++) {
|
||||
g[h] = 4294967296 * k.abs(k.sin(h + 1)) | 0
|
||||
}
|
||||
a = a.MD5 = j.extend({
|
||||
_doReset: function () {
|
||||
this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878])
|
||||
},
|
||||
_doProcessBlock: function (J, L) {
|
||||
for (var U = 0; 16 > U; U++) {
|
||||
var T = L + U
|
||||
, S = J[T];
|
||||
J[T] = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360
|
||||
}
|
||||
var U = this._hash.words
|
||||
, T = J[L + 0]
|
||||
, S = J[L + 1]
|
||||
, O = J[L + 2]
|
||||
, N = J[L + 3]
|
||||
, b = J[L + 4]
|
||||
, H = J[L + 5]
|
||||
, y = J[L + 6]
|
||||
, l = J[L + 7]
|
||||
, o = J[L + 8]
|
||||
, K = J[L + 9]
|
||||
, I = J[L + 10]
|
||||
, G = J[L + 11]
|
||||
, p = J[L + 12]
|
||||
, F = J[L + 13]
|
||||
, s = J[L + 14]
|
||||
, d = J[L + 15]
|
||||
, R = U[0]
|
||||
, M = U[1]
|
||||
, Q = U[2]
|
||||
, P = U[3]
|
||||
, R = c(R, M, Q, P, T, 7, g[0])
|
||||
, P = c(P, R, M, Q, S, 12, g[1])
|
||||
, Q = c(Q, P, R, M, O, 17, g[2])
|
||||
, M = c(M, Q, P, R, N, 22, g[3])
|
||||
, R = c(R, M, Q, P, b, 7, g[4])
|
||||
, P = c(P, R, M, Q, H, 12, g[5])
|
||||
, Q = c(Q, P, R, M, y, 17, g[6])
|
||||
, M = c(M, Q, P, R, l, 22, g[7])
|
||||
, R = c(R, M, Q, P, o, 7, g[8])
|
||||
, P = c(P, R, M, Q, K, 12, g[9])
|
||||
, Q = c(Q, P, R, M, I, 17, g[10])
|
||||
, M = c(M, Q, P, R, G, 22, g[11])
|
||||
, R = c(R, M, Q, P, p, 7, g[12])
|
||||
, P = c(P, R, M, Q, F, 12, g[13])
|
||||
, Q = c(Q, P, R, M, s, 17, g[14])
|
||||
, M = c(M, Q, P, R, d, 22, g[15])
|
||||
, R = f(R, M, Q, P, S, 5, g[16])
|
||||
, P = f(P, R, M, Q, y, 9, g[17])
|
||||
, Q = f(Q, P, R, M, G, 14, g[18])
|
||||
, M = f(M, Q, P, R, T, 20, g[19])
|
||||
, R = f(R, M, Q, P, H, 5, g[20])
|
||||
, P = f(P, R, M, Q, I, 9, g[21])
|
||||
, Q = f(Q, P, R, M, d, 14, g[22])
|
||||
, M = f(M, Q, P, R, b, 20, g[23])
|
||||
, R = f(R, M, Q, P, K, 5, g[24])
|
||||
, P = f(P, R, M, Q, s, 9, g[25])
|
||||
, Q = f(Q, P, R, M, N, 14, g[26])
|
||||
, M = f(M, Q, P, R, o, 20, g[27])
|
||||
, R = f(R, M, Q, P, F, 5, g[28])
|
||||
, P = f(P, R, M, Q, O, 9, g[29])
|
||||
, Q = f(Q, P, R, M, l, 14, g[30])
|
||||
, M = f(M, Q, P, R, p, 20, g[31])
|
||||
, R = e(R, M, Q, P, H, 4, g[32])
|
||||
, P = e(P, R, M, Q, o, 11, g[33])
|
||||
, Q = e(Q, P, R, M, G, 16, g[34])
|
||||
, M = e(M, Q, P, R, s, 23, g[35])
|
||||
, R = e(R, M, Q, P, S, 4, g[36])
|
||||
, P = e(P, R, M, Q, b, 11, g[37])
|
||||
, Q = e(Q, P, R, M, l, 16, g[38])
|
||||
, M = e(M, Q, P, R, I, 23, g[39])
|
||||
, R = e(R, M, Q, P, F, 4, g[40])
|
||||
, P = e(P, R, M, Q, T, 11, g[41])
|
||||
, Q = e(Q, P, R, M, N, 16, g[42])
|
||||
, M = e(M, Q, P, R, y, 23, g[43])
|
||||
, R = e(R, M, Q, P, K, 4, g[44])
|
||||
, P = e(P, R, M, Q, p, 11, g[45])
|
||||
, Q = e(Q, P, R, M, d, 16, g[46])
|
||||
, M = e(M, Q, P, R, O, 23, g[47])
|
||||
, R = n(R, M, Q, P, T, 6, g[48])
|
||||
, P = n(P, R, M, Q, l, 10, g[49])
|
||||
, Q = n(Q, P, R, M, s, 15, g[50])
|
||||
, M = n(M, Q, P, R, H, 21, g[51])
|
||||
, R = n(R, M, Q, P, p, 6, g[52])
|
||||
, P = n(P, R, M, Q, N, 10, g[53])
|
||||
, Q = n(Q, P, R, M, I, 15, g[54])
|
||||
, M = n(M, Q, P, R, S, 21, g[55])
|
||||
, R = n(R, M, Q, P, o, 6, g[56])
|
||||
, P = n(P, R, M, Q, d, 10, g[57])
|
||||
, Q = n(Q, P, R, M, y, 15, g[58])
|
||||
, M = n(M, Q, P, R, F, 21, g[59])
|
||||
, R = n(R, M, Q, P, b, 6, g[60])
|
||||
, P = n(P, R, M, Q, G, 10, g[61])
|
||||
, Q = n(Q, P, R, M, O, 15, g[62])
|
||||
, M = n(M, Q, P, R, K, 21, g[63]);
|
||||
U[0] = U[0] + R | 0;
|
||||
U[1] = U[1] + M | 0;
|
||||
U[2] = U[2] + Q | 0;
|
||||
U[3] = U[3] + P | 0
|
||||
},
|
||||
_doFinalize: function () {
|
||||
var d = this._data
|
||||
, q = d.words
|
||||
, l = 8 * this._nDataBytes
|
||||
, p = 8 * d.sigBytes;
|
||||
q[p >>> 5] |= 128 << 24 - p % 32;
|
||||
var o = k.floor(l / 4294967296);
|
||||
q[(p + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
||||
q[(p + 64 >>> 9 << 4) + 14] = (l << 8 | l >>> 24) & 16711935 | (l << 24 | l >>> 8) & 4278255360;
|
||||
d.sigBytes = 4 * (q.length + 1);
|
||||
this._process();
|
||||
d = this._hash;
|
||||
q = d.words;
|
||||
for (l = 0; 4 > l; l++) {
|
||||
p = q[l],
|
||||
q[l] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360
|
||||
}
|
||||
return d
|
||||
},
|
||||
clone: function () {
|
||||
var d = j.clone.call(this);
|
||||
d._hash = this._hash.clone();
|
||||
return d
|
||||
}
|
||||
});
|
||||
m.MD5 = j._createHelper(a);
|
||||
m.HmacMD5 = j._createHmacHelper(a)
|
||||
}
|
||||
)(Math);
|
||||
(function () {
|
||||
var b = CryptoJS
|
||||
, e = b.lib
|
||||
, f = e.Base
|
||||
, a = e.WordArray
|
||||
, e = b.algo
|
||||
, c = e.EvpKDF = f.extend({
|
||||
cfg: f.extend({
|
||||
keySize: 4,
|
||||
hasher: e.MD5,
|
||||
iterations: 1
|
||||
}),
|
||||
init: function (g) {
|
||||
this.cfg = this.cfg.extend(g)
|
||||
},
|
||||
compute: function (k, g) {
|
||||
for (var i = this.cfg, t = i.hasher.create(), l = a.create(), o = l.words, h = i.keySize, i = i.iterations; o.length < h;) {
|
||||
j && t.update(j);
|
||||
var j = t.update(k).finalize(g);
|
||||
t.reset();
|
||||
for (var m = 1; m < i; m++) {
|
||||
j = t.finalize(j),
|
||||
t.reset()
|
||||
}
|
||||
l.concat(j)
|
||||
}
|
||||
l.sigBytes = 4 * h;
|
||||
return l
|
||||
}
|
||||
});
|
||||
b.EvpKDF = function (i, g, h) {
|
||||
return c.create(h).compute(i, g)
|
||||
}
|
||||
}
|
||||
)();
|
||||
CryptoJS.lib.Cipher || function (B) {
|
||||
var g = CryptoJS
|
||||
, j = g.lib
|
||||
, i = j.Base
|
||||
, D = j.WordArray
|
||||
, C = j.BufferedBlockAlgorithm
|
||||
, e = g.enc.Base64
|
||||
, z = g.algo.EvpKDF
|
||||
, A = j.Cipher = C.extend({
|
||||
cfg: i.extend(),
|
||||
createEncryptor: function (c, b) {
|
||||
return this.create(this._ENC_XFORM_MODE, c, b)
|
||||
},
|
||||
createDecryptor: function (c, b) {
|
||||
return this.create(this._DEC_XFORM_MODE, c, b)
|
||||
},
|
||||
init: function (l, d, c) {
|
||||
this.cfg = this.cfg.extend(c);
|
||||
this._xformMode = l;
|
||||
this._key = d;
|
||||
this.reset()
|
||||
},
|
||||
reset: function () {
|
||||
C.reset.call(this);
|
||||
this._doReset()
|
||||
},
|
||||
process: function (a) {
|
||||
this._append(a);
|
||||
return this._process()
|
||||
},
|
||||
finalize: function (a) {
|
||||
a && this._append(a);
|
||||
return this._doFinalize()
|
||||
},
|
||||
keySize: 4,
|
||||
ivSize: 4,
|
||||
_ENC_XFORM_MODE: 1,
|
||||
_DEC_XFORM_MODE: 2,
|
||||
_createHelper: function (a) {
|
||||
return {
|
||||
encrypt: function (c, l, n) {
|
||||
return ("string" == typeof l ? k : o).encrypt(a, c, l, n)
|
||||
},
|
||||
decrypt: function (c, l, n) {
|
||||
return ("string" == typeof l ? k : o).decrypt(a, c, l, n)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
j.StreamCipher = A.extend({
|
||||
_doFinalize: function () {
|
||||
return this._process(!0)
|
||||
},
|
||||
blockSize: 1
|
||||
});
|
||||
var m = g.mode = {}
|
||||
, y = function (p, n, l) {
|
||||
var r = this._iv;
|
||||
r ? this._iv = B : r = this._prevBlock;
|
||||
for (var q = 0; q < l; q++) {
|
||||
p[n + q] ^= r[q]
|
||||
}
|
||||
}
|
||||
, f = (j.BlockCipherMode = i.extend({
|
||||
createEncryptor: function (c, b) {
|
||||
return this.Encryptor.create(c, b)
|
||||
},
|
||||
createDecryptor: function (c, b) {
|
||||
return this.Decryptor.create(c, b)
|
||||
},
|
||||
init: function (c, b) {
|
||||
this._cipher = c;
|
||||
this._iv = b
|
||||
}
|
||||
})).extend();
|
||||
f.Encryptor = f.extend({
|
||||
processBlock: function (n, l) {
|
||||
var d = this._cipher
|
||||
, p = d.blockSize;
|
||||
y.call(this, n, l, p);
|
||||
d.encryptBlock(n, l);
|
||||
this._prevBlock = n.slice(l, l + p)
|
||||
}
|
||||
});
|
||||
f.Decryptor = f.extend({
|
||||
processBlock: function (p, n) {
|
||||
var l = this._cipher
|
||||
, r = l.blockSize
|
||||
, q = p.slice(n, n + r);
|
||||
l.decryptBlock(p, n);
|
||||
y.call(this, p, n, r);
|
||||
this._prevBlock = q
|
||||
}
|
||||
});
|
||||
m = m.CBC = f;
|
||||
f = (g.pad = {}).Pkcs7 = {
|
||||
pad: function (r, p) {
|
||||
for (var u = 4 * p, u = u - r.sigBytes % u, s = u << 24 | u << 16 | u << 8 | u, q = [], t = 0; t < u; t += 4) {
|
||||
q.push(s)
|
||||
}
|
||||
u = D.create(q, u);
|
||||
r.concat(u)
|
||||
},
|
||||
unpad: function (b) {
|
||||
b.sigBytes -= b.words[b.sigBytes - 1 >>> 2] & 255
|
||||
}
|
||||
};
|
||||
j.BlockCipher = A.extend({
|
||||
cfg: A.cfg.extend({
|
||||
mode: m,
|
||||
padding: f
|
||||
}),
|
||||
reset: function () {
|
||||
A.reset.call(this);
|
||||
var l = this.cfg
|
||||
, d = l.iv
|
||||
, l = l.mode;
|
||||
if (this._xformMode == this._ENC_XFORM_MODE) {
|
||||
var n = l.createEncryptor
|
||||
} else {
|
||||
n = l.createDecryptor,
|
||||
this._minBufferSize = 1
|
||||
}
|
||||
this._mode = n.call(l, this, d && d.words)
|
||||
},
|
||||
_doProcessBlock: function (d, c) {
|
||||
this._mode.processBlock(d, c)
|
||||
},
|
||||
_doFinalize: function () {
|
||||
var d = this.cfg.padding;
|
||||
if (this._xformMode == this._ENC_XFORM_MODE) {
|
||||
d.pad(this._data, this.blockSize);
|
||||
var c = this._process(!0)
|
||||
} else {
|
||||
c = this._process(!0),
|
||||
d.unpad(c)
|
||||
}
|
||||
return c
|
||||
},
|
||||
blockSize: 4
|
||||
});
|
||||
var h = j.CipherParams = i.extend({
|
||||
init: function (b) {
|
||||
this.mixIn(b)
|
||||
},
|
||||
toString: function (b) {
|
||||
return (b || this.formatter).stringify(this)
|
||||
}
|
||||
})
|
||||
, m = (g.format = {}).OpenSSL = {
|
||||
stringify: function (d) {
|
||||
var c = d.ciphertext;
|
||||
d = d.salt;
|
||||
return (d ? D.create([1398893684, 1701076831]).concat(d).concat(c) : c).toString(e)
|
||||
},
|
||||
parse: function (l) {
|
||||
l = e.parse(l);
|
||||
var d = l.words;
|
||||
if (1398893684 == d[0] && 1701076831 == d[1]) {
|
||||
var n = D.create(d.slice(2, 4));
|
||||
d.splice(0, 4);
|
||||
l.sigBytes -= 16
|
||||
}
|
||||
return h.create({
|
||||
ciphertext: l,
|
||||
salt: n
|
||||
})
|
||||
}
|
||||
}
|
||||
, o = j.SerializableCipher = i.extend({
|
||||
cfg: i.extend({
|
||||
format: m
|
||||
}),
|
||||
encrypt: function (q, n, s, r) {
|
||||
r = this.cfg.extend(r);
|
||||
var p = q.createEncryptor(s, r);
|
||||
n = p.finalize(n);
|
||||
p = p.cfg;
|
||||
return h.create({
|
||||
ciphertext: n,
|
||||
key: s,
|
||||
iv: p.iv,
|
||||
algorithm: q,
|
||||
mode: p.mode,
|
||||
padding: p.padding,
|
||||
blockSize: q.blockSize,
|
||||
formatter: r.format
|
||||
})
|
||||
},
|
||||
decrypt: function (n, l, q, p) {
|
||||
p = this.cfg.extend(p);
|
||||
l = this._parse(l, p.format);
|
||||
return n.createDecryptor(q, p).finalize(l.ciphertext)
|
||||
},
|
||||
_parse: function (d, c) {
|
||||
return "string" == typeof d ? c.parse(d, this) : d
|
||||
}
|
||||
})
|
||||
, g = (g.kdf = {}).OpenSSL = {
|
||||
execute: function (n, l, q, p) {
|
||||
p || (p = D.random(8));
|
||||
n = z.create({
|
||||
keySize: l + q
|
||||
}).compute(n, p);
|
||||
q = D.create(n.words.slice(l), 4 * q);
|
||||
n.sigBytes = 4 * l;
|
||||
return h.create({
|
||||
key: n,
|
||||
iv: q,
|
||||
salt: p
|
||||
})
|
||||
}
|
||||
}
|
||||
, k = j.PasswordBasedCipher = o.extend({
|
||||
cfg: o.cfg.extend({
|
||||
kdf: g
|
||||
}),
|
||||
encrypt: function (a, q, p, n) {
|
||||
n = this.cfg.extend(n);
|
||||
p = n.kdf.execute(p, a.keySize, a.ivSize);
|
||||
n.iv = p.iv;
|
||||
a = o.encrypt.call(this, a, q, p.key, n);
|
||||
a.mixIn(p);
|
||||
return a
|
||||
},
|
||||
decrypt: function (a, q, p, n) {
|
||||
n = this.cfg.extend(n);
|
||||
q = this._parse(q, n.format);
|
||||
p = n.kdf.execute(p, a.keySize, a.ivSize, q.salt);
|
||||
n.iv = p.iv;
|
||||
return o.decrypt.call(this, a, q, p.key, n)
|
||||
}
|
||||
})
|
||||
}();
|
||||
(function () {
|
||||
for (var C = CryptoJS, K = C.lib.BlockCipher, Q = C.algo, M = [], E = [], D = [], I = [], m = [], A = [], S = [], h = [], J = [], L = [], T = [], R = 0; 256 > R; R++) {
|
||||
T[R] = 128 > R ? R << 1 : R << 1 ^ 283
|
||||
}
|
||||
for (var P = 0, O = 0, R = 0; 256 > R; R++) {
|
||||
var N = O ^ O << 1 ^ O << 2 ^ O << 3 ^ O << 4
|
||||
, N = N >>> 8 ^ N & 255 ^ 99;
|
||||
M[P] = N;
|
||||
E[N] = P;
|
||||
var f = T[P]
|
||||
, B = T[f]
|
||||
, o = T[B]
|
||||
, g = 257 * T[N] ^ 16843008 * N;
|
||||
D[P] = g << 24 | g >>> 8;
|
||||
I[P] = g << 16 | g >>> 16;
|
||||
m[P] = g << 8 | g >>> 24;
|
||||
A[P] = g;
|
||||
g = 16843009 * o ^ 65537 * B ^ 257 * f ^ 16843008 * P;
|
||||
S[N] = g << 24 | g >>> 8;
|
||||
h[N] = g << 16 | g >>> 16;
|
||||
J[N] = g << 8 | g >>> 24;
|
||||
L[N] = g;
|
||||
P ? (P = f ^ T[T[T[o ^ f]]],
|
||||
O ^= T[T[O]]) : P = O = 1
|
||||
}
|
||||
var i = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
|
||||
, Q = Q.AES = K.extend({
|
||||
_doReset: function () {
|
||||
for (var b = this._key, r = b.words, q = b.sigBytes / 4, b = 4 * ((this._nRounds = q + 6) + 1), p = this._keySchedule = [], n = 0; n < b; n++) {
|
||||
if (n < q) {
|
||||
p[n] = r[n]
|
||||
} else {
|
||||
var l = p[n - 1];
|
||||
n % q ? 6 < q && 4 == n % q && (l = M[l >>> 24] << 24 | M[l >>> 16 & 255] << 16 | M[l >>> 8 & 255] << 8 | M[l & 255]) : (l = l << 8 | l >>> 24,
|
||||
l = M[l >>> 24] << 24 | M[l >>> 16 & 255] << 16 | M[l >>> 8 & 255] << 8 | M[l & 255],
|
||||
l ^= i[n / q | 0] << 24);
|
||||
p[n] = p[n - q] ^ l
|
||||
}
|
||||
}
|
||||
r = this._invKeySchedule = [];
|
||||
for (q = 0; q < b; q++) {
|
||||
n = b - q,
|
||||
l = q % 4 ? p[n] : p[n - 4],
|
||||
r[q] = 4 > q || 4 >= n ? l : S[M[l >>> 24]] ^ h[M[l >>> 16 & 255]] ^ J[M[l >>> 8 & 255]] ^ L[M[l & 255]]
|
||||
}
|
||||
},
|
||||
encryptBlock: function (d, c) {
|
||||
this._doCryptBlock(d, c, this._keySchedule, D, I, m, A, M)
|
||||
},
|
||||
decryptBlock: function (b, j) {
|
||||
var e = b[j + 1];
|
||||
b[j + 1] = b[j + 3];
|
||||
b[j + 3] = e;
|
||||
this._doCryptBlock(b, j, this._invKeySchedule, S, h, J, L, E);
|
||||
e = b[j + 1];
|
||||
b[j + 1] = b[j + 3];
|
||||
b[j + 3] = e
|
||||
},
|
||||
_doCryptBlock: function (ac, ab, aa, Z, Y, U, G, X) {
|
||||
for (var F = this._nRounds, W = ac[ab] ^ aa[0], V = ac[ab + 1] ^ aa[1], H = ac[ab + 2] ^ aa[2], z = ac[ab + 3] ^ aa[3], y = 4, w = 1; w < F; w++) {
|
||||
var x = Z[W >>> 24] ^ Y[V >>> 16 & 255] ^ U[H >>> 8 & 255] ^ G[z & 255] ^ aa[y++]
|
||||
, v = Z[V >>> 24] ^ Y[H >>> 16 & 255] ^ U[z >>> 8 & 255] ^ G[W & 255] ^ aa[y++]
|
||||
, u = Z[H >>> 24] ^ Y[z >>> 16 & 255] ^ U[W >>> 8 & 255] ^ G[V & 255] ^ aa[y++]
|
||||
, z = Z[z >>> 24] ^ Y[W >>> 16 & 255] ^ U[V >>> 8 & 255] ^ G[H & 255] ^ aa[y++]
|
||||
, W = x
|
||||
, V = v
|
||||
, H = u
|
||||
}
|
||||
x = (X[W >>> 24] << 24 | X[V >>> 16 & 255] << 16 | X[H >>> 8 & 255] << 8 | X[z & 255]) ^ aa[y++];
|
||||
v = (X[V >>> 24] << 24 | X[H >>> 16 & 255] << 16 | X[z >>> 8 & 255] << 8 | X[W & 255]) ^ aa[y++];
|
||||
u = (X[H >>> 24] << 24 | X[z >>> 16 & 255] << 16 | X[W >>> 8 & 255] << 8 | X[V & 255]) ^ aa[y++];
|
||||
z = (X[z >>> 24] << 24 | X[W >>> 16 & 255] << 16 | X[V >>> 8 & 255] << 8 | X[H & 255]) ^ aa[y++];
|
||||
ac[ab] = x;
|
||||
ac[ab + 1] = v;
|
||||
ac[ab + 2] = u;
|
||||
ac[ab + 3] = z
|
||||
},
|
||||
keySize: 8
|
||||
});
|
||||
C.AES = K._createHelper(Q)
|
||||
}
|
||||
)();
|
||||
|
||||
|
||||
const Encrypt = function (user, password) {
|
||||
let result = {}
|
||||
var t = CryptoJS.MD5(user),
|
||||
i = CryptoJS.enc.Utf8.parse(t),
|
||||
r = CryptoJS.enc.Utf8.parse(password),
|
||||
u = CryptoJS.AES.encrypt(password, i, {
|
||||
iv: r
|
||||
});
|
||||
result.t = t.toString()
|
||||
result.i = i.toString()
|
||||
result.r = r.toString()
|
||||
result.u = u.toString()
|
||||
return result
|
||||
};
|
||||
|
||||
|
||||
module.exports={
|
||||
Encrypt
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
|
||||
|
||||
|
||||
//1.这个对象存在于js,而不存在于nodejs,比如window,document,screen.
|
||||
//2.这些对象的属性 是一个值。
|
||||
var window ={}
|
||||
// window.btoa=function(aa){
|
||||
// return aa
|
||||
// }
|
||||
var document={}
|
||||
|
||||
document={"location":{"href":"https://bbs.nightteam.cn/member.php?mod=register"}}
|
||||
var screen ={"width":900,"height":1200}
|
||||
console.log(screen.width)
|
||||
|
@ -1,22 +0,0 @@
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
const sum = require("./sum")
|
||||
var bodyParser = require('body-parser');
|
||||
app.use(bodyParser());
|
||||
|
||||
|
||||
app.post('/get_num', function (req, res) {
|
||||
let result = req.body
|
||||
console.log("result",result)
|
||||
let a = parseInt(result.a)
|
||||
let b = parseInt(result.b)
|
||||
result = sum.add(a, b)
|
||||
res.send(result.toString());
|
||||
})
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log("开启服务,端口3000")
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,22 +0,0 @@
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
const crypto = require("./crypto")
|
||||
var bodyParser = require('body-parser');
|
||||
app.use(bodyParser());
|
||||
|
||||
|
||||
app.post('/crypto', function (req, res) {
|
||||
let result = req.body
|
||||
console.log(result)
|
||||
let user = result.user
|
||||
let pwd = result.password
|
||||
result = crypto.Encrypt(user, pwd)
|
||||
res.send(result);
|
||||
})
|
||||
|
||||
app.listen(3000, () => {
|
||||
console.log("开启服务,端口3000")
|
||||
})
|
||||
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
function add(a, b) {
|
||||
return a + b
|
||||
}
|
||||
|
||||
module.exports =
|
||||
{
|
||||
add
|
||||
}
|
@ -1,739 +0,0 @@
|
||||
var CryptoJS= function(o, e) {
|
||||
var h = {}
|
||||
, g = h.lib = {}
|
||||
, z = function() {}
|
||||
, y = g.Base = {
|
||||
extend: function(b) {
|
||||
z.prototype = this;
|
||||
var d = new z;
|
||||
b && d.mixIn(b);
|
||||
d.hasOwnProperty("init") || (d.init = function() {
|
||||
d.$super.init.apply(this, arguments)
|
||||
}
|
||||
);
|
||||
d.init.prototype = d;
|
||||
d.$super = this;
|
||||
return d
|
||||
},
|
||||
create: function() {
|
||||
var b = this.extend();
|
||||
b.init.apply(b, arguments);
|
||||
return b
|
||||
},
|
||||
init: function() {},
|
||||
mixIn: function(b) {
|
||||
for (var d in b) {
|
||||
b.hasOwnProperty(d) && (this[d] = b[d])
|
||||
}
|
||||
b.hasOwnProperty("toString") && (this.toString = b.toString)
|
||||
},
|
||||
clone: function() {
|
||||
return this.init.prototype.extend(this)
|
||||
}
|
||||
}
|
||||
, a = g.WordArray = y.extend({
|
||||
init: function(b, d) {
|
||||
b = this.words = b || [];
|
||||
this.sigBytes = d != e ? d : 4 * b.length
|
||||
},
|
||||
toString: function(b) {
|
||||
return (b || m).stringify(this)
|
||||
},
|
||||
concat: function(b) {
|
||||
var p = this.words
|
||||
, n = b.words
|
||||
, l = this.sigBytes;
|
||||
b = b.sigBytes;
|
||||
this.clamp();
|
||||
if (l % 4) {
|
||||
for (var d = 0; d < b; d++) {
|
||||
p[l + d >>> 2] |= (n[d >>> 2] >>> 24 - 8 * (d % 4) & 255) << 24 - 8 * ((l + d) % 4)
|
||||
}
|
||||
} else {
|
||||
if (65535 < n.length) {
|
||||
for (d = 0; d < b; d += 4) {
|
||||
p[l + d >>> 2] = n[d >>> 2]
|
||||
}
|
||||
} else {
|
||||
p.push.apply(p, n)
|
||||
}
|
||||
}
|
||||
this.sigBytes += b;
|
||||
return this
|
||||
},
|
||||
clamp: function() {
|
||||
var b = this.words
|
||||
, d = this.sigBytes;
|
||||
b[d >>> 2] &= 4294967295 << 32 - 8 * (d % 4);
|
||||
b.length = o.ceil(d / 4)
|
||||
},
|
||||
clone: function() {
|
||||
var b = y.clone.call(this);
|
||||
b.words = this.words.slice(0);
|
||||
return b
|
||||
},
|
||||
random: function(b) {
|
||||
for (var l = [], d = 0; d < b; d += 4) {
|
||||
l.push(4294967296 * o.random() | 0)
|
||||
}
|
||||
return new a.init(l,b)
|
||||
}
|
||||
})
|
||||
, k = h.enc = {}
|
||||
, m = k.Hex = {
|
||||
stringify: function(b) {
|
||||
var p = b.words;
|
||||
b = b.sigBytes;
|
||||
for (var n = [], l = 0; l < b; l++) {
|
||||
var d = p[l >>> 2] >>> 24 - 8 * (l % 4) & 255;
|
||||
n.push((d >>> 4).toString(16));
|
||||
n.push((d & 15).toString(16))
|
||||
}
|
||||
return n.join("")
|
||||
},
|
||||
parse: function(b) {
|
||||
for (var n = b.length, l = [], d = 0; d < n; d += 2) {
|
||||
l[d >>> 3] |= parseInt(b.substr(d, 2), 16) << 24 - 4 * (d % 8)
|
||||
}
|
||||
return new a.init(l,n / 2)
|
||||
}
|
||||
}
|
||||
, i = k.Latin1 = {
|
||||
stringify: function(b) {
|
||||
var n = b.words;
|
||||
b = b.sigBytes;
|
||||
for (var l = [], d = 0; d < b; d++) {
|
||||
l.push(String.fromCharCode(n[d >>> 2] >>> 24 - 8 * (d % 4) & 255))
|
||||
}
|
||||
return l.join("")
|
||||
},
|
||||
parse: function(b) {
|
||||
for (var n = b.length, l = [], d = 0; d < n; d++) {
|
||||
l[d >>> 2] |= (b.charCodeAt(d) & 255) << 24 - 8 * (d % 4)
|
||||
}
|
||||
return new a.init(l,n)
|
||||
}
|
||||
}
|
||||
, j = k.Utf8 = {
|
||||
stringify: function(b) {
|
||||
try {
|
||||
return decodeURIComponent(escape(i.stringify(b)))
|
||||
} catch (d) {
|
||||
throw Error("Malformed UTF-8 data")
|
||||
}
|
||||
},
|
||||
parse: function(b) {
|
||||
return i.parse(unescape(encodeURIComponent(b)))
|
||||
}
|
||||
}
|
||||
, c = g.BufferedBlockAlgorithm = y.extend({
|
||||
reset: function() {
|
||||
this._data = new a.init;
|
||||
this._nDataBytes = 0
|
||||
},
|
||||
_append: function(b) {
|
||||
"string" == typeof b && (b = j.parse(b));
|
||||
this._data.concat(b);
|
||||
this._nDataBytes += b.sigBytes
|
||||
},
|
||||
_process: function(l) {
|
||||
var t = this._data
|
||||
, s = t.words
|
||||
, p = t.sigBytes
|
||||
, n = this.blockSize
|
||||
, d = p / (4 * n)
|
||||
, d = l ? o.ceil(d) : o.max((d | 0) - this._minBufferSize, 0);
|
||||
l = d * n;
|
||||
p = o.min(4 * l, p);
|
||||
if (l) {
|
||||
for (var r = 0; r < l; r += n) {
|
||||
this._doProcessBlock(s, r)
|
||||
}
|
||||
r = s.splice(0, l);
|
||||
t.sigBytes -= p
|
||||
}
|
||||
return new a.init(r,p)
|
||||
},
|
||||
clone: function() {
|
||||
var b = y.clone.call(this);
|
||||
b._data = this._data.clone();
|
||||
return b
|
||||
},
|
||||
_minBufferSize: 0
|
||||
});
|
||||
g.Hasher = c.extend({
|
||||
cfg: y.extend(),
|
||||
init: function(b) {
|
||||
this.cfg = this.cfg.extend(b);
|
||||
this.reset()
|
||||
},
|
||||
reset: function() {
|
||||
c.reset.call(this);
|
||||
this._doReset()
|
||||
},
|
||||
update: function(b) {
|
||||
this._append(b);
|
||||
this._process();
|
||||
return this
|
||||
},
|
||||
finalize: function(b) {
|
||||
b && this._append(b);
|
||||
return this._doFinalize()
|
||||
},
|
||||
blockSize: 16,
|
||||
_createHelper: function(b) {
|
||||
return function(d, l) {
|
||||
return (new b.init(l)).finalize(d)
|
||||
}
|
||||
},
|
||||
_createHmacHelper: function(b) {
|
||||
return function(d, l) {
|
||||
return (new f.HMAC.init(b,l)).finalize(d)
|
||||
}
|
||||
}
|
||||
});
|
||||
var f = h.algo = {};
|
||||
return h
|
||||
}(Math);
|
||||
(function() {
|
||||
var a = CryptoJS
|
||||
, b = a.lib.WordArray;
|
||||
a.enc.Base64 = {
|
||||
stringify: function(j) {
|
||||
var e = j.words
|
||||
, i = j.sigBytes
|
||||
, g = this._map;
|
||||
j.clamp();
|
||||
j = [];
|
||||
for (var h = 0; h < i; h += 3) {
|
||||
for (var c = (e[h >>> 2] >>> 24 - 8 * (h % 4) & 255) << 16 | (e[h + 1 >>> 2] >>> 24 - 8 * ((h + 1) % 4) & 255) << 8 | e[h + 2 >>> 2] >>> 24 - 8 * ((h + 2) % 4) & 255, f = 0; 4 > f && h + 0.75 * f < i; f++) {
|
||||
j.push(g.charAt(c >>> 6 * (3 - f) & 63))
|
||||
}
|
||||
}
|
||||
if (e = g.charAt(64)) {
|
||||
for (; j.length % 4; ) {
|
||||
j.push(e)
|
||||
}
|
||||
}
|
||||
return j.join("")
|
||||
},
|
||||
parse: function(k) {
|
||||
var f = k.length
|
||||
, i = this._map
|
||||
, h = i.charAt(64);
|
||||
h && (h = k.indexOf(h),
|
||||
-1 != h && (f = h));
|
||||
for (var h = [], j = 0, e = 0; e < f; e++) {
|
||||
if (e % 4) {
|
||||
var g = i.indexOf(k.charAt(e - 1)) << 2 * (e % 4)
|
||||
, c = i.indexOf(k.charAt(e)) >>> 6 - 2 * (e % 4);
|
||||
h[j >>> 2] |= (g | c) << 24 - 8 * (j % 4);
|
||||
j++
|
||||
}
|
||||
}
|
||||
return b.create(h, j)
|
||||
},
|
||||
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
||||
}
|
||||
}
|
||||
)();
|
||||
(function(k) {
|
||||
function c(d, s, l, r, q, p, o) {
|
||||
d = d + (s & l | ~s & r) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
function f(d, s, l, r, q, p, o) {
|
||||
d = d + (s & r | l & ~r) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
function e(d, s, l, r, q, p, o) {
|
||||
d = d + (s ^ l ^ r) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
function n(d, s, l, r, q, p, o) {
|
||||
d = d + (l ^ (s | ~r)) + q + o;
|
||||
return (d << p | d >>> 32 - p) + s
|
||||
}
|
||||
for (var m = CryptoJS, a = m.lib, i = a.WordArray, j = a.Hasher, a = m.algo, g = [], h = 0; 64 > h; h++) {
|
||||
g[h] = 4294967296 * k.abs(k.sin(h + 1)) | 0
|
||||
}
|
||||
a = a.MD5 = j.extend({
|
||||
_doReset: function() {
|
||||
this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878])
|
||||
},
|
||||
_doProcessBlock: function(J, L) {
|
||||
for (var U = 0; 16 > U; U++) {
|
||||
var T = L + U
|
||||
, S = J[T];
|
||||
J[T] = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360
|
||||
}
|
||||
var U = this._hash.words
|
||||
, T = J[L + 0]
|
||||
, S = J[L + 1]
|
||||
, O = J[L + 2]
|
||||
, N = J[L + 3]
|
||||
, b = J[L + 4]
|
||||
, H = J[L + 5]
|
||||
, y = J[L + 6]
|
||||
, l = J[L + 7]
|
||||
, o = J[L + 8]
|
||||
, K = J[L + 9]
|
||||
, I = J[L + 10]
|
||||
, G = J[L + 11]
|
||||
, p = J[L + 12]
|
||||
, F = J[L + 13]
|
||||
, s = J[L + 14]
|
||||
, d = J[L + 15]
|
||||
, R = U[0]
|
||||
, M = U[1]
|
||||
, Q = U[2]
|
||||
, P = U[3]
|
||||
, R = c(R, M, Q, P, T, 7, g[0])
|
||||
, P = c(P, R, M, Q, S, 12, g[1])
|
||||
, Q = c(Q, P, R, M, O, 17, g[2])
|
||||
, M = c(M, Q, P, R, N, 22, g[3])
|
||||
, R = c(R, M, Q, P, b, 7, g[4])
|
||||
, P = c(P, R, M, Q, H, 12, g[5])
|
||||
, Q = c(Q, P, R, M, y, 17, g[6])
|
||||
, M = c(M, Q, P, R, l, 22, g[7])
|
||||
, R = c(R, M, Q, P, o, 7, g[8])
|
||||
, P = c(P, R, M, Q, K, 12, g[9])
|
||||
, Q = c(Q, P, R, M, I, 17, g[10])
|
||||
, M = c(M, Q, P, R, G, 22, g[11])
|
||||
, R = c(R, M, Q, P, p, 7, g[12])
|
||||
, P = c(P, R, M, Q, F, 12, g[13])
|
||||
, Q = c(Q, P, R, M, s, 17, g[14])
|
||||
, M = c(M, Q, P, R, d, 22, g[15])
|
||||
, R = f(R, M, Q, P, S, 5, g[16])
|
||||
, P = f(P, R, M, Q, y, 9, g[17])
|
||||
, Q = f(Q, P, R, M, G, 14, g[18])
|
||||
, M = f(M, Q, P, R, T, 20, g[19])
|
||||
, R = f(R, M, Q, P, H, 5, g[20])
|
||||
, P = f(P, R, M, Q, I, 9, g[21])
|
||||
, Q = f(Q, P, R, M, d, 14, g[22])
|
||||
, M = f(M, Q, P, R, b, 20, g[23])
|
||||
, R = f(R, M, Q, P, K, 5, g[24])
|
||||
, P = f(P, R, M, Q, s, 9, g[25])
|
||||
, Q = f(Q, P, R, M, N, 14, g[26])
|
||||
, M = f(M, Q, P, R, o, 20, g[27])
|
||||
, R = f(R, M, Q, P, F, 5, g[28])
|
||||
, P = f(P, R, M, Q, O, 9, g[29])
|
||||
, Q = f(Q, P, R, M, l, 14, g[30])
|
||||
, M = f(M, Q, P, R, p, 20, g[31])
|
||||
, R = e(R, M, Q, P, H, 4, g[32])
|
||||
, P = e(P, R, M, Q, o, 11, g[33])
|
||||
, Q = e(Q, P, R, M, G, 16, g[34])
|
||||
, M = e(M, Q, P, R, s, 23, g[35])
|
||||
, R = e(R, M, Q, P, S, 4, g[36])
|
||||
, P = e(P, R, M, Q, b, 11, g[37])
|
||||
, Q = e(Q, P, R, M, l, 16, g[38])
|
||||
, M = e(M, Q, P, R, I, 23, g[39])
|
||||
, R = e(R, M, Q, P, F, 4, g[40])
|
||||
, P = e(P, R, M, Q, T, 11, g[41])
|
||||
, Q = e(Q, P, R, M, N, 16, g[42])
|
||||
, M = e(M, Q, P, R, y, 23, g[43])
|
||||
, R = e(R, M, Q, P, K, 4, g[44])
|
||||
, P = e(P, R, M, Q, p, 11, g[45])
|
||||
, Q = e(Q, P, R, M, d, 16, g[46])
|
||||
, M = e(M, Q, P, R, O, 23, g[47])
|
||||
, R = n(R, M, Q, P, T, 6, g[48])
|
||||
, P = n(P, R, M, Q, l, 10, g[49])
|
||||
, Q = n(Q, P, R, M, s, 15, g[50])
|
||||
, M = n(M, Q, P, R, H, 21, g[51])
|
||||
, R = n(R, M, Q, P, p, 6, g[52])
|
||||
, P = n(P, R, M, Q, N, 10, g[53])
|
||||
, Q = n(Q, P, R, M, I, 15, g[54])
|
||||
, M = n(M, Q, P, R, S, 21, g[55])
|
||||
, R = n(R, M, Q, P, o, 6, g[56])
|
||||
, P = n(P, R, M, Q, d, 10, g[57])
|
||||
, Q = n(Q, P, R, M, y, 15, g[58])
|
||||
, M = n(M, Q, P, R, F, 21, g[59])
|
||||
, R = n(R, M, Q, P, b, 6, g[60])
|
||||
, P = n(P, R, M, Q, G, 10, g[61])
|
||||
, Q = n(Q, P, R, M, O, 15, g[62])
|
||||
, M = n(M, Q, P, R, K, 21, g[63]);
|
||||
U[0] = U[0] + R | 0;
|
||||
U[1] = U[1] + M | 0;
|
||||
U[2] = U[2] + Q | 0;
|
||||
U[3] = U[3] + P | 0
|
||||
},
|
||||
_doFinalize: function() {
|
||||
var d = this._data
|
||||
, q = d.words
|
||||
, l = 8 * this._nDataBytes
|
||||
, p = 8 * d.sigBytes;
|
||||
q[p >>> 5] |= 128 << 24 - p % 32;
|
||||
var o = k.floor(l / 4294967296);
|
||||
q[(p + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
||||
q[(p + 64 >>> 9 << 4) + 14] = (l << 8 | l >>> 24) & 16711935 | (l << 24 | l >>> 8) & 4278255360;
|
||||
d.sigBytes = 4 * (q.length + 1);
|
||||
this._process();
|
||||
d = this._hash;
|
||||
q = d.words;
|
||||
for (l = 0; 4 > l; l++) {
|
||||
p = q[l],
|
||||
q[l] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360
|
||||
}
|
||||
return d
|
||||
},
|
||||
clone: function() {
|
||||
var d = j.clone.call(this);
|
||||
d._hash = this._hash.clone();
|
||||
return d
|
||||
}
|
||||
});
|
||||
m.MD5 = j._createHelper(a);
|
||||
m.HmacMD5 = j._createHmacHelper(a)
|
||||
}
|
||||
)(Math);
|
||||
(function() {
|
||||
var b = CryptoJS
|
||||
, e = b.lib
|
||||
, f = e.Base
|
||||
, a = e.WordArray
|
||||
, e = b.algo
|
||||
, c = e.EvpKDF = f.extend({
|
||||
cfg: f.extend({
|
||||
keySize: 4,
|
||||
hasher: e.MD5,
|
||||
iterations: 1
|
||||
}),
|
||||
init: function(g) {
|
||||
this.cfg = this.cfg.extend(g)
|
||||
},
|
||||
compute: function(k, g) {
|
||||
for (var i = this.cfg, t = i.hasher.create(), l = a.create(), o = l.words, h = i.keySize, i = i.iterations; o.length < h; ) {
|
||||
j && t.update(j);
|
||||
var j = t.update(k).finalize(g);
|
||||
t.reset();
|
||||
for (var m = 1; m < i; m++) {
|
||||
j = t.finalize(j),
|
||||
t.reset()
|
||||
}
|
||||
l.concat(j)
|
||||
}
|
||||
l.sigBytes = 4 * h;
|
||||
return l
|
||||
}
|
||||
});
|
||||
b.EvpKDF = function(i, g, h) {
|
||||
return c.create(h).compute(i, g)
|
||||
}
|
||||
}
|
||||
)();
|
||||
CryptoJS.lib.Cipher || function(B) {
|
||||
var g = CryptoJS
|
||||
, j = g.lib
|
||||
, i = j.Base
|
||||
, D = j.WordArray
|
||||
, C = j.BufferedBlockAlgorithm
|
||||
, e = g.enc.Base64
|
||||
, z = g.algo.EvpKDF
|
||||
, A = j.Cipher = C.extend({
|
||||
cfg: i.extend(),
|
||||
createEncryptor: function(c, b) {
|
||||
return this.create(this._ENC_XFORM_MODE, c, b)
|
||||
},
|
||||
createDecryptor: function(c, b) {
|
||||
return this.create(this._DEC_XFORM_MODE, c, b)
|
||||
},
|
||||
init: function(l, d, c) {
|
||||
this.cfg = this.cfg.extend(c);
|
||||
this._xformMode = l;
|
||||
this._key = d;
|
||||
this.reset()
|
||||
},
|
||||
reset: function() {
|
||||
C.reset.call(this);
|
||||
this._doReset()
|
||||
},
|
||||
process: function(a) {
|
||||
this._append(a);
|
||||
return this._process()
|
||||
},
|
||||
finalize: function(a) {
|
||||
a && this._append(a);
|
||||
return this._doFinalize()
|
||||
},
|
||||
keySize: 4,
|
||||
ivSize: 4,
|
||||
_ENC_XFORM_MODE: 1,
|
||||
_DEC_XFORM_MODE: 2,
|
||||
_createHelper: function(a) {
|
||||
return {
|
||||
encrypt: function(c, l, n) {
|
||||
return ("string" == typeof l ? k : o).encrypt(a, c, l, n)
|
||||
},
|
||||
decrypt: function(c, l, n) {
|
||||
return ("string" == typeof l ? k : o).decrypt(a, c, l, n)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
j.StreamCipher = A.extend({
|
||||
_doFinalize: function() {
|
||||
return this._process(!0)
|
||||
},
|
||||
blockSize: 1
|
||||
});
|
||||
var m = g.mode = {}
|
||||
, y = function(p, n, l) {
|
||||
var r = this._iv;
|
||||
r ? this._iv = B : r = this._prevBlock;
|
||||
for (var q = 0; q < l; q++) {
|
||||
p[n + q] ^= r[q]
|
||||
}
|
||||
}
|
||||
, f = (j.BlockCipherMode = i.extend({
|
||||
createEncryptor: function(c, b) {
|
||||
return this.Encryptor.create(c, b)
|
||||
},
|
||||
createDecryptor: function(c, b) {
|
||||
return this.Decryptor.create(c, b)
|
||||
},
|
||||
init: function(c, b) {
|
||||
this._cipher = c;
|
||||
this._iv = b
|
||||
}
|
||||
})).extend();
|
||||
f.Encryptor = f.extend({
|
||||
processBlock: function(n, l) {
|
||||
var d = this._cipher
|
||||
, p = d.blockSize;
|
||||
y.call(this, n, l, p);
|
||||
d.encryptBlock(n, l);
|
||||
this._prevBlock = n.slice(l, l + p)
|
||||
}
|
||||
});
|
||||
f.Decryptor = f.extend({
|
||||
processBlock: function(p, n) {
|
||||
var l = this._cipher
|
||||
, r = l.blockSize
|
||||
, q = p.slice(n, n + r);
|
||||
l.decryptBlock(p, n);
|
||||
y.call(this, p, n, r);
|
||||
this._prevBlock = q
|
||||
}
|
||||
});
|
||||
m = m.CBC = f;
|
||||
f = (g.pad = {}).Pkcs7 = {
|
||||
pad: function(r, p) {
|
||||
for (var u = 4 * p, u = u - r.sigBytes % u, s = u << 24 | u << 16 | u << 8 | u, q = [], t = 0; t < u; t += 4) {
|
||||
q.push(s)
|
||||
}
|
||||
u = D.create(q, u);
|
||||
r.concat(u)
|
||||
},
|
||||
unpad: function(b) {
|
||||
b.sigBytes -= b.words[b.sigBytes - 1 >>> 2] & 255
|
||||
}
|
||||
};
|
||||
j.BlockCipher = A.extend({
|
||||
cfg: A.cfg.extend({
|
||||
mode: m,
|
||||
padding: f
|
||||
}),
|
||||
reset: function() {
|
||||
A.reset.call(this);
|
||||
var l = this.cfg
|
||||
, d = l.iv
|
||||
, l = l.mode;
|
||||
if (this._xformMode == this._ENC_XFORM_MODE) {
|
||||
var n = l.createEncryptor
|
||||
} else {
|
||||
n = l.createDecryptor,
|
||||
this._minBufferSize = 1
|
||||
}
|
||||
this._mode = n.call(l, this, d && d.words)
|
||||
},
|
||||
_doProcessBlock: function(d, c) {
|
||||
this._mode.processBlock(d, c)
|
||||
},
|
||||
_doFinalize: function() {
|
||||
var d = this.cfg.padding;
|
||||
if (this._xformMode == this._ENC_XFORM_MODE) {
|
||||
d.pad(this._data, this.blockSize);
|
||||
var c = this._process(!0)
|
||||
} else {
|
||||
c = this._process(!0),
|
||||
d.unpad(c)
|
||||
}
|
||||
return c
|
||||
},
|
||||
blockSize: 4
|
||||
});
|
||||
var h = j.CipherParams = i.extend({
|
||||
init: function(b) {
|
||||
this.mixIn(b)
|
||||
},
|
||||
toString: function(b) {
|
||||
return (b || this.formatter).stringify(this)
|
||||
}
|
||||
})
|
||||
, m = (g.format = {}).OpenSSL = {
|
||||
stringify: function(d) {
|
||||
var c = d.ciphertext;
|
||||
d = d.salt;
|
||||
return (d ? D.create([1398893684, 1701076831]).concat(d).concat(c) : c).toString(e)
|
||||
},
|
||||
parse: function(l) {
|
||||
l = e.parse(l);
|
||||
var d = l.words;
|
||||
if (1398893684 == d[0] && 1701076831 == d[1]) {
|
||||
var n = D.create(d.slice(2, 4));
|
||||
d.splice(0, 4);
|
||||
l.sigBytes -= 16
|
||||
}
|
||||
return h.create({
|
||||
ciphertext: l,
|
||||
salt: n
|
||||
})
|
||||
}
|
||||
}
|
||||
, o = j.SerializableCipher = i.extend({
|
||||
cfg: i.extend({
|
||||
format: m
|
||||
}),
|
||||
encrypt: function(q, n, s, r) {
|
||||
r = this.cfg.extend(r);
|
||||
var p = q.createEncryptor(s, r);
|
||||
n = p.finalize(n);
|
||||
p = p.cfg;
|
||||
return h.create({
|
||||
ciphertext: n,
|
||||
key: s,
|
||||
iv: p.iv,
|
||||
algorithm: q,
|
||||
mode: p.mode,
|
||||
padding: p.padding,
|
||||
blockSize: q.blockSize,
|
||||
formatter: r.format
|
||||
})
|
||||
},
|
||||
decrypt: function(n, l, q, p) {
|
||||
p = this.cfg.extend(p);
|
||||
l = this._parse(l, p.format);
|
||||
return n.createDecryptor(q, p).finalize(l.ciphertext)
|
||||
},
|
||||
_parse: function(d, c) {
|
||||
return "string" == typeof d ? c.parse(d, this) : d
|
||||
}
|
||||
})
|
||||
, g = (g.kdf = {}).OpenSSL = {
|
||||
execute: function(n, l, q, p) {
|
||||
p || (p = D.random(8));
|
||||
n = z.create({
|
||||
keySize: l + q
|
||||
}).compute(n, p);
|
||||
q = D.create(n.words.slice(l), 4 * q);
|
||||
n.sigBytes = 4 * l;
|
||||
return h.create({
|
||||
key: n,
|
||||
iv: q,
|
||||
salt: p
|
||||
})
|
||||
}
|
||||
}
|
||||
, k = j.PasswordBasedCipher = o.extend({
|
||||
cfg: o.cfg.extend({
|
||||
kdf: g
|
||||
}),
|
||||
encrypt: function(a, q, p, n) {
|
||||
n = this.cfg.extend(n);
|
||||
p = n.kdf.execute(p, a.keySize, a.ivSize);
|
||||
n.iv = p.iv;
|
||||
a = o.encrypt.call(this, a, q, p.key, n);
|
||||
a.mixIn(p);
|
||||
return a
|
||||
},
|
||||
decrypt: function(a, q, p, n) {
|
||||
n = this.cfg.extend(n);
|
||||
q = this._parse(q, n.format);
|
||||
p = n.kdf.execute(p, a.keySize, a.ivSize, q.salt);
|
||||
n.iv = p.iv;
|
||||
return o.decrypt.call(this, a, q, p.key, n)
|
||||
}
|
||||
})
|
||||
}();
|
||||
(function() {
|
||||
for (var C = CryptoJS, K = C.lib.BlockCipher, Q = C.algo, M = [], E = [], D = [], I = [], m = [], A = [], S = [], h = [], J = [], L = [], T = [], R = 0; 256 > R; R++) {
|
||||
T[R] = 128 > R ? R << 1 : R << 1 ^ 283
|
||||
}
|
||||
for (var P = 0, O = 0, R = 0; 256 > R; R++) {
|
||||
var N = O ^ O << 1 ^ O << 2 ^ O << 3 ^ O << 4
|
||||
, N = N >>> 8 ^ N & 255 ^ 99;
|
||||
M[P] = N;
|
||||
E[N] = P;
|
||||
var f = T[P]
|
||||
, B = T[f]
|
||||
, o = T[B]
|
||||
, g = 257 * T[N] ^ 16843008 * N;
|
||||
D[P] = g << 24 | g >>> 8;
|
||||
I[P] = g << 16 | g >>> 16;
|
||||
m[P] = g << 8 | g >>> 24;
|
||||
A[P] = g;
|
||||
g = 16843009 * o ^ 65537 * B ^ 257 * f ^ 16843008 * P;
|
||||
S[N] = g << 24 | g >>> 8;
|
||||
h[N] = g << 16 | g >>> 16;
|
||||
J[N] = g << 8 | g >>> 24;
|
||||
L[N] = g;
|
||||
P ? (P = f ^ T[T[T[o ^ f]]],
|
||||
O ^= T[T[O]]) : P = O = 1
|
||||
}
|
||||
var i = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
|
||||
, Q = Q.AES = K.extend({
|
||||
_doReset: function() {
|
||||
for (var b = this._key, r = b.words, q = b.sigBytes / 4, b = 4 * ((this._nRounds = q + 6) + 1), p = this._keySchedule = [], n = 0; n < b; n++) {
|
||||
if (n < q) {
|
||||
p[n] = r[n]
|
||||
} else {
|
||||
var l = p[n - 1];
|
||||
n % q ? 6 < q && 4 == n % q && (l = M[l >>> 24] << 24 | M[l >>> 16 & 255] << 16 | M[l >>> 8 & 255] << 8 | M[l & 255]) : (l = l << 8 | l >>> 24,
|
||||
l = M[l >>> 24] << 24 | M[l >>> 16 & 255] << 16 | M[l >>> 8 & 255] << 8 | M[l & 255],
|
||||
l ^= i[n / q | 0] << 24);
|
||||
p[n] = p[n - q] ^ l
|
||||
}
|
||||
}
|
||||
r = this._invKeySchedule = [];
|
||||
for (q = 0; q < b; q++) {
|
||||
n = b - q,
|
||||
l = q % 4 ? p[n] : p[n - 4],
|
||||
r[q] = 4 > q || 4 >= n ? l : S[M[l >>> 24]] ^ h[M[l >>> 16 & 255]] ^ J[M[l >>> 8 & 255]] ^ L[M[l & 255]]
|
||||
}
|
||||
},
|
||||
encryptBlock: function(d, c) {
|
||||
this._doCryptBlock(d, c, this._keySchedule, D, I, m, A, M)
|
||||
},
|
||||
decryptBlock: function(b, j) {
|
||||
var e = b[j + 1];
|
||||
b[j + 1] = b[j + 3];
|
||||
b[j + 3] = e;
|
||||
this._doCryptBlock(b, j, this._invKeySchedule, S, h, J, L, E);
|
||||
e = b[j + 1];
|
||||
b[j + 1] = b[j + 3];
|
||||
b[j + 3] = e
|
||||
},
|
||||
_doCryptBlock: function(ac, ab, aa, Z, Y, U, G, X) {
|
||||
for (var F = this._nRounds, W = ac[ab] ^ aa[0], V = ac[ab + 1] ^ aa[1], H = ac[ab + 2] ^ aa[2], z = ac[ab + 3] ^ aa[3], y = 4, w = 1; w < F; w++) {
|
||||
var x = Z[W >>> 24] ^ Y[V >>> 16 & 255] ^ U[H >>> 8 & 255] ^ G[z & 255] ^ aa[y++]
|
||||
, v = Z[V >>> 24] ^ Y[H >>> 16 & 255] ^ U[z >>> 8 & 255] ^ G[W & 255] ^ aa[y++]
|
||||
, u = Z[H >>> 24] ^ Y[z >>> 16 & 255] ^ U[W >>> 8 & 255] ^ G[V & 255] ^ aa[y++]
|
||||
, z = Z[z >>> 24] ^ Y[W >>> 16 & 255] ^ U[V >>> 8 & 255] ^ G[H & 255] ^ aa[y++]
|
||||
, W = x
|
||||
, V = v
|
||||
, H = u
|
||||
}
|
||||
x = (X[W >>> 24] << 24 | X[V >>> 16 & 255] << 16 | X[H >>> 8 & 255] << 8 | X[z & 255]) ^ aa[y++];
|
||||
v = (X[V >>> 24] << 24 | X[H >>> 16 & 255] << 16 | X[z >>> 8 & 255] << 8 | X[W & 255]) ^ aa[y++];
|
||||
u = (X[H >>> 24] << 24 | X[z >>> 16 & 255] << 16 | X[W >>> 8 & 255] << 8 | X[V & 255]) ^ aa[y++];
|
||||
z = (X[z >>> 24] << 24 | X[W >>> 16 & 255] << 16 | X[V >>> 8 & 255] << 8 | X[H & 255]) ^ aa[y++];
|
||||
ac[ab] = x;
|
||||
ac[ab + 1] = v;
|
||||
ac[ab + 2] = u;
|
||||
ac[ab + 3] = z
|
||||
},
|
||||
keySize: 8
|
||||
});
|
||||
C.AES = K._createHelper(Q)
|
||||
}
|
||||
)();
|
@ -1,42 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @时间 : 2019-11-10 00:00
|
||||
# @作者 : 陈祥安
|
||||
# @文件名 : run_aes.py
|
||||
# @公众号: Python学习开发
|
||||
from pprint import pprint
|
||||
|
||||
import execjs
|
||||
import pathlib
|
||||
import os
|
||||
|
||||
js_path = pathlib.Path(os.path.abspath(os.path.dirname(__file__)))
|
||||
js_path = js_path / "crypto.js"
|
||||
with js_path.open('r', encoding="utf-8") as f:
|
||||
script = f.read()
|
||||
|
||||
c = "1234"
|
||||
|
||||
# 传入python中的变量
|
||||
add = ('''
|
||||
aesEncrypt = function() {
|
||||
result={}
|
||||
var t = CryptoJS.MD5("login.xxx.com"),
|
||||
i = CryptoJS.enc.Utf8.parse(t),
|
||||
r = CryptoJS.enc.Utf8.parse("1234567812345678"),
|
||||
u = CryptoJS.AES.encrypt(''' + "'{}'".format(c) + ''',i, {
|
||||
iv: r
|
||||
});
|
||||
result.t=t.toString()
|
||||
result.i =i.toString()
|
||||
result.r =r.toString()
|
||||
result.u =u.toString()
|
||||
return result
|
||||
};
|
||||
''')
|
||||
script = script + add
|
||||
print("script",script)
|
||||
|
||||
|
||||
x = execjs.compile(script)
|
||||
result = x.call("aesEncrypt")
|
||||
print(result)
|
@ -1,5 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2019-10-27 21:34
|
||||
# @Author : cxa
|
||||
# @File : __init__.py.py
|
||||
# @Software: PyCharm
|
@ -1,43 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2019-10-27 22:01
|
||||
# @Author : cxa
|
||||
# @File : demo.py
|
||||
# @Software: PyCharm
|
||||
from pyppeteer import launch
|
||||
import asyncio
|
||||
|
||||
|
||||
def get_text(id,attr):
|
||||
### 拼接字符串注意{}要写出{{}}
|
||||
script=("""
|
||||
let id='{id}';
|
||||
let attr='{attr}';
|
||||
let supporter ="chrome";
|
||||
const run=function(){{
|
||||
let all_str = $(id).getAttribute(attr)
|
||||
let end_index=supporter.length+58
|
||||
Base64._keyStr = all_str.substring(0, end_index)
|
||||
let charset = all_str.substring(64, all_str.length)
|
||||
let encoded = Base64.decode(charset,supporter);
|
||||
return encoded
|
||||
}}
|
||||
run()
|
||||
""").format(id=id,attr=attr)
|
||||
return script
|
||||
|
||||
|
||||
|
||||
async def run():
|
||||
browser = await launch({"headless": True})
|
||||
page = await browser.newPage()
|
||||
await page.goto('http://127.0.0.1:5002/')
|
||||
script = get_text("base64","data")
|
||||
text = await page.evaluate(script)
|
||||
|
||||
print(text)
|
||||
return text
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(run())
|
@ -1,87 +0,0 @@
|
||||
import string
|
||||
import random
|
||||
|
||||
# base 字符集
|
||||
|
||||
|
||||
base64_charset = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/'
|
||||
base64_charset_list = list(base64_charset)
|
||||
random.shuffle(base64_charset_list)
|
||||
base64_charset = ''.join(base64_charset_list)
|
||||
|
||||
|
||||
def encode(orgin_string):
|
||||
"""
|
||||
将bytes类型编码为base64
|
||||
:param origin_bytes:需要编码的bytes
|
||||
:return:base64字符串
|
||||
"""
|
||||
|
||||
origin_bytes = orgin_string.encode()
|
||||
# 将每一位bytes转换为二进制字符串
|
||||
base64_bytes = [f"{str(bin(b)).replace('0b', ''):0>8}" for b in origin_bytes]
|
||||
|
||||
resp = ''
|
||||
nums = len(base64_bytes) // 3
|
||||
remain = len(base64_bytes) % 3
|
||||
|
||||
integral_part = base64_bytes[0:3 * nums]
|
||||
while integral_part:
|
||||
# 取三个字节,以每6比特,转换为4个整数
|
||||
tmp_unit = ''.join(integral_part[0:3])
|
||||
tmp_unit = [int(tmp_unit[x: x + 6], 2) for x in [0, 6, 12, 18]]
|
||||
# 取对应base64字符
|
||||
resp += ''.join([base64_charset[i] for i in tmp_unit])
|
||||
integral_part = integral_part[3:]
|
||||
|
||||
if remain:
|
||||
# 补齐三个字节,每个字节补充 0000 0000
|
||||
remain_part = ''.join(base64_bytes[3 * nums:]) + (3 - remain) * '0' * 8
|
||||
# 取三个字节,以每6比特,转换为4个整数
|
||||
# 剩余1字节可构造2个base64字符,补充==;剩余2字节可构造3个base64字符,补充=
|
||||
tmp_unit = [int(remain_part[x: x + 6], 2) for x in [0, 6, 12, 18]][:remain + 1]
|
||||
resp += ''.join([base64_charset[i] for i in tmp_unit]) + (3 - remain) * '='
|
||||
|
||||
return resp, base64_charset
|
||||
|
||||
|
||||
def decode(base64_str, charset):
|
||||
"""
|
||||
解码base64字符串
|
||||
:param base64_str:base64字符串
|
||||
:return:解码后的bytearray;若入参不是合法base64字符串,返回空bytearray
|
||||
"""
|
||||
|
||||
# 对每一个base64字符取下标索引,并转换为6为二进制字符串
|
||||
base64_bytes = [f"{str(bin(charset.index(s))).replace('0b', ''):0>6}" for s in base64_str if
|
||||
s != '=']
|
||||
print("base64_bytes", base64_bytes)
|
||||
resp = bytearray()
|
||||
nums = len(base64_bytes) // 4
|
||||
remain = len(base64_bytes) % 4
|
||||
integral_part = base64_bytes[0:4 * nums]
|
||||
|
||||
while integral_part:
|
||||
# 取4个6位base64字符,作为3个字节
|
||||
tmp_unit = ''.join(integral_part[0:4])
|
||||
tmp_unit = [int(tmp_unit[x: x + 8], 2) for x in [0, 8, 16]]
|
||||
for i in tmp_unit:
|
||||
resp.append(i)
|
||||
integral_part = integral_part[4:]
|
||||
|
||||
if remain:
|
||||
remain_part = ''.join(base64_bytes[nums * 4:])
|
||||
tmp_unit = [int(remain_part[i * 8:(i + 1) * 8], 2) for i in range(remain - 1)]
|
||||
for i in tmp_unit:
|
||||
resp.append(i)
|
||||
|
||||
return str(bytes(resp),encoding="utf-8"), charset
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
a = encode("NightTeam")
|
||||
b = decode(a[0], a[1])
|
||||
print(a)
|
||||
print(b)
|
@ -1,56 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @时间 : 2019-12-30 00:18
|
||||
# @作者 : 陈祥安
|
||||
# @文件名 : server.py
|
||||
# @公众号: Python学习开发
|
||||
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2019-10-14 16:22
|
||||
# @Author : cxa
|
||||
# @File : server.py
|
||||
# @Software: PyCharm
|
||||
|
||||
from flask import Flask, render_template
|
||||
import random
|
||||
import my_base64
|
||||
app = Flask(__name__)
|
||||
|
||||
text = """
|
||||
Life is not about waiting for the storm to pass. it's about learning to dance in the rain.
|
||||
生活不是等待暴风雨过去,而是要学会在雨中跳舞。
|
||||
What is insistence? That is, day after day, you tell yourself to go on for another day.
|
||||
什么是坚持?那就是,一天又一天,你告诉自己,再坚持一天。
|
||||
I don't want to earn my living. I want to live. --Oscar·Wilde.
|
||||
我不想谋生。我想生活。--奥斯卡·王尔德。
|
||||
Life has not the best choice, but to undertake your choice.
|
||||
生活不是拥有最好的选择,而是承担你的选择。
|
||||
It takes courage to follow your mind. But it takes everything to follow your heart.
|
||||
跟着理智走,要有勇气;跟着感觉走,要有倾其所有的决心。
|
||||
You may be our of my sight, but never out of my mind.
|
||||
"""
|
||||
text_gen = [item for item in text.split("\n") if item]
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
origin_text = random.choice(text_gen).strip()
|
||||
|
||||
text_encode, charset = my_base64.encode(origin_text)
|
||||
variable = {"text": text_encode, "charset": charset}
|
||||
|
||||
return render_template("index.html", variable=variable)
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
def miss(e):
|
||||
return render_template('404.html'), 404
|
||||
|
||||
|
||||
@app.errorhandler(500)
|
||||
def error(e):
|
||||
return render_template('500.html'), 500
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=5002, debug=True)
|
@ -1,162 +0,0 @@
|
||||
function detectAuto() {
|
||||
if (/HeadlessChrome/.test(navigator.userAgent) || // ua test
|
||||
!window.chrome || // headless test
|
||||
navigator.plugins.length === 0 || //plugins test
|
||||
// languages test
|
||||
!navigator.languages || navigator.languages.length === 0) {
|
||||
return true;
|
||||
}}
|
||||
var Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
||||
|
||||
// public method for encoding
|
||||
, encode: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = Base64._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output +
|
||||
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
} // Whend
|
||||
|
||||
return output;
|
||||
} // End Function encode
|
||||
|
||||
|
||||
// public method for decoding
|
||||
, decode: function (input,supporter) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << supporter.length) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
|
||||
} // Whend
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
|
||||
return output;
|
||||
} // End Function decode
|
||||
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
, _utf8_encode: function (string) {
|
||||
var utftext = "";
|
||||
string = string.replace(/\r\n/g, "\n");
|
||||
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
} // Next n
|
||||
|
||||
return utftext;
|
||||
} // End Function _utf8_encode
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
, _utf8_decode: function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c, c1, c2, c3;
|
||||
c = c1 = c2 = 0;
|
||||
|
||||
while (i < utftext.length) {
|
||||
c = utftext.charCodeAt(i);
|
||||
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if ((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
c3 = utftext.charCodeAt(i + 2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
|
||||
} // Whend
|
||||
|
||||
return string;
|
||||
}, // End Function _utf8_decode
|
||||
run: function (id, attr,supporter) {
|
||||
let all_str = $(id).getAttribute(attr)
|
||||
let end_index=supporter.length+58
|
||||
Base64._keyStr = all_str.substring(0, end_index)
|
||||
let charset = all_str.substring(64, all_str.length)
|
||||
let encoded = Base64.decode(charset,supporter);
|
||||
$(id).value = encoded;
|
||||
}
|
||||
|
||||
}
|
||||
$ = function (id) {
|
||||
return document.getElementById(id)
|
||||
};
|
||||
|
||||
function doit() {
|
||||
if(!detect){
|
||||
Base64.run('base64', 'data',"chrome")
|
||||
}
|
||||
|
||||
}
|
||||
let detect=detectAuto()
|
||||
if (detect){
|
||||
window.onload =doit
|
||||
}else{
|
||||
let div=document.createElement("div")
|
||||
div.innerHTML ="禁止爬虫"
|
||||
document.body.appendChild(div)
|
||||
}
|
@ -1,143 +0,0 @@
|
||||
export default function BrowserType() {
|
||||
// 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
const testUa = regexp => regexp.test(ua);
|
||||
const testVs = regexp => ua.match(regexp)
|
||||
.toString()
|
||||
.replace(/[^0-9|_.]/g, "")
|
||||
.replace(/_/g, ".");
|
||||
// 系统
|
||||
let system = "unknow";
|
||||
if (testUa(/windows|win32|win64|wow32|wow64/g)) {
|
||||
system = "windows"; // windows系统
|
||||
} else if (testUa(/macintosh|macintel/g)) {
|
||||
system = "macos"; // macos系统
|
||||
} else if (testUa(/x11/g)) {
|
||||
system = "linux"; // linux系统
|
||||
} else if (testUa(/android|adr/g)) {
|
||||
system = "android"; // android系统
|
||||
} else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
||||
system = "ios"; // ios系统
|
||||
}
|
||||
// 系统版本
|
||||
let systemVs = "unknow";
|
||||
if (system === "windows") {
|
||||
if (testUa(/windows nt 5.0|windows 2000/g)) {
|
||||
systemVs = "2000";
|
||||
} else if (testUa(/windows nt 5.1|windows xp/g)) {
|
||||
systemVs = "xp";
|
||||
} else if (testUa(/windows nt 5.2|windows 2003/g)) {
|
||||
systemVs = "2003";
|
||||
} else if (testUa(/windows nt 6.0|windows vista/g)) {
|
||||
systemVs = "vista";
|
||||
} else if (testUa(/windows nt 6.1|windows 7/g)) {
|
||||
systemVs = "7";
|
||||
} else if (testUa(/windows nt 6.2|windows 8/g)) {
|
||||
systemVs = "8";
|
||||
} else if (testUa(/windows nt 6.3|windows 8.1/g)) {
|
||||
systemVs = "8.1";
|
||||
} else if (testUa(/windows nt 10.0|windows 10/g)) {
|
||||
systemVs = "10";
|
||||
}
|
||||
} else if (system === "macos") {
|
||||
systemVs = testVs(/os x [\d._]+/g);
|
||||
} else if (system === "android") {
|
||||
systemVs = testVs(/android [\d._]+/g);
|
||||
} else if (system === "ios") {
|
||||
systemVs = testVs(/os [\d._]+/g);
|
||||
}
|
||||
// 平台
|
||||
let platform = "unknow";
|
||||
if (system === "windows" || system === "macos" || system === "linux") {
|
||||
platform = "desktop"; // 桌面端
|
||||
} else if (system === "android" || system === "ios" || testUa(/mobile/g)) {
|
||||
platform = "mobile"; // 移动端
|
||||
}
|
||||
// 内核和载体
|
||||
let engine = "unknow";
|
||||
let supporter = "unknow";
|
||||
if (testUa(/applewebkit/g)) {
|
||||
engine = "webkit"; // webkit内核
|
||||
if (testUa(/edge/g)) {
|
||||
supporter = "edge"; // edge浏览器
|
||||
} else if (testUa(/opr/g)) {
|
||||
supporter = "opera"; // opera浏览器
|
||||
} else if (testUa(/chrome/g)) {
|
||||
supporter = "chrome"; // chrome浏览器
|
||||
} else if (testUa(/safari/g)) {
|
||||
supporter = "safari"; // safari浏览器
|
||||
}
|
||||
} else if (testUa(/gecko/g) && testUa(/firefox/g)) {
|
||||
engine = "gecko"; // gecko内核
|
||||
supporter = "firefox"; // firefox浏览器
|
||||
} else if (testUa(/presto/g)) {
|
||||
engine = "presto"; // presto内核
|
||||
supporter = "opera"; // opera浏览器
|
||||
} else if (testUa(/trident|compatible|msie/g)) {
|
||||
engine = "trident"; // trident内核
|
||||
supporter = "iexplore"; // iexplore浏览器
|
||||
}
|
||||
// 内核版本
|
||||
let engineVs = "unknow";
|
||||
if (engine === "webkit") {
|
||||
engineVs = testVs(/applewebkit\/[\d._]+/g);
|
||||
} else if (engine === "gecko") {
|
||||
engineVs = testVs(/gecko\/[\d._]+/g);
|
||||
} else if (engine === "presto") {
|
||||
engineVs = testVs(/presto\/[\d._]+/g);
|
||||
} else if (engine === "trident") {
|
||||
engineVs = testVs(/trident\/[\d._]+/g);
|
||||
}
|
||||
// 载体版本
|
||||
let supporterVs = "unknow";
|
||||
if (supporter === "chrome") {
|
||||
supporterVs = testVs(/chrome\/[\d._]+/g);
|
||||
} else if (supporter === "safari") {
|
||||
supporterVs = testVs(/version\/[\d._]+/g);
|
||||
} else if (supporter === "firefox") {
|
||||
supporterVs = testVs(/firefox\/[\d._]+/g);
|
||||
} else if (supporter === "opera") {
|
||||
supporterVs = testVs(/opr\/[\d._]+/g);
|
||||
} else if (supporter === "iexplore") {
|
||||
supporterVs = testVs(/(msie [\d._]+)|(rv:[\d._]+)/g);
|
||||
} else if (supporter === "edge") {
|
||||
supporterVs = testVs(/edge\/[\d._]+/g);
|
||||
}
|
||||
// 外壳和外壳版本
|
||||
let shell = "none";
|
||||
let shellVs = "unknow";
|
||||
if (testUa(/micromessenger/g)) {
|
||||
shell = "wechat"; // 微信浏览器
|
||||
shellVs = testVs(/micromessenger\/[\d._]+/g);
|
||||
} else if (testUa(/qqbrowser/g)) {
|
||||
shell = "qq"; // QQ浏览器
|
||||
shellVs = testVs(/qqbrowser\/[\d._]+/g);
|
||||
} else if (testUa(/ucbrowser/g)) {
|
||||
shell = "uc"; // UC浏览器
|
||||
shellVs = testVs(/ucbrowser\/[\d._]+/g);
|
||||
} else if (testUa(/qihu 360se/g)) {
|
||||
shell = "360"; // 360浏览器(无版本)
|
||||
} else if (testUa(/2345explorer/g)) {
|
||||
shell = "2345"; // 2345浏览器
|
||||
shellVs = testVs(/2345explorer\/[\d._]+/g);
|
||||
} else if (testUa(/metasr/g)) {
|
||||
shell = "sougou"; // 搜狗浏览器(无版本)
|
||||
} else if (testUa(/lbbrowser/g)) {
|
||||
shell = "liebao"; // 猎豹浏览器(无版本)
|
||||
} else if (testUa(/maxthon/g)) {
|
||||
shell = "maxthon"; // 遨游浏览器
|
||||
shellVs = testVs(/maxthon\/[\d._]+/g);
|
||||
}
|
||||
return Object.assign({
|
||||
engine, // webkit gecko presto trident
|
||||
engineVs,
|
||||
platform, // desktop mobile
|
||||
supporter, // chrome safari firefox opera iexplore edge
|
||||
supporterVs,
|
||||
system, // windows macos linux android ios
|
||||
systemVs
|
||||
}, shell === "none" ? {} : {
|
||||
shell, // wechat qq uc 360 2345 sougou liebao maxthon
|
||||
shellVs
|
||||
});
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>链接错误,请重新确认</h1>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>请使用post请求,谢谢。</h1>
|
||||
</body>
|
||||
</html>
|
@ -1,14 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>每日一句</title>
|
||||
<script src="/static/js/base64.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<input id="base64" data="{{ variable.charset }}{{ variable.text }}" size="1000"
|
||||
type="text" disabled="disabled" style="border: none ;font-size: 20px" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,5 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2019-10-27 20:56
|
||||
# @Author : cxa
|
||||
# @File : __init__.py.py
|
||||
# @Software: PyCharm
|
@ -1,49 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2019-10-27 20:56
|
||||
# @Author : cxa
|
||||
# @File : demo.py
|
||||
# @Software: PyCharm
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.support.ui import WebDriverWait
|
||||
from selenium.webdriver.support import expected_conditions as EC
|
||||
from selenium.webdriver.common.action_chains import ActionChains
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from selenium.webdriver.chrome.options import Options
|
||||
import time
|
||||
|
||||
|
||||
def get_text(id,attr):
|
||||
### 拼接字符串注意{}要写出{{}}
|
||||
script=("""
|
||||
let bt=BrowserType();
|
||||
let id='{id}';
|
||||
let attr='{attr}';
|
||||
let supporter =bt.supporter;
|
||||
const run=function(){{
|
||||
let all_str = $(id).getAttribute(attr)
|
||||
let end_index=supporter.length+58
|
||||
Base64._keyStr = all_str.substring(0, end_index)
|
||||
let charset = all_str.substring(64, all_str.length)
|
||||
let encoded = Base64.decode(charset,supporter);
|
||||
return encoded
|
||||
}}
|
||||
return run()
|
||||
""").format(id=id,attr=attr)
|
||||
return script
|
||||
|
||||
|
||||
|
||||
chrome_option = Options()
|
||||
chrome_option.add_argument("--headless")
|
||||
chrome_option.add_argument("--disable-gpu")
|
||||
chrome_option.add_argument('--ignore-certificate-errors') # SSL保存
|
||||
browser = webdriver.Chrome(options=chrome_option)
|
||||
wait = WebDriverWait(browser, 10)
|
||||
# 启动浏览器,获取网页源代码
|
||||
mainUrl = "http://127.0.0.1:5002/"
|
||||
browser.get(mainUrl)
|
||||
result=browser.execute_script(get_text("base64","data"))
|
||||
print(result)
|
||||
time.sleep(10)
|
||||
browser.quit()
|
@ -1,87 +0,0 @@
|
||||
import string
|
||||
import random
|
||||
|
||||
# base 字符集
|
||||
|
||||
|
||||
base64_charset = string.ascii_uppercase + string.ascii_lowercase + string.digits + '+/'
|
||||
base64_charset_list = list(base64_charset)
|
||||
random.shuffle(base64_charset_list)
|
||||
base64_charset = ''.join(base64_charset_list)
|
||||
|
||||
|
||||
def encode(orgin_string):
|
||||
"""
|
||||
将bytes类型编码为base64
|
||||
:param origin_bytes:需要编码的bytes
|
||||
:return:base64字符串
|
||||
"""
|
||||
|
||||
origin_bytes = orgin_string.encode()
|
||||
# 将每一位bytes转换为二进制字符串
|
||||
base64_bytes = [f"{str(bin(b)).replace('0b', ''):0>8}" for b in origin_bytes]
|
||||
|
||||
resp = ''
|
||||
nums = len(base64_bytes) // 3
|
||||
remain = len(base64_bytes) % 3
|
||||
|
||||
integral_part = base64_bytes[0:3 * nums]
|
||||
while integral_part:
|
||||
# 取三个字节,以每6比特,转换为4个整数
|
||||
tmp_unit = ''.join(integral_part[0:3])
|
||||
tmp_unit = [int(tmp_unit[x: x + 6], 2) for x in [0, 6, 12, 18]]
|
||||
# 取对应base64字符
|
||||
resp += ''.join([base64_charset[i] for i in tmp_unit])
|
||||
integral_part = integral_part[3:]
|
||||
|
||||
if remain:
|
||||
# 补齐三个字节,每个字节补充 0000 0000
|
||||
remain_part = ''.join(base64_bytes[3 * nums:]) + (3 - remain) * '0' * 8
|
||||
# 取三个字节,以每6比特,转换为4个整数
|
||||
# 剩余1字节可构造2个base64字符,补充==;剩余2字节可构造3个base64字符,补充=
|
||||
tmp_unit = [int(remain_part[x: x + 6], 2) for x in [0, 6, 12, 18]][:remain + 1]
|
||||
resp += ''.join([base64_charset[i] for i in tmp_unit]) + (3 - remain) * '='
|
||||
|
||||
return resp, base64_charset
|
||||
|
||||
|
||||
def decode(base64_str, charset):
|
||||
"""
|
||||
解码base64字符串
|
||||
:param base64_str:base64字符串
|
||||
:return:解码后的bytearray;若入参不是合法base64字符串,返回空bytearray
|
||||
"""
|
||||
|
||||
# 对每一个base64字符取下标索引,并转换为6为二进制字符串
|
||||
base64_bytes = [f"{str(bin(charset.index(s))).replace('0b', ''):0>6}" for s in base64_str if
|
||||
s != '=']
|
||||
print("base64_bytes", base64_bytes)
|
||||
resp = bytearray()
|
||||
nums = len(base64_bytes) // 4
|
||||
remain = len(base64_bytes) % 4
|
||||
integral_part = base64_bytes[0:4 * nums]
|
||||
|
||||
while integral_part:
|
||||
# 取4个6位base64字符,作为3个字节
|
||||
tmp_unit = ''.join(integral_part[0:4])
|
||||
tmp_unit = [int(tmp_unit[x: x + 8], 2) for x in [0, 8, 16]]
|
||||
for i in tmp_unit:
|
||||
resp.append(i)
|
||||
integral_part = integral_part[4:]
|
||||
|
||||
if remain:
|
||||
remain_part = ''.join(base64_bytes[nums * 4:])
|
||||
tmp_unit = [int(remain_part[i * 8:(i + 1) * 8], 2) for i in range(remain - 1)]
|
||||
for i in tmp_unit:
|
||||
resp.append(i)
|
||||
|
||||
return str(bytes(resp),encoding="utf-8"), charset
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
a = encode("NightTeam")
|
||||
b = decode(a[0], a[1])
|
||||
print(a)
|
||||
print(b)
|
@ -1,56 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @时间 : 2019-12-30 00:18
|
||||
# @作者 : 陈祥安
|
||||
# @文件名 : server.py
|
||||
# @公众号: Python学习开发
|
||||
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Time : 2019-10-14 16:22
|
||||
# @Author : cxa
|
||||
# @File : server.py
|
||||
# @Software: PyCharm
|
||||
|
||||
from flask import Flask, render_template
|
||||
import random
|
||||
import my_base64
|
||||
app = Flask(__name__)
|
||||
|
||||
text = """
|
||||
Life is not about waiting for the storm to pass. it's about learning to dance in the rain.
|
||||
生活不是等待暴风雨过去,而是要学会在雨中跳舞。
|
||||
What is insistence? That is, day after day, you tell yourself to go on for another day.
|
||||
什么是坚持?那就是,一天又一天,你告诉自己,再坚持一天。
|
||||
I don't want to earn my living. I want to live. --Oscar·Wilde.
|
||||
我不想谋生。我想生活。--奥斯卡·王尔德。
|
||||
Life has not the best choice, but to undertake your choice.
|
||||
生活不是拥有最好的选择,而是承担你的选择。
|
||||
It takes courage to follow your mind. But it takes everything to follow your heart.
|
||||
跟着理智走,要有勇气;跟着感觉走,要有倾其所有的决心。
|
||||
You may be our of my sight, but never out of my mind.
|
||||
"""
|
||||
text_gen = [item for item in text.split("\n") if item]
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
origin_text = random.choice(text_gen).strip()
|
||||
|
||||
text_encode, charset = my_base64.encode(origin_text)
|
||||
variable = {"text": text_encode, "charset": charset}
|
||||
|
||||
return render_template("index.html", variable=variable)
|
||||
|
||||
|
||||
@app.errorhandler(404)
|
||||
def miss(e):
|
||||
return render_template('404.html'), 404
|
||||
|
||||
|
||||
@app.errorhandler(500)
|
||||
def error(e):
|
||||
return render_template('500.html'), 500
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=5002, debug=True)
|
@ -1,293 +0,0 @@
|
||||
function BrowserType() {
|
||||
// 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
const testUa = regexp => regexp.test(ua);
|
||||
const testVs = regexp => ua.match(regexp)
|
||||
.toString()
|
||||
.replace(/[^0-9|_.]/g, "")
|
||||
.replace(/_/g, ".");
|
||||
// 系统
|
||||
let system = "unknow";
|
||||
if (testUa(/windows|win32|win64|wow32|wow64/g)) {
|
||||
system = "windows"; // windows系统
|
||||
} else if (testUa(/macintosh|macintel/g)) {
|
||||
system = "macos"; // macos系统
|
||||
} else if (testUa(/x11/g)) {
|
||||
system = "linux"; // linux系统
|
||||
} else if (testUa(/android|adr/g)) {
|
||||
system = "android"; // android系统
|
||||
} else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
||||
system = "ios"; // ios系统
|
||||
}
|
||||
// 系统版本
|
||||
let systemVs = "unknow";
|
||||
if (system === "windows") {
|
||||
if (testUa(/windows nt 5.0|windows 2000/g)) {
|
||||
systemVs = "2000";
|
||||
} else if (testUa(/windows nt 5.1|windows xp/g)) {
|
||||
systemVs = "xp";
|
||||
} else if (testUa(/windows nt 5.2|windows 2003/g)) {
|
||||
systemVs = "2003";
|
||||
} else if (testUa(/windows nt 6.0|windows vista/g)) {
|
||||
systemVs = "vista";
|
||||
} else if (testUa(/windows nt 6.1|windows 7/g)) {
|
||||
systemVs = "7";
|
||||
} else if (testUa(/windows nt 6.2|windows 8/g)) {
|
||||
systemVs = "8";
|
||||
} else if (testUa(/windows nt 6.3|windows 8.1/g)) {
|
||||
systemVs = "8.1";
|
||||
} else if (testUa(/windows nt 10.0|windows 10/g)) {
|
||||
systemVs = "10";
|
||||
}
|
||||
} else if (system === "macos") {
|
||||
systemVs = testVs(/os x [\d._]+/g);
|
||||
} else if (system === "android") {
|
||||
systemVs = testVs(/android [\d._]+/g);
|
||||
} else if (system === "ios") {
|
||||
systemVs = testVs(/os [\d._]+/g);
|
||||
}
|
||||
// 平台
|
||||
let platform = "unknow";
|
||||
if (system === "windows" || system === "macos" || system === "linux") {
|
||||
platform = "desktop"; // 桌面端
|
||||
} else if (system === "android" || system === "ios" || testUa(/mobile/g)) {
|
||||
platform = "mobile"; // 移动端
|
||||
}
|
||||
// 内核和载体
|
||||
let engine = "unknow";
|
||||
let supporter = "unknow";
|
||||
if (testUa(/applewebkit/g)) {
|
||||
engine = "webkit"; // webkit内核
|
||||
if (testUa(/edge/g)) {
|
||||
supporter = "edge"; // edge浏览器
|
||||
} else if (testUa(/opr/g)) {
|
||||
supporter = "opera"; // opera浏览器
|
||||
} else if (testUa(/chrome/g)) {
|
||||
supporter = "chrome"; // chrome浏览器
|
||||
} else if (testUa(/safari/g)) {
|
||||
supporter = "safari"; // safari浏览器
|
||||
}
|
||||
} else if (testUa(/gecko/g) && testUa(/firefox/g)) {
|
||||
engine = "gecko"; // gecko内核
|
||||
supporter = "firefox"; // firefox浏览器
|
||||
} else if (testUa(/presto/g)) {
|
||||
engine = "presto"; // presto内核
|
||||
supporter = "opera"; // opera浏览器
|
||||
} else if (testUa(/trident|compatible|msie/g)) {
|
||||
engine = "trident"; // trident内核
|
||||
supporter = "iexplore"; // iexplore浏览器
|
||||
}
|
||||
// 内核版本
|
||||
let engineVs = "unknow";
|
||||
if (engine === "webkit") {
|
||||
engineVs = testVs(/applewebkit\/[\d._]+/g);
|
||||
} else if (engine === "gecko") {
|
||||
engineVs = testVs(/gecko\/[\d._]+/g);
|
||||
} else if (engine === "presto") {
|
||||
engineVs = testVs(/presto\/[\d._]+/g);
|
||||
} else if (engine === "trident") {
|
||||
engineVs = testVs(/trident\/[\d._]+/g);
|
||||
}
|
||||
// 载体版本
|
||||
let supporterVs = "unknow";
|
||||
if (supporter === "chrome") {
|
||||
supporterVs = testVs(/chrome\/[\d._]+/g);
|
||||
} else if (supporter === "safari") {
|
||||
supporterVs = testVs(/version\/[\d._]+/g);
|
||||
} else if (supporter === "firefox") {
|
||||
supporterVs = testVs(/firefox\/[\d._]+/g);
|
||||
} else if (supporter === "opera") {
|
||||
supporterVs = testVs(/opr\/[\d._]+/g);
|
||||
} else if (supporter === "iexplore") {
|
||||
supporterVs = testVs(/(msie [\d._]+)|(rv:[\d._]+)/g);
|
||||
} else if (supporter === "edge") {
|
||||
supporterVs = testVs(/edge\/[\d._]+/g);
|
||||
}
|
||||
// 外壳和外壳版本
|
||||
let shell = "none";
|
||||
let shellVs = "unknow";
|
||||
if (testUa(/micromessenger/g)) {
|
||||
shell = "wechat"; // 微信浏览器
|
||||
shellVs = testVs(/micromessenger\/[\d._]+/g);
|
||||
} else if (testUa(/qqbrowser/g)) {
|
||||
shell = "qq"; // QQ浏览器
|
||||
shellVs = testVs(/qqbrowser\/[\d._]+/g);
|
||||
} else if (testUa(/ucbrowser/g)) {
|
||||
shell = "uc"; // UC浏览器
|
||||
shellVs = testVs(/ucbrowser\/[\d._]+/g);
|
||||
} else if (testUa(/qihu 360se/g)) {
|
||||
shell = "360"; // 360浏览器(无版本)
|
||||
} else if (testUa(/2345explorer/g)) {
|
||||
shell = "2345"; // 2345浏览器
|
||||
shellVs = testVs(/2345explorer\/[\d._]+/g);
|
||||
} else if (testUa(/metasr/g)) {
|
||||
shell = "sougou"; // 搜狗浏览器(无版本)
|
||||
} else if (testUa(/lbbrowser/g)) {
|
||||
shell = "liebao"; // 猎豹浏览器(无版本)
|
||||
} else if (testUa(/maxthon/g)) {
|
||||
shell = "maxthon"; // 遨游浏览器
|
||||
shellVs = testVs(/maxthon\/[\d._]+/g);
|
||||
}
|
||||
return Object.assign({
|
||||
engine, // webkit gecko presto trident
|
||||
engineVs,
|
||||
platform, // desktop mobile
|
||||
supporter, // chrome safari firefox opera iexplore edge
|
||||
supporterVs,
|
||||
system, // windows macos linux android ios
|
||||
systemVs
|
||||
}, shell === "none" ? {} : {
|
||||
shell, // wechat qq uc 360 2345 sougou liebao maxthon
|
||||
shellVs
|
||||
});
|
||||
}
|
||||
var Base64 = {
|
||||
|
||||
// private property
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
||||
|
||||
// public method for encoding
|
||||
, encode: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = Base64._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output +
|
||||
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
} // Whend
|
||||
|
||||
return output;
|
||||
} // End Function encode
|
||||
|
||||
|
||||
// public method for decoding
|
||||
, decode: function (input,supporter) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << supporter.length) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
|
||||
} // Whend
|
||||
|
||||
output = Base64._utf8_decode(output);
|
||||
|
||||
return output;
|
||||
} // End Function decode
|
||||
|
||||
|
||||
// private method for UTF-8 encoding
|
||||
, _utf8_encode: function (string) {
|
||||
var utftext = "";
|
||||
string = string.replace(/\r\n/g, "\n");
|
||||
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
|
||||
} // Next n
|
||||
|
||||
return utftext;
|
||||
} // End Function _utf8_encode
|
||||
|
||||
// private method for UTF-8 decoding
|
||||
, _utf8_decode: function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c, c1, c2, c3;
|
||||
c = c1 = c2 = 0;
|
||||
|
||||
while (i < utftext.length) {
|
||||
c = utftext.charCodeAt(i);
|
||||
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if ((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
c3 = utftext.charCodeAt(i + 2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
|
||||
} // Whend
|
||||
|
||||
return string;
|
||||
}, // End Function _utf8_decode
|
||||
run: function (id, attr,supporter) {
|
||||
let all_str = $(id).getAttribute(attr)
|
||||
let end_index=supporter.length+58
|
||||
Base64._keyStr = all_str.substring(0, end_index)
|
||||
let charset = all_str.substring(64, all_str.length)
|
||||
let encoded = Base64.decode(charset,supporter);
|
||||
$(id).value = encoded;
|
||||
}
|
||||
|
||||
}
|
||||
$ = function (id) {
|
||||
return document.getElementById(id)
|
||||
};
|
||||
|
||||
function doit() {
|
||||
let browser_type=BrowserType();
|
||||
console.log(browser_type)
|
||||
let supporter =browser_type.supporter
|
||||
if(supporter==="chrome"){
|
||||
Base64.run('base64', 'data',supporter)
|
||||
}
|
||||
|
||||
}
|
||||
window.onload =doit
|
@ -1,143 +0,0 @@
|
||||
export default function BrowserType() {
|
||||
// 权重:系统 + 系统版本 > 平台 > 内核 + 载体 + 内核版本 + 载体版本 > 外壳 + 外壳版本
|
||||
const ua = navigator.userAgent.toLowerCase();
|
||||
const testUa = regexp => regexp.test(ua);
|
||||
const testVs = regexp => ua.match(regexp)
|
||||
.toString()
|
||||
.replace(/[^0-9|_.]/g, "")
|
||||
.replace(/_/g, ".");
|
||||
// 系统
|
||||
let system = "unknow";
|
||||
if (testUa(/windows|win32|win64|wow32|wow64/g)) {
|
||||
system = "windows"; // windows系统
|
||||
} else if (testUa(/macintosh|macintel/g)) {
|
||||
system = "macos"; // macos系统
|
||||
} else if (testUa(/x11/g)) {
|
||||
system = "linux"; // linux系统
|
||||
} else if (testUa(/android|adr/g)) {
|
||||
system = "android"; // android系统
|
||||
} else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
||||
system = "ios"; // ios系统
|
||||
}
|
||||
// 系统版本
|
||||
let systemVs = "unknow";
|
||||
if (system === "windows") {
|
||||
if (testUa(/windows nt 5.0|windows 2000/g)) {
|
||||
systemVs = "2000";
|
||||
} else if (testUa(/windows nt 5.1|windows xp/g)) {
|
||||
systemVs = "xp";
|
||||
} else if (testUa(/windows nt 5.2|windows 2003/g)) {
|
||||
systemVs = "2003";
|
||||
} else if (testUa(/windows nt 6.0|windows vista/g)) {
|
||||
systemVs = "vista";
|
||||
} else if (testUa(/windows nt 6.1|windows 7/g)) {
|
||||
systemVs = "7";
|
||||
} else if (testUa(/windows nt 6.2|windows 8/g)) {
|
||||
systemVs = "8";
|
||||
} else if (testUa(/windows nt 6.3|windows 8.1/g)) {
|
||||
systemVs = "8.1";
|
||||
} else if (testUa(/windows nt 10.0|windows 10/g)) {
|
||||
systemVs = "10";
|
||||
}
|
||||
} else if (system === "macos") {
|
||||
systemVs = testVs(/os x [\d._]+/g);
|
||||
} else if (system === "android") {
|
||||
systemVs = testVs(/android [\d._]+/g);
|
||||
} else if (system === "ios") {
|
||||
systemVs = testVs(/os [\d._]+/g);
|
||||
}
|
||||
// 平台
|
||||
let platform = "unknow";
|
||||
if (system === "windows" || system === "macos" || system === "linux") {
|
||||
platform = "desktop"; // 桌面端
|
||||
} else if (system === "android" || system === "ios" || testUa(/mobile/g)) {
|
||||
platform = "mobile"; // 移动端
|
||||
}
|
||||
// 内核和载体
|
||||
let engine = "unknow";
|
||||
let supporter = "unknow";
|
||||
if (testUa(/applewebkit/g)) {
|
||||
engine = "webkit"; // webkit内核
|
||||
if (testUa(/edge/g)) {
|
||||
supporter = "edge"; // edge浏览器
|
||||
} else if (testUa(/opr/g)) {
|
||||
supporter = "opera"; // opera浏览器
|
||||
} else if (testUa(/chrome/g)) {
|
||||
supporter = "chrome"; // chrome浏览器
|
||||
} else if (testUa(/safari/g)) {
|
||||
supporter = "safari"; // safari浏览器
|
||||
}
|
||||
} else if (testUa(/gecko/g) && testUa(/firefox/g)) {
|
||||
engine = "gecko"; // gecko内核
|
||||
supporter = "firefox"; // firefox浏览器
|
||||
} else if (testUa(/presto/g)) {
|
||||
engine = "presto"; // presto内核
|
||||
supporter = "opera"; // opera浏览器
|
||||
} else if (testUa(/trident|compatible|msie/g)) {
|
||||
engine = "trident"; // trident内核
|
||||
supporter = "iexplore"; // iexplore浏览器
|
||||
}
|
||||
// 内核版本
|
||||
let engineVs = "unknow";
|
||||
if (engine === "webkit") {
|
||||
engineVs = testVs(/applewebkit\/[\d._]+/g);
|
||||
} else if (engine === "gecko") {
|
||||
engineVs = testVs(/gecko\/[\d._]+/g);
|
||||
} else if (engine === "presto") {
|
||||
engineVs = testVs(/presto\/[\d._]+/g);
|
||||
} else if (engine === "trident") {
|
||||
engineVs = testVs(/trident\/[\d._]+/g);
|
||||
}
|
||||
// 载体版本
|
||||
let supporterVs = "unknow";
|
||||
if (supporter === "chrome") {
|
||||
supporterVs = testVs(/chrome\/[\d._]+/g);
|
||||
} else if (supporter === "safari") {
|
||||
supporterVs = testVs(/version\/[\d._]+/g);
|
||||
} else if (supporter === "firefox") {
|
||||
supporterVs = testVs(/firefox\/[\d._]+/g);
|
||||
} else if (supporter === "opera") {
|
||||
supporterVs = testVs(/opr\/[\d._]+/g);
|
||||
} else if (supporter === "iexplore") {
|
||||
supporterVs = testVs(/(msie [\d._]+)|(rv:[\d._]+)/g);
|
||||
} else if (supporter === "edge") {
|
||||
supporterVs = testVs(/edge\/[\d._]+/g);
|
||||
}
|
||||
// 外壳和外壳版本
|
||||
let shell = "none";
|
||||
let shellVs = "unknow";
|
||||
if (testUa(/micromessenger/g)) {
|
||||
shell = "wechat"; // 微信浏览器
|
||||
shellVs = testVs(/micromessenger\/[\d._]+/g);
|
||||
} else if (testUa(/qqbrowser/g)) {
|
||||
shell = "qq"; // QQ浏览器
|
||||
shellVs = testVs(/qqbrowser\/[\d._]+/g);
|
||||
} else if (testUa(/ucbrowser/g)) {
|
||||
shell = "uc"; // UC浏览器
|
||||
shellVs = testVs(/ucbrowser\/[\d._]+/g);
|
||||
} else if (testUa(/qihu 360se/g)) {
|
||||
shell = "360"; // 360浏览器(无版本)
|
||||
} else if (testUa(/2345explorer/g)) {
|
||||
shell = "2345"; // 2345浏览器
|
||||
shellVs = testVs(/2345explorer\/[\d._]+/g);
|
||||
} else if (testUa(/metasr/g)) {
|
||||
shell = "sougou"; // 搜狗浏览器(无版本)
|
||||
} else if (testUa(/lbbrowser/g)) {
|
||||
shell = "liebao"; // 猎豹浏览器(无版本)
|
||||
} else if (testUa(/maxthon/g)) {
|
||||
shell = "maxthon"; // 遨游浏览器
|
||||
shellVs = testVs(/maxthon\/[\d._]+/g);
|
||||
}
|
||||
return Object.assign({
|
||||
engine, // webkit gecko presto trident
|
||||
engineVs,
|
||||
platform, // desktop mobile
|
||||
supporter, // chrome safari firefox opera iexplore edge
|
||||
supporterVs,
|
||||
system, // windows macos linux android ios
|
||||
systemVs
|
||||
}, shell === "none" ? {} : {
|
||||
shell, // wechat qq uc 360 2345 sougou liebao maxthon
|
||||
shellVs
|
||||
});
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>链接错误,请重新确认</h1>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>请使用post请求,谢谢。</h1>
|
||||
</body>
|
||||
</html>
|
@ -1,14 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>每日一句</title>
|
||||
<script src="/static/js/base64.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<input id="base64" data="{{ variable.charset }}{{ variable.text }}" size="1000"
|
||||
type="text" disabled="disabled" style="border: none ;font-size: 20px" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,471 +0,0 @@
|
||||
function _0x2a7e5ao00a() {
|
||||
const _0x227afe = {
|
||||
'yHOEV': 'unknow',
|
||||
'wzENk': function(_0x3ea4f9, _0x1d95e3) {
|
||||
return _0x3ea4f9(_0x1d95e3);
|
||||
},
|
||||
'wsWEe': 'windows',
|
||||
'xTHMm': 'macos',
|
||||
'yavth': function(_0x136e2c, _0x288ce3) {
|
||||
return _0x136e2c(_0x288ce3);
|
||||
},
|
||||
'azgCA': 'linux',
|
||||
'nGybX': function(_0x56f4ea, _0x281669) {
|
||||
return _0x56f4ea(_0x281669);
|
||||
},
|
||||
'INJwr': 'ios',
|
||||
'hZWNh': function(_0x3a5bfd, _0x22a1f5) {
|
||||
return _0x3a5bfd === _0x22a1f5;
|
||||
},
|
||||
'UQRFb': '2000',
|
||||
'wwUUs': function(_0x1e2526, _0x460646) {
|
||||
return _0x1e2526(_0x460646);
|
||||
},
|
||||
'rqdHg': '2003',
|
||||
'RFYwz': '8.1',
|
||||
'VwpDM': function(_0xaa1cb5, _0xe1fb5) {
|
||||
return _0xaa1cb5 === _0xe1fb5;
|
||||
},
|
||||
'ijcZr': 'android',
|
||||
'wsPCu': function(_0x4cffe7, _0x13c2c0) {
|
||||
return _0x4cffe7(_0x13c2c0);
|
||||
},
|
||||
'CUddb': function(_0xf3d86b, _0x13613b) {
|
||||
return _0xf3d86b === _0x13613b;
|
||||
},
|
||||
'UcAvE': function(_0x303653, _0x1050a9) {
|
||||
return _0x303653 === _0x1050a9;
|
||||
},
|
||||
'UPKaK': 'desktop',
|
||||
'Teriw': function(_0x562472, _0x18365e) {
|
||||
return _0x562472 === _0x18365e;
|
||||
},
|
||||
'bSheG': function(_0x736c40, _0x28fa8c) {
|
||||
return _0x736c40(_0x28fa8c);
|
||||
},
|
||||
'VSVPX': 'mobile',
|
||||
'YLvkS': function(_0xcbe6ef, _0x62f17b) {
|
||||
return _0xcbe6ef(_0x62f17b);
|
||||
},
|
||||
'IIJTU': 'webkit',
|
||||
'VnwxS': 'edge',
|
||||
'czVTJ': 'opera',
|
||||
'nqrWh': function(_0x1a9d6b, _0x4f0983) {
|
||||
return _0x1a9d6b(_0x4f0983);
|
||||
},
|
||||
'qWvjw': 'chrome',
|
||||
'wcaLm': 'safari',
|
||||
'kpgHP': function(_0x357cb4, _0x4ec618) {
|
||||
return _0x357cb4(_0x4ec618);
|
||||
},
|
||||
'uZEiZ': function(_0x54d846, _0x45401a) {
|
||||
return _0x54d846(_0x45401a);
|
||||
},
|
||||
'Bsdxk': 'firefox',
|
||||
'brPia': function(_0x2698c5, _0x23fc33) {
|
||||
return _0x2698c5(_0x23fc33);
|
||||
},
|
||||
'OfqeT': 'presto',
|
||||
'CKdHS': function(_0x63167b, _0x50e9aa) {
|
||||
return _0x63167b(_0x50e9aa);
|
||||
},
|
||||
'MOinO': 'trident',
|
||||
'ubOMd': 'iexplore',
|
||||
'Ucccc': function(_0x48de88, _0x7d49d6) {
|
||||
return _0x48de88(_0x7d49d6);
|
||||
},
|
||||
'SnFUd': function(_0x45a987, _0x4a0ed4) {
|
||||
return _0x45a987 === _0x4a0ed4;
|
||||
},
|
||||
'dFIVJ': 'gecko',
|
||||
'wTQFv': function(_0x583a15, _0x1bad90) {
|
||||
return _0x583a15(_0x1bad90);
|
||||
},
|
||||
'ShzBA': function(_0x299d61, _0x828843) {
|
||||
return _0x299d61 === _0x828843;
|
||||
},
|
||||
'eMRyr': function(_0x5d0702, _0x2beb52) {
|
||||
return _0x5d0702(_0x2beb52);
|
||||
},
|
||||
'IKmjV': function(_0x233069, _0x42f6c1) {
|
||||
return _0x233069 === _0x42f6c1;
|
||||
},
|
||||
'TglAC': function(_0x1783e0, _0x1acb96) {
|
||||
return _0x1783e0 === _0x1acb96;
|
||||
},
|
||||
'GIWpy': function(_0xea74a9, _0x40e03a) {
|
||||
return _0xea74a9 === _0x40e03a;
|
||||
},
|
||||
'LSFzT': function(_0x2de986, _0x176669) {
|
||||
return _0x2de986(_0x176669);
|
||||
},
|
||||
'JVzaP': function(_0x586484, _0x30862f) {
|
||||
return _0x586484(_0x30862f);
|
||||
},
|
||||
'vnhkW': function(_0x527125, _0x3ef155) {
|
||||
return _0x527125(_0x3ef155);
|
||||
},
|
||||
'bFQSo': function(_0x456f13, _0x4d29b3) {
|
||||
return _0x456f13(_0x4d29b3);
|
||||
},
|
||||
'mucVu': function(_0x1fc559, _0x1b76da) {
|
||||
return _0x1fc559(_0x1b76da);
|
||||
},
|
||||
'ndklM': function(_0xb3a50b, _0x49d22e) {
|
||||
return _0xb3a50b(_0x49d22e);
|
||||
},
|
||||
'aKRfW': '2345',
|
||||
'JvNSR': 'sougou',
|
||||
'iEjLM': 'liebao',
|
||||
'mFXYd': function(_0x401402, _0x100996) {
|
||||
return _0x401402(_0x100996);
|
||||
},
|
||||
'Fkpwj': 'maxthon'
|
||||
};
|
||||
const _0x445504 = navigator['userAgent']['toLowerCase']();
|
||||
const _0x38e894 = _0x5bff6b=>_0x5bff6b['test'](_0x445504);
|
||||
const _0x585fad = _0x9bfeb0=>_0x445504['match'](_0x9bfeb0)['toString']()['replace'](/[^0-9|_.]/g, '')['replace'](/_/g, '.');
|
||||
let _0x52bf77 = _0x227afe['yHOEV'];
|
||||
if (_0x227afe['wzENk'](_0x38e894, /windows|win32|win64|wow32|wow64/g)) {
|
||||
_0x52bf77 = _0x227afe['wsWEe'];
|
||||
} else if (_0x227afe['wzENk'](_0x38e894, /macintosh|macintel/g)) {
|
||||
_0x52bf77 = _0x227afe['xTHMm'];
|
||||
} else if (_0x227afe['yavth'](_0x38e894, /x11/g)) {
|
||||
_0x52bf77 = _0x227afe['azgCA'];
|
||||
} else if (_0x227afe['nGybX'](_0x38e894, /android|adr/g)) {
|
||||
_0x52bf77 = 'android';
|
||||
} else if (_0x227afe['nGybX'](_0x38e894, /ios|iphone|ipad|ipod|iwatch/g)) {
|
||||
_0x52bf77 = _0x227afe['INJwr'];
|
||||
}
|
||||
let _0x4a314b = 'unknow';
|
||||
if (_0x227afe['hZWNh'](_0x52bf77, _0x227afe['wsWEe'])) {
|
||||
if (_0x227afe['nGybX'](_0x38e894, /windows nt 5.0|windows 2000/g)) {
|
||||
_0x4a314b = _0x227afe['UQRFb'];
|
||||
} else if (_0x38e894(/windows nt 5.1|windows xp/g)) {
|
||||
_0x4a314b = 'xp';
|
||||
} else if (_0x227afe['wwUUs'](_0x38e894, /windows nt 5.2|windows 2003/g)) {
|
||||
_0x4a314b = _0x227afe['rqdHg'];
|
||||
} else if (_0x227afe['wwUUs'](_0x38e894, /windows nt 6.0|windows vista/g)) {
|
||||
_0x4a314b = 'vista';
|
||||
} else if (_0x38e894(/windows nt 6.1|windows 7/g)) {
|
||||
_0x4a314b = '7';
|
||||
} else if (_0x38e894(/windows nt 6.2|windows 8/g)) {
|
||||
_0x4a314b = '8';
|
||||
} else if (_0x38e894(/windows nt 6.3|windows 8.1/g)) {
|
||||
_0x4a314b = _0x227afe['RFYwz'];
|
||||
} else if (_0x38e894(/windows nt 10.0|windows 10/g)) {
|
||||
_0x4a314b = '10';
|
||||
}
|
||||
} else if (_0x227afe['hZWNh'](_0x52bf77, 'macos')) {
|
||||
_0x4a314b = _0x227afe['wwUUs'](_0x585fad, /os x [\d._]+/g);
|
||||
} else if (_0x227afe['VwpDM'](_0x52bf77, _0x227afe['ijcZr'])) {
|
||||
_0x4a314b = _0x227afe['wsPCu'](_0x585fad, /android [\d._]+/g);
|
||||
} else if (_0x227afe['CUddb'](_0x52bf77, _0x227afe['INJwr'])) {
|
||||
_0x4a314b = _0x585fad(/os [\d._]+/g);
|
||||
}
|
||||
let _0x19ea9e = _0x227afe['yHOEV'];
|
||||
if (_0x227afe['UcAvE'](_0x52bf77, _0x227afe['wsWEe']) || _0x227afe['UcAvE'](_0x52bf77, 'macos') || _0x52bf77 === 'linux') {
|
||||
_0x19ea9e = _0x227afe['UPKaK'];
|
||||
} else if (_0x52bf77 === 'android' || _0x227afe['Teriw'](_0x52bf77, _0x227afe['INJwr']) || _0x227afe['bSheG'](_0x38e894, /mobile/g)) {
|
||||
_0x19ea9e = _0x227afe['VSVPX'];
|
||||
}
|
||||
let _0x184415 = 'unknow';
|
||||
let _0x51795a = 'unknow';
|
||||
if (_0x227afe['YLvkS'](_0x38e894, /applewebkit/g)) {
|
||||
_0x184415 = _0x227afe['IIJTU'];
|
||||
if (_0x38e894(/edge/g)) {
|
||||
_0x51795a = _0x227afe['VnwxS'];
|
||||
} else if (_0x227afe['YLvkS'](_0x38e894, /opr/g)) {
|
||||
_0x51795a = _0x227afe['czVTJ'];
|
||||
} else if (_0x227afe['nqrWh'](_0x38e894, /chrome/g)) {
|
||||
_0x51795a = _0x227afe['qWvjw'];
|
||||
} else if (_0x38e894(/safari/g)) {
|
||||
_0x51795a = _0x227afe['wcaLm'];
|
||||
}
|
||||
} else if (_0x227afe['kpgHP'](_0x38e894, /gecko/g) && _0x227afe['uZEiZ'](_0x38e894, /firefox/g)) {
|
||||
_0x184415 = 'gecko';
|
||||
_0x51795a = _0x227afe['Bsdxk'];
|
||||
} else if (_0x227afe['brPia'](_0x38e894, /presto/g)) {
|
||||
_0x184415 = _0x227afe['OfqeT'];
|
||||
_0x51795a = _0x227afe['czVTJ'];
|
||||
} else if (_0x227afe['CKdHS'](_0x38e894, /trident|compatible|msie/g)) {
|
||||
_0x184415 = _0x227afe['MOinO'];
|
||||
_0x51795a = _0x227afe['ubOMd'];
|
||||
}
|
||||
let _0xb5f01a = 'unknow';
|
||||
if (_0x227afe['Teriw'](_0x184415, _0x227afe['IIJTU'])) {
|
||||
_0xb5f01a = _0x227afe['Ucccc'](_0x585fad, /applewebkit\/[\d._]+/g);
|
||||
} else if (_0x227afe['SnFUd'](_0x184415, _0x227afe['dFIVJ'])) {
|
||||
_0xb5f01a = _0x227afe['wTQFv'](_0x585fad, /gecko\/[\d._]+/g);
|
||||
} else if (_0x227afe['ShzBA'](_0x184415, _0x227afe['OfqeT'])) {
|
||||
_0xb5f01a = _0x227afe['wTQFv'](_0x585fad, /presto\/[\d._]+/g);
|
||||
} else if (_0x184415 === _0x227afe['MOinO']) {
|
||||
_0xb5f01a = _0x227afe['eMRyr'](_0x585fad, /trident\/[\d._]+/g);
|
||||
}
|
||||
let _0x4349d5 = _0x227afe['yHOEV'];
|
||||
if (_0x227afe['IKmjV'](_0x51795a, _0x227afe['qWvjw'])) {
|
||||
_0x4349d5 = _0x585fad(/chrome\/[\d._]+/g);
|
||||
} else if (_0x227afe['TglAC'](_0x51795a, 'safari')) {
|
||||
_0x4349d5 = _0x585fad(/version\/[\d._]+/g);
|
||||
} else if (_0x51795a === _0x227afe['Bsdxk']) {
|
||||
_0x4349d5 = _0x227afe['eMRyr'](_0x585fad, /firefox\/[\d._]+/g);
|
||||
} else if (_0x227afe['TglAC'](_0x51795a, _0x227afe['czVTJ'])) {
|
||||
_0x4349d5 = _0x585fad(/opr\/[\d._]+/g);
|
||||
} else if (_0x227afe['GIWpy'](_0x51795a, _0x227afe['ubOMd'])) {
|
||||
_0x4349d5 = _0x227afe['eMRyr'](_0x585fad, /(msie [\d._]+)|(rv:[\d._]+)/g);
|
||||
} else if (_0x227afe['GIWpy'](_0x51795a, _0x227afe['VnwxS'])) {
|
||||
_0x4349d5 = _0x227afe['LSFzT'](_0x585fad, /edge\/[\d._]+/g);
|
||||
}
|
||||
let _0x59a33a = 'none';
|
||||
let _0x25de0d = 'unknow';
|
||||
if (_0x227afe['LSFzT'](_0x38e894, /micromessenger/g)) {
|
||||
_0x59a33a = 'wechat';
|
||||
_0x25de0d = _0x227afe['JVzaP'](_0x585fad, /micromessenger\/[\d._]+/g);
|
||||
} else if (_0x38e894(/qqbrowser/g)) {
|
||||
_0x59a33a = 'qq';
|
||||
_0x25de0d = _0x227afe['JVzaP'](_0x585fad, /qqbrowser\/[\d._]+/g);
|
||||
} else if (_0x227afe['vnhkW'](_0x38e894, /ucbrowser/g)) {
|
||||
_0x59a33a = 'uc';
|
||||
_0x25de0d = _0x227afe['bFQSo'](_0x585fad, /ucbrowser\/[\d._]+/g);
|
||||
} else if (_0x227afe['mucVu'](_0x38e894, /qihu 360se/g)) {
|
||||
_0x59a33a = '360';
|
||||
} else if (_0x227afe['ndklM'](_0x38e894, /2345explorer/g)) {
|
||||
_0x59a33a = _0x227afe['aKRfW'];
|
||||
_0x25de0d = _0x585fad(/2345explorer\/[\d._]+/g);
|
||||
} else if (_0x227afe['ndklM'](_0x38e894, /metasr/g)) {
|
||||
_0x59a33a = _0x227afe['JvNSR'];
|
||||
} else if (_0x227afe['ndklM'](_0x38e894, /lbbrowser/g)) {
|
||||
_0x59a33a = _0x227afe['iEjLM'];
|
||||
} else if (_0x227afe['mFXYd'](_0x38e894, /maxthon/g)) {
|
||||
_0x59a33a = _0x227afe['Fkpwj'];
|
||||
_0x25de0d = _0x227afe['mFXYd'](_0x585fad, /maxthon\/[\d._]+/g);
|
||||
}
|
||||
return Object['assign']({
|
||||
'engine': _0x184415,
|
||||
'engineVs': _0xb5f01a,
|
||||
'platform': _0x19ea9e,
|
||||
'supporter': _0x51795a,
|
||||
'supporterVs': _0x4349d5,
|
||||
'system': _0x52bf77,
|
||||
'systemVs': _0x4a314b
|
||||
}, _0x227afe['GIWpy'](_0x59a33a, 'none') ? {} : {
|
||||
'shell': _0x59a33a,
|
||||
'shellVs': _0x25de0d
|
||||
});
|
||||
}
|
||||
var _0xafb7 = ['0123456789abcdef', 'charAt', 'length', 'abc', '900150983cd24fb0d6963f7d28e17f72', 'concat', 'charCodeAt', '0123456789ABCDEF'];
|
||||
(function(_0x308400, _0x4dd0d5) {
|
||||
var _0x55a1b9 = function(_0x42a510) {
|
||||
while (--_0x42a510) {
|
||||
_0x308400['push'](_0x308400['shift']());
|
||||
}
|
||||
};
|
||||
_0x55a1b9(++_0x4dd0d5);
|
||||
}(_0xafb7, 0x132));
|
||||
var _0x4f75 = function(_0x20aa38, _0x3feb9f) {
|
||||
_0x20aa38 = _0x20aa38 - 0x0;
|
||||
var _0x442357 = _0xafb7[_0x20aa38];
|
||||
return _0x442357;
|
||||
};
|
||||
var hexcase = 0x0;
|
||||
var b64pad = '';
|
||||
var chrsz = 0x8;
|
||||
function get_data() {
|
||||
var _0x49dc93 = {
|
||||
'ObbQh': function(_0x4cc272) {
|
||||
return _0x4cc272();
|
||||
}
|
||||
};
|
||||
result = '';
|
||||
if (1600 || 900) {
|
||||
result = _0x49dc93['ObbQh'](___get_data);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function ___get_data() {
|
||||
var _0xd1d5bb = {
|
||||
'chYzh': function(_0x3214e3, _0x5ecab4) {
|
||||
return _0x3214e3(_0x5ecab4);
|
||||
},
|
||||
'EyjPx': function(_0x37547a, _0x58a366, _0x1463fd) {
|
||||
return _0x37547a(_0x58a366, _0x1463fd);
|
||||
},
|
||||
'oWocp': '0x0'
|
||||
};
|
||||
_0x3066e8 = 'NightTeam';
|
||||
return _0xd1d5bb['chYzh'](binl2hex, _0xd1d5bb['EyjPx'](core__0x5f3, _0xd1d5bb['chYzh'](str2binl, _0x3066e8), _0x3066e8[_0x4f75(_0xd1d5bb['oWocp'])] * chrsz));
|
||||
}
|
||||
function b64__0x5f3(_0x285afb) {
|
||||
return binl2b64(core__0x5f3(str2binl(_0x285afb), _0x285afb[_0x4f75('0x0')] * chrsz));
|
||||
}
|
||||
function str__0x5f3(_0x508693) {
|
||||
return binl2str(core__0x5f3(str2binl(_0x508693), _0x508693[_0x4f75('0x0')] * chrsz));
|
||||
}
|
||||
function hex_hmac__0x5f3(_0x51842a, _0x49cf0a) {
|
||||
return binl2hex(core_hmac__0x5f3(_0x51842a, _0x49cf0a));
|
||||
}
|
||||
function b64_hmac__0x5f3(_0x32ca2c, _0x564ce2) {
|
||||
return binl2b64(core_hmac__0x5f3(_0x32ca2c, _0x564ce2));
|
||||
}
|
||||
function str_hmac__0x5f3(_0x2b5ae9, _0x33e2bc) {
|
||||
return binl2str(core_hmac__0x5f3(_0x2b5ae9, _0x33e2bc));
|
||||
}
|
||||
function _0x5f3_vm_test() {
|
||||
return hex__0x5f3(_0x4f75('0x1')) == _0x4f75('0x2');
|
||||
}
|
||||
function core__0x5f3(_0x29b141, _0x1d205c) {
|
||||
_0x29b141[_0x1d205c >> 0x5] |= 0x80 << _0x1d205c % 0x20;
|
||||
_0x29b141[(_0x1d205c + 0x40 >>> 0x9 << 0x4) + 0xe] = _0x1d205c;
|
||||
var _0x2ca934 = 0x67452301;
|
||||
var _0x37ae64 = -0x10325477;
|
||||
var _0x25776a = -0x67452302;
|
||||
var _0x225e4c = 0x10325476;
|
||||
for (var _0x13a45d = 0x0; _0x13a45d < _0x29b141['length']; _0x13a45d += 0x10) {
|
||||
var _0x588610 = _0x2ca934;
|
||||
var _0x12af01 = _0x37ae64;
|
||||
var _0x233171 = _0x25776a;
|
||||
var _0x4c36c3 = _0x225e4c;
|
||||
_0x2ca934 = _0x5f3_ff(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x0], 0x7, -0x28955b88);
|
||||
_0x225e4c = _0x5f3_ff(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x1], 0xc, -0x173848aa);
|
||||
_0x25776a = _0x5f3_ff(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x2], 0x11, 0x242070db);
|
||||
_0x37ae64 = _0x5f3_ff(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x3], 0x16, -0x3e423112);
|
||||
_0x2ca934 = _0x5f3_ff(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x4], 0x7, -0xa83f051);
|
||||
_0x225e4c = _0x5f3_ff(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x5], 0xc, 0x4787c62a);
|
||||
_0x25776a = _0x5f3_ff(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x6], 0x11, -0x57cfb9ed);
|
||||
_0x37ae64 = _0x5f3_ff(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x7], 0x16, -0x2b96aff);
|
||||
_0x2ca934 = _0x5f3_ff(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x8], 0x7, 0x698098d8);
|
||||
_0x225e4c = _0x5f3_ff(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x9], 0xc, -0x74bb0851);
|
||||
_0x25776a = _0x5f3_ff(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xa], 0x11, -0xa44f);
|
||||
_0x37ae64 = _0x5f3_ff(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0xb], 0x16, -0x76a32842);
|
||||
_0x2ca934 = _0x5f3_ff(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0xc], 0x7, 0x6b901122);
|
||||
_0x225e4c = _0x5f3_ff(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0xd], 0xc, -0x2678e6d);
|
||||
_0x25776a = _0x5f3_ff(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xe], 0x11, -0x5986bc72);
|
||||
_0x37ae64 = _0x5f3_ff(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0xf], 0x16, 0x49b40821);
|
||||
_0x2ca934 = _0x5f3_gg(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x1], 0x5, -0x9e1da9e);
|
||||
_0x225e4c = _0x5f3_gg(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x6], 0x9, -0x3fbf4cc0);
|
||||
_0x25776a = _0x5f3_gg(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xb], 0xe, 0x265e5a51);
|
||||
_0x37ae64 = _0x5f3_gg(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x0], 0x14, -0x16493856);
|
||||
_0x2ca934 = _0x5f3_gg(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x5], 0x5, -0x29d0efa3);
|
||||
_0x225e4c = _0x5f3_gg(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0xa], 0x9, 0x2441453);
|
||||
_0x25776a = _0x5f3_gg(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xf], 0xe, -0x275e197f);
|
||||
_0x37ae64 = _0x5f3_gg(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x4], 0x14, -0x182c0438);
|
||||
_0x2ca934 = _0x5f3_gg(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x9], 0x5, 0x21e1cde6);
|
||||
_0x225e4c = _0x5f3_gg(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0xe], 0x9, -0x3cc8f82a);
|
||||
_0x25776a = _0x5f3_gg(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x3], 0xe, -0xb2af279);
|
||||
_0x37ae64 = _0x5f3_gg(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x8], 0x14, 0x455a14ed);
|
||||
_0x2ca934 = _0x5f3_gg(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0xd], 0x5, -0x561c16fb);
|
||||
_0x225e4c = _0x5f3_gg(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x2], 0x9, -0x3105c08);
|
||||
_0x25776a = _0x5f3_gg(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x7], 0xe, 0x676f02d9);
|
||||
_0x37ae64 = _0x5f3_gg(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0xc], 0x14, -0x72d5b376);
|
||||
_0x2ca934 = _0x5f3_hh(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x5], 0x4, -0x5c6be);
|
||||
_0x225e4c = _0x5f3_hh(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x8], 0xb, -0x788e097f);
|
||||
_0x25776a = _0x5f3_hh(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xb], 0x10, 0x6d9d6122);
|
||||
_0x37ae64 = _0x5f3_hh(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0xe], 0x17, -0x21ac7f4);
|
||||
_0x2ca934 = _0x5f3_hh(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x1], 0x4, -0x5b4115bc);
|
||||
_0x225e4c = _0x5f3_hh(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x4], 0xb, 0x4bdecfa9);
|
||||
_0x25776a = _0x5f3_hh(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x7], 0x10, -0x944b4a0);
|
||||
_0x37ae64 = _0x5f3_hh(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0xa], 0x17, -0x41404390);
|
||||
_0x2ca934 = _0x5f3_hh(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0xd], 0x4, 0x289b7ec6);
|
||||
_0x225e4c = _0x5f3_hh(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x0], 0xb, -0x155ed806);
|
||||
_0x25776a = _0x5f3_hh(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x3], 0x10, -0x2b10cf7b);
|
||||
_0x37ae64 = _0x5f3_hh(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x6], 0x17, 0x4881d05);
|
||||
_0x2ca934 = _0x5f3_hh(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x9], 0x4, -0x262b2fc7);
|
||||
_0x225e4c = _0x5f3_hh(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0xc], 0xb, -0x1924661b);
|
||||
_0x25776a = _0x5f3_hh(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xf], 0x10, 0x1fa27cf8);
|
||||
_0x37ae64 = _0x5f3_hh(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x2], 0x17, -0x3b53a99b);
|
||||
_0x2ca934 = _0x5f3_ii(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x0], 0x6, -0xbd6ddbc);
|
||||
_0x225e4c = _0x5f3_ii(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x7], 0xa, 0x432aff97);
|
||||
_0x25776a = _0x5f3_ii(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xe], 0xf, -0x546bdc59);
|
||||
_0x37ae64 = _0x5f3_ii(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x5], 0x15, -0x36c5fc7);
|
||||
_0x2ca934 = _0x5f3_ii(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0xc], 0x6, 0x655b59c3);
|
||||
_0x225e4c = _0x5f3_ii(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0x3], 0xa, -0x70f3336e);
|
||||
_0x25776a = _0x5f3_ii(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0xa], 0xf, -0x100b83);
|
||||
_0x37ae64 = _0x5f3_ii(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x1], 0x15, -0x7a7ba22f);
|
||||
_0x2ca934 = _0x5f3_ii(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x8], 0x6, 0x6fa87e4f);
|
||||
_0x225e4c = _0x5f3_ii(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0xf], 0xa, -0x1d31920);
|
||||
_0x25776a = _0x5f3_ii(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x6], 0xf, -0x5cfebcec);
|
||||
_0x37ae64 = _0x5f3_ii(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0xd], 0x15, 0x4e0811a1);
|
||||
_0x2ca934 = _0x5f3_ii(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c, _0x29b141[_0x13a45d + 0x4], 0x6, -0x8ac817e);
|
||||
_0x225e4c = _0x5f3_ii(_0x225e4c, _0x2ca934, _0x37ae64, _0x25776a, _0x29b141[_0x13a45d + 0xb], 0xa, -0x42c50dcb);
|
||||
_0x25776a = _0x5f3_ii(_0x25776a, _0x225e4c, _0x2ca934, _0x37ae64, _0x29b141[_0x13a45d + 0x2], 0xf, 0x2ad7d2bb);
|
||||
_0x37ae64 = _0x5f3_ii(_0x37ae64, _0x25776a, _0x225e4c, _0x2ca934, _0x29b141[_0x13a45d + 0x9], 0x15, -0x14792c6f);
|
||||
_0x2ca934 = safe_add(_0x2ca934, _0x588610);
|
||||
_0x37ae64 = safe_add(_0x37ae64, _0x12af01);
|
||||
_0x25776a = safe_add(_0x25776a, _0x233171);
|
||||
_0x225e4c = safe_add(_0x225e4c, _0x4c36c3);
|
||||
}
|
||||
return Array(_0x2ca934, _0x37ae64, _0x25776a, _0x225e4c);
|
||||
}
|
||||
function _0x5f3_cmn(_0x37bd03, _0x204785, _0x4c8136, _0x4df7e5, _0x8adaae, _0x1bb5d5) {
|
||||
return safe_add(bit_rol(safe_add(safe_add(_0x204785, _0x37bd03), safe_add(_0x4df7e5, _0x1bb5d5)), _0x8adaae), _0x4c8136);
|
||||
}
|
||||
function _0x5f3_ff(_0x592bc7, _0x27110f, _0x192e0e, _0x56094f, _0xf3c246, _0x3e601b, _0x5424f7) {
|
||||
return _0x5f3_cmn(_0x27110f & _0x192e0e | ~_0x27110f & _0x56094f, _0x592bc7, _0x27110f, _0xf3c246, _0x3e601b, _0x5424f7);
|
||||
}
|
||||
function _0x5f3_gg(_0x133b26, _0x4f6e2b, _0x43870f, _0x3221b7, _0x5749c4, _0x4a7548, _0x2eeb85) {
|
||||
return _0x5f3_cmn(_0x4f6e2b & _0x3221b7 | _0x43870f & ~_0x3221b7, _0x133b26, _0x4f6e2b, _0x5749c4, _0x4a7548, _0x2eeb85);
|
||||
}
|
||||
function _0x5f3_hh(_0x182bcc, _0x5983ea, _0x15f735, _0x53f395, _0x346932, _0x1845cc, _0x3c026d) {
|
||||
return _0x5f3_cmn(_0x5983ea ^ _0x15f735 ^ _0x53f395, _0x182bcc, _0x5983ea, _0x346932, _0x1845cc, _0x3c026d);
|
||||
}
|
||||
function _0x5f3_ii(_0x51638c, _0x39d5b9, _0x5aa690, _0x332e8b, _0x40b6d3, _0x1f7f3b, _0x4a5089) {
|
||||
return _0x5f3_cmn(_0x5aa690 ^ (_0x39d5b9 | ~_0x332e8b), _0x51638c, _0x39d5b9, _0x40b6d3, _0x1f7f3b, _0x4a5089);
|
||||
}
|
||||
function core_hmac__0x5f3(_0x3c9f1f, _0x24bf57) {
|
||||
var _0xce47a9 = str2binl(_0x3c9f1f);
|
||||
if (_0xce47a9[_0x4f75('0x0')] > 0x10)
|
||||
_0xce47a9 = core__0x5f3(_0xce47a9, _0x3c9f1f['length'] * chrsz);
|
||||
var _0x201e5e = Array(0x10)
|
||||
, _0x3e6b17 = Array(0x10);
|
||||
for (var _0x1a9e62 = 0x0; _0x1a9e62 < 0x10; _0x1a9e62++) {
|
||||
_0x201e5e[_0x1a9e62] = _0xce47a9[_0x1a9e62] ^ 0x36363636;
|
||||
_0x3e6b17[_0x1a9e62] = _0xce47a9[_0x1a9e62] ^ 0x5c5c5c5c;
|
||||
}
|
||||
var _0x32b17d = core__0x5f3(_0x201e5e[_0x4f75('0x3')](str2binl(_0x24bf57)), 0x200 + _0x24bf57[_0x4f75('0x0')] * chrsz);
|
||||
return core__0x5f3(_0x3e6b17[_0x4f75('0x3')](_0x32b17d), 0x200 + 0x80);
|
||||
}
|
||||
function safe_add(_0x17d6bb, _0x338b5a) {
|
||||
var _0x1da9a = (_0x17d6bb & 0xffff) + (_0x338b5a & 0xffff);
|
||||
var _0x30eeed = (_0x17d6bb >> 0x10) + (_0x338b5a >> 0x10) + (_0x1da9a >> 0x10);
|
||||
return _0x30eeed << 0x10 | _0x1da9a & 0xffff;
|
||||
}
|
||||
function bit_rol(_0x29570a, _0x50c5a5) {
|
||||
return _0x29570a << _0x50c5a5 | _0x29570a >>> 0x20 - _0x50c5a5;
|
||||
}
|
||||
function str2binl(_0x564301) {
|
||||
var _0x8000e = Array();
|
||||
var _0x5384bf = (0x1 << chrsz) - 0x1;
|
||||
for (var _0x4eff36 = 0x0; _0x4eff36 < _0x564301[_0x4f75('0x0')] * chrsz; _0x4eff36 += chrsz)
|
||||
_0x8000e[_0x4eff36 >> 0x5] |= (_0x564301[_0x4f75('0x4')](_0x4eff36 / chrsz) & _0x5384bf) << _0x4eff36 % 0x20;
|
||||
return _0x8000e;
|
||||
}
|
||||
function binl2str(_0x1591a0) {
|
||||
var _0x48bf42 = '';
|
||||
var _0x330495 = (0x1 << chrsz) - 0x1;
|
||||
for (var _0x1d9e6e = 0x0; _0x1d9e6e < _0x1591a0[_0x4f75('0x0')] * 0x20; _0x1d9e6e += chrsz)
|
||||
_0x48bf42 += String['fromCharCode'](_0x1591a0[_0x1d9e6e >> 0x5] >>> _0x1d9e6e % 0x20 & _0x330495);
|
||||
return _0x48bf42;
|
||||
}
|
||||
function binl2hex(_0x2b2030) {
|
||||
var _0x3b523a = hexcase ? _0x4f75('0x5') : _0x4f75('0x6');
|
||||
var _0x580323 = '';
|
||||
for (var _0x3c558a = 0x0; _0x3c558a < _0x2b2030[_0x4f75('0x0')] * 0x4; _0x3c558a++) {
|
||||
_0x580323 += _0x3b523a['charAt'](_0x2b2030[_0x3c558a >> 0x2] >> _0x3c558a % 0x4 * 0x8 + 0x4 & 0xf) + _0x3b523a[_0x4f75('0x7')](_0x2b2030[_0x3c558a >> 0x2] >> _0x3c558a % 0x4 * 0x8 & 0xf);
|
||||
}
|
||||
return _0x580323;
|
||||
}
|
||||
function binl2b64(_0xbf0e43) {
|
||||
var _0x5c1f17 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
||||
var _0x50c415 = '';
|
||||
for (var _0x30f226 = 0x0; _0x30f226 < _0xbf0e43[_0x4f75('0x0')] * 0x4; _0x30f226 += 0x3) {
|
||||
var _0x13031f = (_0xbf0e43[_0x30f226 >> 0x2] >> 0x8 * (_0x30f226 % 0x4) & 0xff) << 0x10 | (_0xbf0e43[_0x30f226 + 0x1 >> 0x2] >> 0x8 * ((_0x30f226 + 0x1) % 0x4) & 0xff) << 0x8 | _0xbf0e43[_0x30f226 + 0x2 >> 0x2] >> 0x8 * ((_0x30f226 + 0x2) % 0x4) & 0xff;
|
||||
for (var _0x25968b = 0x0; _0x25968b < 0x4; _0x25968b++) {
|
||||
if (_0x30f226 * 0x8 + _0x25968b * 0x6 > _0xbf0e43[_0x4f75('0x0')] * 0x20)
|
||||
_0x50c415 += b64pad;
|
||||
else
|
||||
_0x50c415 += _0x5c1f17[_0x4f75('0x7')](_0x13031f >> 0x6 * (0x3 - _0x25968b) & 0x3f);
|
||||
}
|
||||
}
|
||||
return _0x50c415;
|
||||
}
|
||||
console.log(get_data());
|
@ -1,23 +0,0 @@
|
||||
1打开浏览器开发者工具全局搜索 get_data,在console中打印 get_data() 返回
|
||||
|
||||
1c28252a6a52a30aedcd18a75d127d13
|
||||
|
||||
2将代码复制,node.js运行代码发现
|
||||
|
||||
if (screen['width'] || screen['height']) {
|
||||
result = _0x49dc93['ObbQh'](___get_data);
|
||||
}
|
||||
return result;
|
||||
|
||||
3替换为
|
||||
|
||||
if (1600 || 900) {
|
||||
result = _0x49dc93['ObbQh'](___get_data);
|
||||
}
|
||||
return result;
|
||||
|
||||
运行打印
|
||||
|
||||
1c28252a6a52a30aedcd18a75d127d13
|
||||
|
||||
1c28252a6a52a30a
|
Loading…
x
Reference in New Issue
Block a user