[JavaScript] 纯文本查看 复制代码
function o(t) {
return function(t) {
if (Array.isArray(t))
return i(t)
}(t) || function(t) {
if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"])
return Array.from(t)
}(t) || function(t, r) {
if (!t)
return;
if ("string" == typeof t)
return i(t, r);
var e = Object.prototype.toString.call(t).slice(8, -1);
"Object" === e && t.constructor && (e = t.constructor.name);
if ("Map" === e || "Set" === e)
return Array.from(t);
if ("Arguments" === e || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
return i(t, r)
}(t) || function() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}()
}
var jzq;
!function(t) {
var r = {};
function e(n) {
if (r[n])
return r[n].exports;
var o = r[n] = {
i: n,
l: !1,
exports: {}
};
console.log("在加载--->",n);
return t[n].call(o.exports, o, o.exports, e),
o.l = !0,
o.exports
}
jzq=e;
e.m = t,
e.c = r,
e.d = function(t, r, n) {
e.o(t, r) || Object.defineProperty(t, r, {
enumerable: !0,
get: n
})
}
,
e.r = function(t) {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(t, "__esModule", {
value: !0
})
}
,
e.t = function(t, r) {
if (1 & r && (t = e(t)),
8 & r)
return t;
if (4 & r && "object" == typeof t && t && t.__esModule)
return t;
var n = Object.create(null);
if (e.r(n),
Object.defineProperty(n, "default", {
enumerable: !0,
value: t
}),
2 & r && "string" != typeof t)
for (var o in t)
e.d(n, o, function(r) {
return t[r]
}
.bind(null, o));
return n
}
,
e.n = function(t) {
var r = t && t.__esModule ? function() {
return t.default
}
: function() {
return t
}
;
return e.d(r, "a", r),
r
}
,
e.o = function(t, r) {
return Object.prototype.hasOwnProperty.call(t, r)
}
,
e.p = ""
//e(e.s = 850)
}({849:function(t, r, e) {
"use strict";
function n(t, r) {
var e = "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"];
if (!e) {
if (Array.isArray(t) || (e = function(t, r) {
if (!t)
return;
if ("string" == typeof t)
return o(t, r);
var e = Object.prototype.toString.call(t).slice(8, -1);
"Object" === e && t.constructor && (e = t.constructor.name);
if ("Map" === e || "Set" === e)
return Array.from(t);
if ("Arguments" === e || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
return o(t, r)
}(t)) || r && t && "number" == typeof t.length) {
e && (t = e);
var n = 0
, i = function() {};
return {
s: i,
n: function() {
return n >= t.length ? {
done: !0
} : {
done: !1,
value: t[n++]
}
},
e: function(t) {
throw t
},
f: i
}
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}
var a, u = !0, c = !1;
return {
s: function() {
e = e.call(t)
},
n: function() {
var t = e.next();
return u = t.done,
t
},
e: function(t) {
c = !0,
a = t
},
f: function() {
try {
u || null == e.return || e.return()
} finally {
if (c)
throw a
}
}
}
}
function o(t, r) {
(null == r || r > t.length) && (r = t.length);
for (var e = 0, n = new Array(r); e < r; e++)
n[e] = t[e];
return n
}
var i = function(t) {
return new TextEncoder("utf-8").encode(t)
}
, a = function() {
for (var t = arguments.length, r = new Array(t), e = 0; e < t; e++)
r[e] = arguments[e];
var o = r.reduce((function(t, r) {
return t + r.length
}
), 0)
, i = 0;
return r.reduce((function(t, r) {
var e, o = n(r);
try {
for (o.s(); !(e = o.n()).done; ) {
var a = e.value;
t[i++] = a
}
} catch (t) {
o.e(t)
} finally {
o.f()
}
return t
}
), new Uint8Array(o))
}
, u = function(t, r) {
return t * r
}
, c = function(t, r) {
return t + r
}
, s = function(t, r) {
var e = function(t, r) {
return t % r
}(t, r);
return function(t) {
return t < BigInt(0)
}(e) && (e = c(e, r)),
e
}
, f = function(t, r, e) {
return function(t, r, e) {
if (e === BigInt(1))
return BigInt(0);
var n = BigInt(1);
for (t %= e; r > BigInt(0); )
r % BigInt(2) === BigInt(1) && (n = n * t % e),
r >>= BigInt(1),
t = t * t % e;
return n
}(t, r, e)
}
, h = e(176)
, l = e.n(h);
function p(t) {
return function(t) {
if (Array.isArray(t))
return v(t)
}(t) || function(t) {
if ("undefined" != typeof Symbol && null != t[Symbol.iterator] || null != t["@@iterator"])
return Array.from(t)
}(t) || function(t, r) {
if (!t)
return;
if ("string" == typeof t)
return v(t, r);
var e = Object.prototype.toString.call(t).slice(8, -1);
"Object" === e && t.constructor && (e = t.constructor.name);
if ("Map" === e || "Set" === e)
return Array.from(t);
if ("Arguments" === e || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))
return v(t, r)
}(t) || function() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
}()
}
function v(t, r) {
(null == r || r > t.length) && (r = t.length);
for (var e = 0, n = new Array(r); e < r; e++)
n[e] = t[e];
return n
}
function d(t, r, e, n, o, i, a) {
try {
var u = t[i](a)
, c = u.value
} catch (t) {
return void e(t)
}
u.done ? r(c) : Promise.resolve(c).then(n, o)
}
function g(t, r) {
for (var e = 0; e < r.length; e++) {
var n = r[e];
n.enumerable = n.enumerable || !1,
n.configurable = !0,
"value"in n && (n.writable = !0),
Object.defineProperty(t, n.key, n)
}
}
function y(t, r, e) {
return r in t ? Object.defineProperty(t, r, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[r] = e,
t
}
var m = function() {
function t(r) {
!function(t, r) {
if (!(t instanceof r))
throw new TypeError("Cannot call a class as a function")
}(this, t),
y(this, "_bi", void 0),
y(this, "_buffer", void 0),
y(this, "_hex", void 0),
y(this, "_hash", void 0),
y(this, "_base64", void 0),
"string" == typeof r ? this._hex = r : r instanceof ArrayBuffer ? this._buffer = new Uint8Array(r) : r instanceof Uint8Array ? this._buffer = r : this._bi = r
}
var r, e, n, o, i;
return r = t,
e = [{
key: "bi",
get: function() {
var t;
return void 0 === this._bi && (this._bi = (t = "0x" + this.hex,
BigInt(t))),
this._bi
}
}, {
key: "buffer",
get: function() {
return void 0 === this._buffer && (this._buffer = function(t) {
t.length % 2 == 1 && (t = "0" + t);
var r, e, n, o = t.length / 2, i = new Uint8Array(o);
for (r = 0; r < o; r++) {
if (e = t.substr(2 * r, 2),
n = parseInt(e, 16),
isNaN(n))
throw new Error("String contains non hexadecimal value: '".concat(t, "'"));
i[r] = n
}
return i
}(this.hex)),
this._buffer
}
}, {
key: "hex",
get: function() {
if (void 0 === this._hex)
if (void 0 !== this._bi) {
var t = this._bi.toString(16);
t.length % 2 != 0 && (t = "0" + t),
this._hex = t
} else
this._hex = this._buffer.reduce((function(t, r) {
return t + r.toString(16).padStart(2, "0")
}
), "");
return this._hex
}
}, {
key: "getHash",
value: (o = regeneratorRuntime.mark((function r() {
return regeneratorRuntime.wrap((function(r) {
for (; ; )
switch (r.prev = r.next) {
case 0:
if (this._hash) {
r.next = 6;
break
}
return r.t0 = t,
r.next = 4,
l.a.crypto.subtle.digest("SHA-256", this.buffer);
case 4:
r.t1 = r.sent,
this._hash = new r.t0(r.t1);
case 6:
return r.abrupt("return", this._hash);
case 7:
case "end":
return r.stop()
}
}
), r, this)
}
)),
i = function() {
var t = this
, r = arguments;
return new Promise((function(e, n) {
var i = o.apply(t, r);
function a(t) {
d(i, e, n, a, u, "next", t)
}
function u(t) {
d(i, e, n, a, u, "throw", t)
}
a(void 0)
}
))
}
,
function() {
return i.apply(this, arguments)
}
)
}, {
key: "pad",
value: function(r) {
return new t(function(t, r) {
for (var e = new Uint8Array(r), n = r - t.length, o = 0; o < t.length; o++)
e[o + n] = t[o];
return e
}(r.buffer, this.buffer.length))
}
}, {
key: "getBase64",
value: function() {
return this._base64 || (this._base64 = btoa(String.fromCharCode.apply(String, p(new Uint8Array(this.buffer))))),
this._base64
}
}],
n = [{
key: "concat",
value: function() {
for (var r = arguments.length, e = new Array(r), n = 0; n < r; n++)
e[n] = arguments[n];
var o = e.map((function(t) {
return t.buffer
}
));
return new t(a.apply(void 0, p(o)))
}
}],
e && g(r.prototype, e),
n && g(r, n),
Object.defineProperty(r, "prototype", {
writable: !1
}),
t
}();
function b(t, r, e, n, o, i, a) {
try {
var u = t[i](a)
, c = u.value
} catch (t) {
return void e(t)
}
u.done ? r(c) : Promise.resolve(c).then(n, o)
}
function w(t) {
return function() {
var r = this
, e = arguments;
return new Promise((function(n, o) {
var i = t.apply(r, e);
function a(t) {
b(i, n, o, a, u, "next", t)
}
function u(t) {
b(i, n, o, a, u, "throw", t)
}
a(void 0)
}
))
}
}
var x = function() {
return new m((t = 256,
l.a.crypto.getRandomValues(new Uint8Array(t))));
var t
}
, E = function(t) {
var r = t.A
, e = t.B
, n = t.N;
return m.concat(n.pad(r), n.pad(e)).getHash()
}
, A = function() {
var t = w(regeneratorRuntime.mark((function t(r) {
var e, n, o, i, a, u, c;
return regeneratorRuntime.wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return e = r.s,
r.I,
o = r.P,
i = new m(new Uint8Array([":".charCodeAt(0)])),
n = new m(""),
a = m.concat(n, i, o),
t.next = 6,
a.getHash();
case 6:
return u = t.sent,
c = m.concat(e, u),
t.abrupt("return", c.getHash());
case 9:
case "end":
return t.stop()
}
}
), t)
}
)));
return function(r) {
return t.apply(this, arguments)
}
}()
, R = function(t) {
var r = t.B
, e = t.k
, n = t.x
, o = t.a
, i = t.u
, a = t.N
, h = t.g
, l = c(u(i.bi, n.bi), o.bi)
, p = s(u(f(h.bi, n.bi, a.bi), e.bi), a.bi)
, v = f(s(function(t, r) {
return t - r
}(r.bi, p), a.bi), l, a.bi);
return new m(v)
}
, S = function(t) {
var r = t.S;
return t.N.pad(r).getHash()
}
, I = function() {
var t = w(regeneratorRuntime.mark((function t(r) {
var e, n, o, a, u, c, s, f;
return regeneratorRuntime.wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return e = r.password,
n = r.s,
o = r.i,
a = r.protocol,
u = void 0 === a ? "s2k" : a,
t.next = 3,
e.getHash();
case 3:
return c = t.sent,
t.next = 6,
l.a.crypto.subtle.importKey("raw", "s2k" === u ? c.buffer : i(c.hex), "PBKDF2", !1, ["deriveBits"]);
case 6:
return s = t.sent,
t.next = 9,
l.a.crypto.subtle.deriveBits({
name: "PBKDF2",
salt: n.buffer,
iterations: o,
hash: {
name: "SHA-256"
}
}, s, 256);
case 9:
return f = t.sent,
t.abrupt("return", new m(f));
case 11:
case "end":
return t.stop()
}
}
), t)
}
)));
return function(r) {
return t.apply(this, arguments)
}
}()
, T = function() {
var t = w(regeneratorRuntime.mark((function t(r) {
var e, n, o, i, a, u, c, s, f, h, l;
return regeneratorRuntime.wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return e = r.I,
n = r.s,
o = r.A,
i = r.B,
a = r.K,
u = r.N,
c = r.g,
t.next = 3,
u.pad(c).getHash();
case 3:
return s = t.sent,
t.next = 6,
u.getHash();
case 6:
return f = t.sent,
h = new m((p = f.bi,
v = s.bi,
p ^ v)),
t.next = 10,
e.getHash();
case 10:
return l = t.sent,
t.abrupt("return", m.concat(h, l, n, o, i, a).getHash());
case 12:
case "end":
return t.stop()
}
var p, v
}
), t)
}
)));
return function(r) {
return t.apply(this, arguments)
}
}()
, O = function() {
var t = w(regeneratorRuntime.mark((function t(r) {
var e, n, o, i;
return regeneratorRuntime.wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return e = r.A,
n = r.M1,
o = r.K,
t.next = 3,
m.concat(e, n, o).getHash();
case 3:
return i = t.sent,
t.abrupt("return", i);
case 5:
case "end":
return t.stop()
}
}
), t)
}
)));
return function(r) {
return t.apply(this, arguments)
}
}()
, M = {
2048: {
N: "AC6BDB41 324A9A9B F166DE5E 1389582F AF72B665 1987EE07 FC319294 3DB56050 A37329CB B4A099ED 8193E075 7767A13D D52312AB 4B03310D CD7F48A9 DA04FD50 E8083969 EDB767B0 CF609517 9A163AB3 661A05FB D5FAAAE8 2918A996 2F0B93B8 55F97993 EC975EEA A80D740A DBF4FF74 7359D041 D5C33EA7 1D281E44 6B14773B CA97B43A 23FB8016 76BD207A 436C6481 F1D2B907 8717461A 5B9D32E6 88F87748 544523B5 24B0D57D 5EA77A27 75D2ECFA 032CFBDB F52FB378 61602790 04E57AE6 AF874E73 03CE5329 9CCC041C 7BC308D8 2A5698F3 A8D0C382 71AE35F8 E9DBFBB6 94B5C803 D89F7AE4 35DE236D 525F5475 9B65E372 FCD68EF2 0FA7111F 9E4AFF73",
g: "02"
}
};
function _(t, r, e, n, o, i, a) {
try {
var u = t[i](a)
, c = u.value
} catch (t) {
return void e(t)
}
u.done ? r(c) : Promise.resolve(c).then(n, o)
}
function P(t) {
return function() {
var r = this
, e = arguments;
return new Promise((function(n, o) {
var i = t.apply(r, e);
function a(t) {
_(i, n, o, a, u, "next", t)
}
function u(t) {
_(i, n, o, a, u, "throw", t)
}
a(void 0)
}
))
}
}
function k(t, r) {
for (var e = 0; e < r.length; e++) {
var n = r[e];
n.enumerable = n.enumerable || !1,
n.configurable = !0,
"value"in n && (n.writable = !0),
Object.defineProperty(t, n.key, n)
}
}
function N(t, r, e) {
return r in t ? Object.defineProperty(t, r, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[r] = e,
t
}
var j = function(t) {
if (!M[t])
throw new Error("group ".concat(t, " not supported."));
var r, e = M[t], n = e.N, o = e.g;
return {
N: new m((r = n,
r.split(/\s/).join(""))),
g: new m(o)
}
}("2048")
, D = j.N
, U = j.g
, C = function() {
function t(r) {
!function(t, r) {
if (!(t instanceof r))
throw new TypeError("Cannot call a class as a function")
}(this, t),
N(this, "accountName", void 0),
N(this, "_privateValue", void 0),
N(this, "_publicValue", void 0),
this.accountName = r
}
var r, e, n, o, a;
return r = t,
(e = [{
key: "privateValue",
get: function() {
return this._privateValue || (this._privateValue = x()),
this._privateValue
}
}, {
key: "publicValue",
get: function() {
var t, r, e, n;
return this._publicValue || (this._publicValue = (t = {
a: this.privateValue,
N: D,
g: U
},
r = t.a,
e = t.g,
(n = t.N).pad(new m(f(e.bi, r.bi, n.bi))))),
this._publicValue
}
}, {
key: "getEvidenceData",
value: (a = P(regeneratorRuntime.mark((function t(r) {
var e, n, o, a, u, c, s, f, h, l, p, v, d, g, y, b, w, x, M, _;
return regeneratorRuntime.wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return e = r.iterations,
n = r.serverPublicValue,
o = r.salt,
a = r.password,
u = r.protocol,
c = void 0 === u ? "s2k" : u,
s = this.privateValue,
f = this.publicValue,
h = new m(n),
l = e,
p = new m(o),
v = new m(i(this.accountName.toLowerCase())),
t.next = 9,
I({
password: new m(i(a)),
s: p,
i: l,
protocol: c
});
case 9:
return d = t.sent,
t.next = 12,
k = void 0,
N = void 0,
k = (P = {
N: D,
g: U
}).N,
N = P.g,
m.concat(k, k.pad(N)).getHash();
case 12:
return g = t.sent,
t.next = 15,
A({
s: p,
I: v,
P: d
});
case 15:
return y = t.sent,
t.next = 18,
E({
A: f,
B: h,
N: D
});
case 18:
return b = t.sent,
w = R({
B: h,
k: g,
x: y,
a: s,
u: b,
N: D,
g: U
}),
t.next = 22,
S({
S: w,
N: D
});
case 22:
return x = t.sent,
t.next = 25,
T({
I: v,
s: p,
A: f,
B: h,
K: x,
N: D,
g: U
});
case 25:
return M = t.sent,
t.next = 28,
O({
A: f,
M1: M,
K: x
});
case 28:
return _ = t.sent,
t.abrupt("return", {
M1: M.getBase64(),
M2: _.getBase64(),
K: x.getBase64()
});
case 30:
case "end":
return t.stop()
}
var P, k, N
}
), t, this)
}
))),
function(t) {
return a.apply(this, arguments)
}
)
}, {
key: "getEvidenceMessage",
value: (o = P(regeneratorRuntime.mark((function t(r) {
var e, n, o;
return regeneratorRuntime.wrap((function(t) {
for (; ; )
switch (t.prev = t.next) {
case 0:
return t.next = 2,
this.getEvidenceData(r);
case 2:
return e = t.sent,
n = e.M1,
o = e.M2,
t.abrupt("return", {
M1: n,
M2: o
});
case 6:
case "end":
return t.stop()
}
}
), t, this)
}
))),
function(t) {
return o.apply(this, arguments)
}
)
}]) && k(r.prototype, e),
n && k(r, n),
Object.defineProperty(r, "prototype", {
writable: !1
}),
t
}();
e.d(r, "a", (function() {
return C
}
))
},
176:function(t, r, e) {
"use strict";
(function(r) {
t.exports = "object" == typeof self && self.self === self && self || "object" == typeof r && r.global === r && r || this
}
).call(this, e(91))
},
91:function(t, r) {
var e;
e = function() {
return this
}();
try {
e = e || new Function("return this")()
} catch (t) {
"object" == typeof window && (e = window)
}
t.exports = e
},}
)
n=jzq(849);
r = new n.a('19999999999');
f = r.publicValue;
a=btoa(String.fromCharCode.apply(String, o(new Uint8Array(f.buffer))));
console.log(a) 这是我扣的a参数生成,请大佬指点错误