主頁 > .NET開發 > 關于爬蟲技術,登陸時對加密的js演算法破解。在線等

關于爬蟲技術,登陸時對加密的js演算法破解。在線等

2021-02-27 03:02:49 .NET開發

首先我看到登陸按鈕的onclick中的函式,找到函式代碼,如下

   if (oldpwd != "") {
        userPwd = encrypt.encrypt(oldpwd);
    }
    else {
        userPwd = encrypt.encrypt($("#loginpwd").val());
    }
    if (userPwd != $("#loginpwd").val()) {
        userPwd = encrypt.encrypt($("#loginpwd").val());
        oldpwd = $("#loginpwd").val();
        $("#loginpwd").val(userPwd);
    }

由于我常年做winfrom代碼,對js讀碼一半靠蒙,認為重點是encrypt.encrypt的函式中。
然后再靠蒙追到了/script/jsencrypt.min.js中的代碼。看了里面代碼我就沒法蒙了。

有兩問題,1、我找不到和encrypt.encrypt對應的函式,2、這段代碼如何用c#摸擬寫一遍

由于/script/jsencrypt.min.js代碼量很長,我在本樓發代碼,如果發不完,接著樓下發,謝謝各位高手

var JSEncryptExports = {}; (function(exports) {
function BigInteger(a, b, c) {
null != a && ("number" == typeof a ? this.fromNumber(a, b, c) : null == b && "string" != typeof a ? this.fromString(a, 256) : this.fromString(a, b))
}
function nbi() {
return new BigInteger(null)
}
function am1(a, b, c, d, e, f) {
for (; --f >= 0;) {
var g = b * this[a++] + c[d] + e;
e = Math.floor(g / 67108864),
c[d++] = 67108863 & g
}
return e
}
function am2(a, b, c, d, e, f) {
for (var g = 32767 & b,
h = b >> 15; --f >= 0;) {
var i = 32767 & this[a],
j = this[a++] >> 15,
k = h * i + j * g;
i = g * i + ((32767 & k) << 15) + c[d] + (1073741823 & e),
e = (i >>> 30) + (k >>> 15) + h * j + (e >>> 30),
c[d++] = 1073741823 & i
}
return e
}
function am3(a, b, c, d, e, f) {
for (var g = 16383 & b,
h = b >> 14; --f >= 0;) {
var i = 16383 & this[a],
j = this[a++] >> 14,
k = h * i + j * g;
i = g * i + ((16383 & k) << 14) + c[d] + e,
e = (i >> 28) + (k >> 14) + h * j,
c[d++] = 268435455 & i
}
return e
}
function int2char(a) {
return BI_RM.charAt(a)
}
function intAt(a, b) {
var c = BI_RC[a.charCodeAt(b)];
return null == c ? -1 : c
}
function bnpCopyTo(a) {
for (var b = this.t - 1; b >= 0; --b) a[b] = this[b];
a.t = this.t,
a.s = this.s
}
function bnpFromInt(a) {
this.t = 1,
this.s = 0 > a ? -1 : 0,
a > 0 ? this[0] = a: -1 > a ? this[0] = a + DV: this.t = 0
}
function nbv(a) {
var b = nbi();
return b.fromInt(a),
b
}
function bnpFromString(a, b) {
var c;
if (16 == b) c = 4;
else if (8 == b) c = 3;
else if (256 == b) c = 8;
else if (2 == b) c = 1;
else if (32 == b) c = 5;
else {
if (4 != b) return void this.fromRadix(a, b);
c = 2
}
this.t = 0,
this.s = 0;
for (var d = a.length,
e = !1,
f = 0; --d >= 0;) {
var g = 8 == c ? 255 & a[d] : intAt(a, d);
0 > g ? "-" == a.charAt(d) && (e = !0) : (e = !1, 0 == f ? this[this.t++] = g: f + c > this.DB ? (this[this.t - 1] |= (g & (1 << this.DB - f) - 1) << f, this[this.t++] = g >> this.DB - f) : this[this.t - 1] |= g << f, f += c, f >= this.DB && (f -= this.DB))
}
8 == c && 0 != (128 & a[0]) && (this.s = -1, f > 0 && (this[this.t - 1] |= (1 << this.DB - f) - 1 << f)),
this.clamp(),
e && BigInteger.ZERO.subTo(this, this)
}
function bnpClamp() {
for (var a = this.s & this.DM; this.t > 0 && this[this.t - 1] == a;)--this.t
}
function bnToString(a) {
if (this.s < 0) return "-" + this.negate().toString(a);
var b;
if (16 == a) b = 4;
else if (8 == a) b = 3;
else if (2 == a) b = 1;
else if (32 == a) b = 5;
else {
if (4 != a) return this.toRadix(a);
b = 2
}
var c, d = (1 << b) - 1,
e = !1,
f = "",
g = this.t,
h = this.DB - g * this.DB % b;
if (g-->0) for (h < this.DB && (c = this[g] >> h) > 0 && (e = !0, f = int2char(c)); g >= 0;) b > h ? (c = (this[g] & (1 << h) - 1) << b - h, c |= this[--g] >> (h += this.DB - b)) : (c = this[g] >> (h -= b) & d, 0 >= h && (h += this.DB, --g)),
c > 0 && (e = !0),
e && (f += int2char(c));
return e ? f: "0"
}
function bnNegate() {
var a = nbi();
return BigInteger.ZERO.subTo(this, a),
a
}
function bnAbs() {
return this.s < 0 ? this.negate() : this
}
function bnCompareTo(a) {
var b = this.s - a.s;
if (0 != b) return b;
var c = this.t;
if (b = c - a.t, 0 != b) return this.s < 0 ? -b: b;
for (; --c >= 0;) if (0 != (b = this[c] - a[c])) return b;
return 0
}
function nbits(a) {
var b, c = 1;
return 0 != (b = a >>> 16) && (a = b, c += 16),
0 != (b = a >> 8) && (a = b, c += 8),
0 != (b = a >> 4) && (a = b, c += 4),
0 != (b = a >> 2) && (a = b, c += 2),
0 != (b = a >> 1) && (a = b, c += 1),
c
}
function bnBitLength() {
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ this.s & this.DM)
}
function bnpDLShiftTo(a, b) {
var c;
for (c = this.t - 1; c >= 0; --c) b[c + a] = this[c];
for (c = a - 1; c >= 0; --c) b[c] = 0;
b.t = this.t + a,
b.s = this.s
}
function bnpDRShiftTo(a, b) {
for (var c = a; c < this.t; ++c) b[c - a] = this[c];
b.t = Math.max(this.t - a, 0),
b.s = this.s
}
function bnpLShiftTo(a, b) {
var c, d = a % this.DB,
e = this.DB - d,
f = (1 << e) - 1,
g = Math.floor(a / this.DB),
h = this.s << d & this.DM;
for (c = this.t - 1; c >= 0; --c) b[c + g + 1] = this[c] >> e | h,
h = (this[c] & f) << d;
for (c = g - 1; c >= 0; --c) b[c] = 0;
b[g] = h,
b.t = this.t + g + 1,
b.s = this.s,
b.clamp()
}
function bnpRShiftTo(a, b) {
b.s = this.s;
var c = Math.floor(a / this.DB);
if (c >= this.t) return void(b.t = 0);
var d = a % this.DB,
e = this.DB - d,
f = (1 << d) - 1;
b[0] = this[c] >> d;
for (var g = c + 1; g < this.t; ++g) b[g - c - 1] |= (this[g] & f) << e,
b[g - c] = this[g] >> d;
d > 0 && (b[this.t - c - 1] |= (this.s & f) << e),
b.t = this.t - c,
b.clamp()
}
function bnpSubTo(a, b) {
for (var c = 0,
d = 0,
e = Math.min(a.t, this.t); e > c;) d += this[c] - a[c],
b[c++] = d & this.DM,
d >>= this.DB;
if (a.t < this.t) {
for (d -= a.s; c < this.t;) d += this[c],
b[c++] = d & this.DM,
d >>= this.DB;
d += this.s
} else {
for (d += this.s; c < a.t;) d -= a[c],
b[c++] = d & this.DM,
d >>= this.DB;
d -= a.s
}
b.s = 0 > d ? -1 : 0,
-1 > d ? b[c++] = this.DV + d: d > 0 && (b[c++] = d),
b.t = c,
b.clamp()
}
function bnpMultiplyTo(a, b) {
var c = this.abs(),
d = a.abs(),
e = c.t;
for (b.t = e + d.t; --e >= 0;) b[e] = 0;
for (e = 0; e < d.t; ++e) b[e + c.t] = c.am(0, d[e], b, e, 0, c.t);
b.s = 0,
b.clamp(),
this.s != a.s && BigInteger.ZERO.subTo(b, b)
}
function bnpSquareTo(a) {
for (var b = this.abs(), c = a.t = 2 * b.t; --c >= 0;) a[c] = 0;
for (c = 0; c < b.t - 1; ++c) {
var d = b.am(c, b[c], a, 2 * c, 0, 1); (a[c + b.t] += b.am(c + 1, 2 * b[c], a, 2 * c + 1, d, b.t - c - 1)) >= b.DV && (a[c + b.t] -= b.DV, a[c + b.t + 1] = 1)
}
a.t > 0 && (a[a.t - 1] += b.am(c, b[c], a, 2 * c, 0, 1)),
a.s = 0,
a.clamp()
}
function bnpDivRemTo(a, b, c) {
var d = a.abs();
if (! (d.t <= 0)) {
var e = this.abs();
if (e.t < d.t) return null != b && b.fromInt(0),
void(null != c && this.copyTo(c));
null == c && (c = nbi());
var f = nbi(),
g = this.s,
h = a.s,
i = this.DB - nbits(d[d.t - 1]);
i > 0 ? (d.lShiftTo(i, f), e.lShiftTo(i, c)) : (d.copyTo(f), e.copyTo(c));
var j = f.t,
k = f[j - 1];
if (0 != k) {
var l = k * (1 << this.F1) + (j > 1 ? f[j - 2] >> this.F2: 0),
m = this.FV / l,
n = (1 << this.F1) / l,
o = 1 << this.F2,
p = c.t,
q = p - j,
r = null == b ? nbi() : b;
for (f.dlShiftTo(q, r), c.compareTo(r) >= 0 && (c[c.t++] = 1, c.subTo(r, c)), BigInteger.ONE.dlShiftTo(j, r), r.subTo(f, f); f.t < j;) f[f.t++] = 0;
for (; --q >= 0;) {
var s = c[--p] == k ? this.DM: Math.floor(c[p] * m + (c[p - 1] + o) * n);
if ((c[p] += f.am(0, s, c, q, 0, j)) < s) for (f.dlShiftTo(q, r), c.subTo(r, c); c[p] < --s;) c.subTo(r, c)
}
null != b && (c.drShiftTo(j, b), g != h && BigInteger.ZERO.subTo(b, b)),
c.t = j,
c.clamp(),
i > 0 && c.rShiftTo(i, c),
0 > g && BigInteger.ZERO.subTo(c, c)
}
}
}
function bnMod(a) {
var b = nbi();
return this.abs().divRemTo(a, null, b),
this.s < 0 && b.compareTo(BigInteger.ZERO) > 0 && a.subTo(b, b),
b
}
function Classic(a) {
this.m = a
}
function cConvert(a) {
return a.s < 0 || a.compareTo(this.m) >= 0 ? a.mod(this.m) : a
}
function cRevert(a) {
return a
}
function cReduce(a) {
a.divRemTo(this.m, null, a)
}
function cMulTo(a, b, c) {
a.multiplyTo(b, c),
this.reduce(c)
}
function cSqrTo(a, b) {
a.squareTo(b),
this.reduce(b)
}
function bnpInvDigit() {
if (this.t < 1) return 0;
var a = this[0];
if (0 == (1 & a)) return 0;
var b = 3 & a;
return b = b * (2 - (15 & a) * b) & 15,
b = b * (2 - (255 & a) * b) & 255,
b = b * (2 - ((65535 & a) * b & 65535)) & 65535,
b = b * (2 - a * b % this.DV) % this.DV,
b > 0 ? this.DV - b: -b
}
function Montgomery(a) {
this.m = a,
this.mp = a.invDigit(),
this.mpl = 32767 & this.mp,
this.mph = this.mp >> 15,
this.um = (1 << a.DB - 15) - 1,
this.mt2 = 2 * a.t
}
function montConvert(a) {
var b = nbi();
return a.abs().dlShiftTo(this.m.t, b),
b.divRemTo(this.m, null, b),
a.s < 0 && b.compareTo(BigInteger.ZERO) > 0 && this.m.subTo(b, b),
b
}
function montRevert(a) {
var b = nbi();
return a.copyTo(b),
this.reduce(b),
b
}
function montReduce(a) {
for (; a.t <= this.mt2;) a[a.t++] = 0;
for (var b = 0; b < this.m.t; ++b) {
var c = 32767 & a[b],
d = c * this.mpl + ((c * this.mph + (a[b] >> 15) * this.mpl & this.um) << 15) & a.DM;
for (c = b + this.m.t, a[c] += this.m.am(0, d, a, b, 0, this.m.t); a[c] >= a.DV;) a[c] -= a.DV,
a[++c]++
}
a.clamp(),
a.drShiftTo(this.m.t, a),
a.compareTo(this.m) >= 0 && a.subTo(this.m, a)
}
function montSqrTo(a, b) {
a.squareTo(b),
this.reduce(b)
}



uj5u.com熱心網友回復:


function montMulTo(a, b, c) {
a.multiplyTo(b, c),
this.reduce(c)
}
function bnpIsEven() {
return 0 == (this.t > 0 ? 1 & this[0] : this.s)
}
function bnpExp(a, b) {
if (a > 4294967295 || 1 > a) return BigInteger.ONE;
var c = nbi(),
d = nbi(),
e = b.convert(this),
f = nbits(a) - 1;
for (e.copyTo(c); --f >= 0;) if (b.sqrTo(c, d), (a & 1 << f) > 0) b.mulTo(d, e, c);
else {
var g = c;
c = d,
d = g
}
return b.revert(c)
}
function bnModPowInt(a, b) {
var c;
return c = 256 > a || b.isEven() ? new Classic(b) : new Montgomery(b),
this.exp(a, c)
}
function bnClone() {
var a = nbi();
return this.copyTo(a),
a
}
function bnIntValue() {
if (this.s < 0) {
if (1 == this.t) return this[0] - this.DV;
if (0 == this.t) return - 1
} else {
if (1 == this.t) return this[0];
if (0 == this.t) return 0
}
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0]
}
function bnByteValue() {
return 0 == this.t ? this.s: this[0] << 24 >> 24
}
function bnShortValue() {
return 0 == this.t ? this.s: this[0] << 16 >> 16
}
function bnpChunkSize(a) {
return Math.floor(Math.LN2 * this.DB / Math.log(a))
}
function bnSigNum() {
return this.s < 0 ? -1 : this.t <= 0 || 1 == this.t && this[0] <= 0 ? 0 : 1
}
function bnpToRadix(a) {
if (null == a && (a = 10), 0 == this.signum() || 2 > a || a > 36) return "0";
var b = this.chunkSize(a),
c = Math.pow(a, b),
d = nbv(c),
e = nbi(),
f = nbi(),
g = "";
for (this.divRemTo(d, e, f); e.signum() > 0;) g = (c + f.intValue()).toString(a).substr(1) + g,
e.divRemTo(d, e, f);
return f.intValue().toString(a) + g
}
function bnpFromRadix(a, b) {
this.fromInt(0),
null == b && (b = 10);
for (var c = this.chunkSize(b), d = Math.pow(b, c), e = !1, f = 0, g = 0, h = 0; h < a.length; ++h) {
var i = intAt(a, h);
0 > i ? "-" == a.charAt(h) && 0 == this.signum() && (e = !0) : (g = b * g + i, ++f >= c && (this.dMultiply(d), this.dAddOffset(g, 0), f = 0, g = 0))
}
f > 0 && (this.dMultiply(Math.pow(b, f)), this.dAddOffset(g, 0)),
e && BigInteger.ZERO.subTo(this, this)
}
function bnpFromNumber(a, b, c) {
if ("number" == typeof b) if (2 > a) this.fromInt(1);
else for (this.fromNumber(a, c), this.testBit(a - 1) || this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this), this.isEven() && this.dAddOffset(1, 0); ! this.isProbablePrime(b);) this.dAddOffset(2, 0),
this.bitLength() > a && this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);
else {
var d = new Array,
e = 7 & a;
d.length = (a >> 3) + 1,
b.nextBytes(d),
e > 0 ? d[0] &= (1 << e) - 1 : d[0] = 0,
this.fromString(d, 256)
}
}
function bnToByteArray() {
var a = this.t,
b = new Array;
b[0] = this.s;
var c, d = this.DB - a * this.DB % 8,
e = 0;
if (a-->0) for (d < this.DB && (c = this[a] >> d) != (this.s & this.DM) >> d && (b[e++] = c | this.s << this.DB - d); a >= 0;) 8 > d ? (c = (this[a] & (1 << d) - 1) << 8 - d, c |= this[--a] >> (d += this.DB - 8)) : (c = this[a] >> (d -= 8) & 255, 0 >= d && (d += this.DB, --a)),
0 != (128 & c) && (c |= -256),
0 == e && (128 & this.s) != (128 & c) && ++e,
(e > 0 || c != this.s) && (b[e++] = c);
return b
}
function bnEquals(a) {
return 0 == this.compareTo(a)
}
function bnMin(a) {
return this.compareTo(a) < 0 ? this: a
}
function bnMax(a) {
return this.compareTo(a) > 0 ? this: a
}
function bnpBitwiseTo(a, b, c) {
var d, e, f = Math.min(a.t, this.t);
for (d = 0; f > d; ++d) c[d] = b(this[d], a[d]);
if (a.t < this.t) {
for (e = a.s & this.DM, d = f; d < this.t; ++d) c[d] = b(this[d], e);
c.t = this.t
} else {
for (e = this.s & this.DM, d = f; d < a.t; ++d) c[d] = b(e, a[d]);
c.t = a.t
}
c.s = b(this.s, a.s),
c.clamp()
}
function op_and(a, b) {
return a & b
}
function bnAnd(a) {
var b = nbi();
return this.bitwiseTo(a, op_and, b),
b
}
function op_or(a, b) {
return a | b
}
function bnOr(a) {
var b = nbi();
return this.bitwiseTo(a, op_or, b),
b
}
function op_xor(a, b) {
return a ^ b
}
function bnXor(a) {
var b = nbi();
return this.bitwiseTo(a, op_xor, b),
b
}
function op_andnot(a, b) {
return a & ~b
}
function bnAndNot(a) {
var b = nbi();
return this.bitwiseTo(a, op_andnot, b),
b
}
function bnNot() {
for (var a = nbi(), b = 0; b < this.t; ++b) a[b] = this.DM & ~this[b];
return a.t = this.t,
a.s = ~this.s,
a
}
function bnShiftLeft(a) {
var b = nbi();
return 0 > a ? this.rShiftTo( - a, b) : this.lShiftTo(a, b),
b
}
function bnShiftRight(a) {
var b = nbi();
return 0 > a ? this.lShiftTo( - a, b) : this.rShiftTo(a, b),
b
}
function lbit(a) {
if (0 == a) return - 1;
var b = 0;
return 0 == (65535 & a) && (a >>= 16, b += 16),
0 == (255 & a) && (a >>= 8, b += 8),
0 == (15 & a) && (a >>= 4, b += 4),
0 == (3 & a) && (a >>= 2, b += 2),
0 == (1 & a) && ++b,
b
}
function bnGetLowestSetBit() {
for (var a = 0; a < this.t; ++a) if (0 != this[a]) return a * this.DB + lbit(this[a]);
return this.s < 0 ? this.t * this.DB: -1
}
function cbit(a) {
for (var b = 0; 0 != a;) a &= a - 1,
++b;
return b
}
function bnBitCount() {
for (var a = 0,
b = this.s & this.DM,
c = 0; c < this.t; ++c) a += cbit(this[c] ^ b);
return a
}
function bnTestBit(a) {
var b = Math.floor(a / this.DB);
return b >= this.t ? 0 != this.s: 0 != (this[b] & 1 << a % this.DB)
}
function bnpChangeBit(a, b) {
var c = BigInteger.ONE.shiftLeft(a);
return this.bitwiseTo(c, b, c),
c
}
function bnSetBit(a) {
return this.changeBit(a, op_or)
}
function bnClearBit(a) {
return this.changeBit(a, op_andnot)
}
function bnFlipBit(a) {
return this.changeBit(a, op_xor)
}
function bnpAddTo(a, b) {
for (var c = 0,
d = 0,
e = Math.min(a.t, this.t); e > c;) d += this[c] + a[c],
b[c++] = d & this.DM,
d >>= this.DB;
if (a.t < this.t) {
for (d += a.s; c < this.t;) d += this[c],
b[c++] = d & this.DM,
d >>= this.DB;
d += this.s
} else {
for (d += this.s; c < a.t;) d += a[c],
b[c++] = d & this.DM,
d >>= this.DB;
d += a.s
}
b.s = 0 > d ? -1 : 0,
d > 0 ? b[c++] = d: -1 > d && (b[c++] = this.DV + d),
b.t = c,
b.clamp()
}
function bnAdd(a) {
var b = nbi();
return this.addTo(a, b),
b
}
function bnSubtract(a) {
var b = nbi();
return this.subTo(a, b),
b
}
function bnMultiply(a) {
var b = nbi();
return this.multiplyTo(a, b),
b
}
function bnSquare() {
var a = nbi();
return this.squareTo(a),
a
}
function bnDivide(a) {
var b = nbi();
return this.divRemTo(a, b, null),
b
}
function bnRemainder(a) {
var b = nbi();
return this.divRemTo(a, null, b),
b
}
function bnDivideAndRemainder(a) {
var b = nbi(),
c = nbi();
return this.divRemTo(a, b, c),
new Array(b, c)
}
function bnpDMultiply(a) {
this[this.t] = this.am(0, a - 1, this, 0, 0, this.t),
++this.t,
this.clamp()
}
function bnpDAddOffset(a, b) {
if (0 != a) {
for (; this.t <= b;) this[this.t++] = 0;
for (this[b] += a; this[b] >= this.DV;) this[b] -= this.DV,
++b >= this.t && (this[this.t++] = 0),
++this[b]
}
}
function NullExp() {}
function nNop(a) {
return a
}
function nMulTo(a, b, c) {
a.multiplyTo(b, c)
}
function nSqrTo(a, b) {
a.squareTo(b)
}
function bnPow(a) {
return this.exp(a, new NullExp)
}
function bnpMultiplyLowerTo(a, b, c) {
var d = Math.min(this.t + a.t, b);
for (c.s = 0, c.t = d; d > 0;) c[--d] = 0;
var e;
for (e = c.t - this.t; e > d; ++d) c[d + this.t] = this.am(0, a[d], c, d, 0, this.t);
for (e = Math.min(a.t, b); e > d; ++d) this.am(0, a[d], c, d, 0, b - d);
c.clamp()
}
function bnpMultiplyUpperTo(a, b, c) {--b;
var d = c.t = this.t + a.t - b;
for (c.s = 0; --d >= 0;) c[d] = 0;
for (d = Math.max(b - this.t, 0); d < a.t; ++d) c[this.t + d - b] = this.am(b - d, a[d], c, 0, 0, this.t + d - b);
c.clamp(),
c.drShiftTo(1, c)
}
function Barrett(a) {
this.r2 = nbi(),
this.q3 = nbi(),
BigInteger.ONE.dlShiftTo(2 * a.t, this.r2),
this.mu = this.r2.divide(a),
this.m = a
}
function barrettConvert(a) {
if (a.s < 0 || a.t > 2 * this.m.t) return a.mod(this.m);
if (a.compareTo(this.m) < 0) return a;
var b = nbi();
return a.copyTo(b),
this.reduce(b),
b
}
function barrettRevert(a) {
return a
}
function barrettReduce(a) {
for (a.drShiftTo(this.m.t - 1, this.r2), a.t > this.m.t + 1 && (a.t = this.m.t + 1, a.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); a.compareTo(this.r2) < 0;) a.dAddOffset(1, this.m.t + 1);
for (a.subTo(this.r2, a); a.compareTo(this.m) >= 0;) a.subTo(this.m, a)
}
function barrettSqrTo(a, b) {
a.squareTo(b),
this.reduce(b)
}
function barrettMulTo(a, b, c) {
a.multiplyTo(b, c),
this.reduce(c)
}
function bnModPow(a, b) {
var c, d, e = a.bitLength(),
f = nbv(1);
if (0 >= e) return f;
c = 18 > e ? 1 : 48 > e ? 3 : 144 > e ? 4 : 768 > e ? 5 : 6,
d = 8 > e ? new Classic(b) : b.isEven() ? new Barrett(b) : new Montgomery(b);
var g = new Array,
h = 3,
i = c - 1,
j = (1 << c) - 1;
if (g[1] = d.convert(this), c > 1) {
var k = nbi();
for (d.sqrTo(g[1], k); j >= h;) g[h] = nbi(),
d.mulTo(k, g[h - 2], g[h]),
h += 2
}
var l, m, n = a.t - 1,
o = !0,
p = nbi();
for (e = nbits(a[n]) - 1; n >= 0;) {
for (e >= i ? l = a[n] >> e - i & j: (l = (a[n] & (1 << e + 1) - 1) << i - e, n > 0 && (l |= a[n - 1] >> this.DB + e - i)), h = c; 0 == (1 & l);) l >>= 1,
--h;
if ((e -= h) < 0 && (e += this.DB, --n), o) g[l].copyTo(f),
o = !1;
else {
for (; h > 1;) d.sqrTo(f, p),
d.sqrTo(p, f),
h -= 2;
h > 0 ? d.sqrTo(f, p) : (m = f, f = p, p = m),
d.mulTo(p, g[l], f)
}
for (; n >= 0 && 0 == (a[n] & 1 << e);) d.sqrTo(f, p),
m = f,
f = p,
p = m,
--e < 0 && (e = this.DB - 1, --n)
}
return d.revert(f)
}
function bnGCD(a) {
var b = this.s < 0

uj5u.com熱心網友回復:

如果js過于復雜,我會考慮用selenium,控制網頁直接登錄,然后取登錄后的cookie。

uj5u.com熱心網友回復:

一般是c#里直接執行這個js檔案。
要找的話,就是在js里找一串私鑰字串,加密方式一般是rsa演算法。

uj5u.com熱心網友回復:

自己頂一下。。。。。。。。。。。

uj5u.com熱心網友回復:

參考 3 樓 hztltgg 的回復:
一般是c#里直接執行這個js檔案。
要找的話,就是在js里找一串私鑰字串,加密方式一般是rsa演算法。


我在網上看到了相同的加密代碼,后面還有后臺代碼 https://www.cnblogs.com/CallmeYhz/p/8522679.html
 但我呼叫JsEncryptHelper js = new ImportHelper.JsEncryptHelper();
             string strTmp = js.Encrypt(PWD.Text.Trim());
所得strTmp和抓取的提交的密碼并不相同。

uj5u.com熱心網友回復:

這玩意花錢就能解決

轉載請註明出處,本文鏈接:https://www.uj5u.com/net/264017.html

標籤:C#

上一篇:請教一個表單尺寸的問題

下一篇:datagridview的重繪問題,急,急

標籤雲
其他(157675) Python(38076) JavaScript(25376) Java(17977) C(15215) 區塊鏈(8255) C#(7972) AI(7469) 爪哇(7425) MySQL(7132) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5869) 数组(5741) R(5409) Linux(5327) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4554) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2429) ASP.NET(2402) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) 功能(1967) .NET技术(1958) Web開發(1951) python-3.x(1918) HtmlCss(1915) 弹簧靴(1913) C++(1909) xml(1889) PostgreSQL(1872) .NETCore(1853) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • WebAPI簡介

    Web體系結構: 有三個核心:資源(resource),URL(統一資源識別符號)和表示 他們的關系是這樣的:一個資源由一個URL進行標識,HTTP客戶端使用URL定位資源,表示是從資源回傳資料,媒體型別是資源回傳的資料格式。 接下來我們說下HTTP. HTTP協議的系統是一種無狀態的方式,使用請求/ ......

    uj5u.com 2020-09-09 22:07:47 more
  • asp.net core 3.1 入口:Program.cs中的Main函式

    本文分析Program.cs 中Main()函式中代碼的運行順序分析asp.net core程式的啟動,重點不是剖析原始碼,而是理清程式開始時執行的順序。到呼叫了哪些實體,哪些法方。asp.net core 3.1 的程式入口在專案Program.cs檔案里,如下。ususing System; us ......

    uj5u.com 2020-09-09 22:07:49 more
  • asp.net網站作為websocket服務端的應用該如何寫

    最近被websocket的一個問題困擾了很久,有一個需求是在web網站中搭建websocket服務。客戶端通過網頁與服務器建立連接,然后服務器根據ip給客戶端網頁發送資訊。 其實,這個需求并不難,只是剛開始對websocket的內容不太了解。上網搜索了一下,有通過asp.net core 實作的、有 ......

    uj5u.com 2020-09-09 22:08:02 more
  • ASP.NET 開源匯入匯出庫Magicodes.IE Docker中使用

    Magicodes.IE在Docker中使用 更新歷史 2019.02.13 【Nuget】版本更新到2.0.2 【匯入】修復單列匯入的Bug,單元測驗“OneColumnImporter_Test”。問題見(https://github.com/dotnetcore/Magicodes.IE/is ......

    uj5u.com 2020-09-09 22:08:05 more
  • 在webform中使用ajax

    如果你用過Asp.net webform, 說明你也算是.NET 開發的老兵了。WEBform應該是2011 2013左右,當時還用visual studio 2005、 visual studio 2008。后來基本都用的是MVC。 如果是新開發的專案,估計沒人會用webform技術。但是有些舊版 ......

    uj5u.com 2020-09-09 22:08:50 more
  • iis添加asp.net網站,訪問提示:由于擴展配置問題而無法提供您請求的

    今天在iis服務器配置asp.net網站,遇到一個問題,記錄一下: 問題:由于擴展配置問題而無法提供您請求的頁面。如果該頁面是腳本,請添加處理程式。如果應下載檔案,請添加 MIME 映射。 WindowServer2012服務器,添加角色安裝完.netframework和iis之后,運行aspx頁面 ......

    uj5u.com 2020-09-09 22:10:00 more
  • WebAPI-處理架構

    帶著問題去思考,大家好! 問題1:HTTP請求和回傳相應的HTTP回應資訊之間發生了什么? 1:首先是最底層,托管層,位于WebAPI和底層HTTP堆疊之間 2:其次是 訊息處理程式管道層,這里比如日志和快取。OWIN的參考是將訊息處理程式管道的一些功能下移到堆疊下端的OWIN中間件了。 3:控制器處理 ......

    uj5u.com 2020-09-09 22:11:13 more
  • 微信門戶開發框架-使用指導說明書

    微信門戶應用管理系統,采用基于 MVC + Bootstrap + Ajax + Enterprise Library的技術路線,界面層采用Boostrap + Metronic組合的前端框架,資料訪問層支持Oracle、SQLServer、MySQL、PostgreSQL等資料庫。框架以MVC5,... ......

    uj5u.com 2020-09-09 22:15:18 more
  • WebAPI-HTTP編程模型

    帶著問題去思考,大家好!它是什么?它包含什么?它能干什么? 訊息 HTTP編程模型的核心就是訊息抽象,表示為:HttPRequestMessage,HttpResponseMessage.用于客戶端和服務端之間交換請求和回應訊息。 HttpMethod類包含了一組靜態屬性: private stat ......

    uj5u.com 2020-09-09 22:15:23 more
  • 部署WebApi隨筆

    一、跨域 NuGet參考Microsoft.AspNet.WebApi.Cors WebApiConfig.cs中配置: // Web API 配置和服務 config.EnableCors(new EnableCorsAttribute("*", "*", "*")); 二、清除默認回傳XML格式 ......

    uj5u.com 2020-09-09 22:15:48 more
最新发布
  • C#多執行緒學習(二) 如何操縱一個執行緒

    <a href="https://www.cnblogs.com/x-zhi/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/2943582/20220801082530.png" alt="" /></...

    uj5u.com 2023-04-19 09:17:20 more
  • C#多執行緒學習(二) 如何操縱一個執行緒

    C#多執行緒學習(二) 如何操縱一個執行緒 執行緒學習第一篇:C#多執行緒學習(一) 多執行緒的相關概念 下面我們就動手來創建一個執行緒,使用Thread類創建執行緒時,只需提供執行緒入口即可。(執行緒入口使程式知道該讓這個執行緒干什么事) 在C#中,執行緒入口是通過ThreadStart代理(delegate)來提供的 ......

    uj5u.com 2023-04-19 09:16:49 more
  • 記一次 .NET某醫療器械清洗系統 卡死分析

    <a href="https://www.cnblogs.com/huangxincheng/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/214741/20200614104537.png" alt="" /&g...

    uj5u.com 2023-04-18 08:39:04 more
  • 記一次 .NET某醫療器械清洗系統 卡死分析

    一:背景 1. 講故事 前段時間協助訓練營里的一位朋友分析了一個程式卡死的問題,回過頭來看這個案例比較經典,這篇稍微整理一下供后來者少踩坑吧。 二:WinDbg 分析 1. 為什么會卡死 因為是表單程式,理所當然就是看主執行緒此時正在做什么? 可以用 ~0s ; k 看一下便知。 0:000> k # ......

    uj5u.com 2023-04-18 08:33:10 more
  • SignalR, No Connection with that ID,IIS

    <a href="https://www.cnblogs.com/smartstar/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/u36196.jpg" alt="" /></a>...

    uj5u.com 2023-03-30 17:21:52 more
  • 一次對pool的誤用導致的.net頻繁gc的診斷分析

    <a href="https://www.cnblogs.com/dotnet-diagnostic/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/3115652/20230225090434.png" alt=""...

    uj5u.com 2023-03-28 10:15:33 more
  • 一次對pool的誤用導致的.net頻繁gc的診斷分析

    <a href="https://www.cnblogs.com/dotnet-diagnostic/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/3115652/20230225090434.png" alt=""...

    uj5u.com 2023-03-28 10:13:31 more
  • C#遍歷指定檔案夾中所有檔案的3種方法

    <a href="https://www.cnblogs.com/xbhp/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/957602/20230310105611.png" alt="" /></a&...

    uj5u.com 2023-03-27 14:46:55 more
  • C#/VB.NET:如何將PDF轉為PDF/A

    <a href="https://www.cnblogs.com/Carina-baby/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/2859233/20220427162558.png" alt="" />...

    uj5u.com 2023-03-27 14:46:35 more
  • 武裝你的WEBAPI-OData聚合查詢

    <a href="https://www.cnblogs.com/podolski/" target="_blank"><img width="48" height="48" class="pfs" src="https://pic.cnblogs.com/face/616093/20140323000327.png" alt="" /><...

    uj5u.com 2023-03-27 14:46:16 more