Closed rwbymoe closed 1 week ago
难度有点高,这个接口(sn=b685e2b1578a0d64
)用了 MD5,但我不知道用的盐是什么😢
可行的方法应该只有逆向,安卓端用了 360 加固,其他平台我暂时还没尝试。
可预期的时间内很难切换。
我先看看这个sn有效期多久,久的话有很多妥协方案可以绕过破解
嗯?我好像傻了,这个sn应该就永久固定获取这篇文章的评论区了
有很多妥协方案可以绕过破解
可以具体说说吗👀
有很多妥协方案可以绕过破解
可以具体说说吗👀
本来我以为和网页端的sn相同,只是根据不同端返回不同结果,但测试发现是在app端用newsId特地算了一个不同的sn,就为了推他那app。现在md5解不开,app逆向不了,web端又不上,确实没什么好办法。算了吧,从60天到7天,再到3天,看个评论区好像偷他家一样,如果有更好的科技新闻网站就看别的去了
难度有点高,这个接口(
sn=b685e2b1578a0d64
)用了 MD5,但我不知道用的盐是什么😢可行的方法应该只有逆向,安卓端用了 360 加固,其他平台我暂时还没尝试。
可预期的时间内很难切换。
不是还有小程序吗?
难度有点高,这个接口(
sn=b685e2b1578a0d64
)用了 MD5,但我不知道用的盐是什么😢 可行的方法应该只有逆向,安卓端用了 360 加固,其他平台我暂时还没尝试。 可预期的时间内很难切换。不是还有小程序吗?
才知道之家有小程序,试了一下感觉有希望
@cantinzing 解出来了 @Tai-Zhou 优化就麻烦作者了,下面是demo
var module = {} var e, t, r, i, n, c, s, o, a, f, h, p, d, l, u, y, _, g, v, B, k, x = x || function (e, t) { var r = {}, i = r.lib = {}, n = function () { }, c = i.Base = { extend: function (e) { n.prototype = this; var t = new n; return e && t.mixIn(e), t.hasOwnProperty("init") || (t.init = function () { t.$super.init.apply(this, arguments) }), t.init.prototype = t, t.$super = this, t }, create: function () { var e = this.extend(); return e.init.apply(e, arguments), e }, init: function () { }, mixIn: function (e) { for (var t in e) e.hasOwnProperty(t) && (this[t] = e[t]); e.hasOwnProperty("toString") && (this.toString = e.toString) }, clone: function () { return this.init.prototype.extend(this) } }, s = i.WordArray = c.extend({ init: function (e, t) { e = this.words = e || [], this.sigBytes = null != t ? t : 4 e.length }, toString: function (e) { return (e || a).stringify(this) }, concat: function (e) { var t = this.words, r = e.words, i = this.sigBytes; if (e = e.sigBytes, this.clamp(), i % 4) for (var n = 0; n < e; n++) t[i + n >>> 2] |= (r[n >>> 2] >>> 24 - n % 4 8 & 255) << 24 - (i + n) % 4 8; else if (65535 < r.length) for (n = 0; n < e; n += 4) t[i + n >>> 2] = r[n >>> 2]; else t.push.apply(t, r); return this.sigBytes += e, this }, clamp: function () { var t = this.words, r = this.sigBytes; t[r >>> 2] &= 4294967295 << 32 - r % 4 8, t.length = e.ceil(r / 4) }, clone: function () { var e = c.clone.call(this); return e.words = this.words.slice(0), e }, random: function (t) { for (var r = [], i = 0; i < t; i += 4) r.push(4294967296 e.random() | 0); return new s.init(r, t) } }), o = r.enc = {}, a = o.Hex = { stringify: function (e) { var t = e.words; e = e.sigBytes; for (var r = [], i = 0; i < e; i++) { var n = t[i >>> 2] >>> 24 - i % 4 8 & 255; r.push((n >>> 4).toString(16)), r.push((15 & n).toString(16)) } return r.join("") }, parse: function (e) { for (var t = e.length, r = [], i = 0; i < t; i += 2) r[i >>> 3] |= parseInt(e.substr(i, 2), 16) << 24 - i % 8 4; return new s.init(r, t / 2) } }, f = o.Latin1 = { stringify: function (e) { var t = e.words; e = e.sigBytes; for (var r = [], i = 0; i < e; i++) r.push(String.fromCharCode(t[i >>> 2] >>> 24 - i % 4 8 & 255)); return r.join("") }, parse: function (e) { for (var t = e.length, r = [], i = 0; i < t; i++) r[i >>> 2] |= (255 & e.charCodeAt(i)) << 24 - i % 4 8; return new s.init(r, t) } }, h = o.Utf8 = { stringify: function (e) { try { return decodeURIComponent(escape(f.stringify(e))) } catch (e) { throw Error("Malformed UTF-8 data") } }, parse: function (e) { return f.parse(unescape(encodeURIComponent(e))) } }, p = i.BufferedBlockAlgorithm = c.extend({ reset: function () { this._data = new s.init, this._nDataBytes = 0 }, _append: function (e) { "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes }, _process: function (t) { var r = this._data, i = r.words, n = r.sigBytes, c = this.blockSize, o = n / (4 c); if (t = (o = t ? e.ceil(o) : e.max((0 | o) - this._minBufferSize, 0)) c, n = e.min(4 t, n), t) { for (var a = 0; a < t; a += c) this._doProcessBlock(i, a); a = i.splice(0, t), r.sigBytes -= n } return new s.init(a, n) }, clone: function () { var e = c.clone.call(this); return e._data = this._data.clone(), e }, _minBufferSize: 0 }); i.Hasher = p.extend({ cfg: c.extend(), init: function (e) { this.cfg = this.cfg.extend(e), this.reset() }, reset: function () { p.reset.call(this), this._doReset() }, update: function (e) { return this._append(e), this._process(), this }, finalize: function (e) { return e && this._append(e), this._doFinalize() }, blockSize: 16, _createHelper: function (e) { return function (t, r) { return new e.init(r).finalize(t) } }, _createHmacHelper: function (e) { return function (t, r) { return new d.HMAC.init(e, r).finalize(t) } } }); var d = r.algo = {}; return r }(Math);
function m(e, t) { var r = x.enc.Utf8.parse(t), i = x.DES.encrypt(e, r, { mode: x.mode.ECB, padding: x.pad.ZeroPadding }); return x.enc.Base64.parse(i.toString()) }
function S(e, t) { var r = x.enc.Utf8.parse(t), i = x.enc.Hex.parse(e), n = x.enc.Base64.stringify(i), c = x.enc.Base64.parse(n); return x.DES.decrypt({ ciphertext: c }, r, { mode: x.mode.ECB, padding: x.pad.ZeroPadding }).toString(x.enc.Utf8) } t = (e = x).lib.WordArray, e.enc.Base64 = { stringify: function (e) { var t = e.words, r = e.sigBytes, i = this._map; e.clamp(), e = []; for (var n = 0; n < r; n += 3) for (var c = (t[n >>> 2] >>> 24 - n % 4 8 & 255) << 16 | (t[n + 1 >>> 2] >>> 24 - (n + 1) % 4 8 & 255) << 8 | t[n + 2 >>> 2] >>> 24 - (n + 2) % 4 8 & 255, s = 0; 4 > s && n + .75 s < r; s++) e.push(i.charAt(c >>> 6 (3 - s) & 63)); if (t = i.charAt(64)) for (; e.length % 4;) e.push(t); return e.join("") }, parse: function (e) { var r = e.length, i = this._map; (n = i.charAt(64)) && -1 != (n = e.indexOf(n)) && (r = n); for (var n = [], c = 0, s = 0; s < r; s++) if (s % 4) { var o = i.indexOf(e.charAt(s - 1)) << s % 4 2, a = i.indexOf(e.charAt(s)) >>> 6 - s % 4 2; n[c >>> 2] |= (o | a) << 24 - c % 4 8, c++ } return t.create(n, c) }, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }, function (e) { function t(e, t, r, i, n, c, s) { return ((e = e + (t & r | ~t & i) + n + s) << c | e >>> 32 - c) + t }
function r(e, t, r, i, n, c, s) {
return ((e = e + (t & i | r & ~i) + n + s) << c | e >>> 32 - c) + t
}
function i(e, t, r, i, n, c, s) {
return ((e = e + (t ^ r ^ i) + n + s) << c | e >>> 32 - c) + t
}
function n(e, t, r, i, n, c, s) {
return ((e = e + (r ^ (t | ~i)) + n + s) << c | e >>> 32 - c) + t
}
for (var c = x, s = (a = c.lib).WordArray, o = a.Hasher, a = c.algo, f = [], h = 0; 64 > h; h++) f[h] = 4294967296 * e.abs(e.sin(h + 1)) | 0;
a = a.MD5 = o.extend({
_doReset: function () {
this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878])
},
_doProcessBlock: function (e, c) {
for (var s = 0; 16 > s; s++) {
var o = e[a = c + s];
e[a] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8)
}
s = this._hash.words;
var a = e[c + 0],
h = (o = e[c + 1], e[c + 2]),
p = e[c + 3],
d = e[c + 4],
l = e[c + 5],
u = e[c + 6],
y = e[c + 7],
_ = e[c + 8],
g = e[c + 9],
v = e[c + 10],
B = e[c + 11],
k = e[c + 12],
x = e[c + 13],
m = e[c + 14],
S = e[c + 15],
z = t(z = s[0], C = s[1], D = s[2], E = s[3], a, 7, f[0]),
E = t(E, z, C, D, o, 12, f[1]),
D = t(D, E, z, C, h, 17, f[2]),
C = t(C, D, E, z, p, 22, f[3]);
z = t(z, C, D, E, d, 7, f[4]), E = t(E, z, C, D, l, 12, f[5]), D = t(D, E, z, C, u, 17, f[6]), C = t(C, D, E, z, y, 22, f[7]), z = t(z, C, D, E, _, 7, f[8]), E = t(E, z, C, D, g, 12, f[9]), D = t(D, E, z, C, v, 17, f[10]), C = t(C, D, E, z, B, 22, f[11]), z = t(z, C, D, E, k, 7, f[12]), E = t(E, z, C, D, x, 12, f[13]), D = t(D, E, z, C, m, 17, f[14]), z = r(z, C = t(C, D, E, z, S, 22, f[15]), D, E, o, 5, f[16]), E = r(E, z, C, D, u, 9, f[17]), D = r(D, E, z, C, B, 14, f[18]), C = r(C, D, E, z, a, 20, f[19]), z = r(z, C, D, E, l, 5, f[20]), E = r(E, z, C, D, v, 9, f[21]), D = r(D, E, z, C, S, 14, f[22]), C = r(C, D, E, z, d, 20, f[23]), z = r(z, C, D, E, g, 5, f[24]), E = r(E, z, C, D, m, 9, f[25]), D = r(D, E, z, C, p, 14, f[26]), C = r(C, D, E, z, _, 20, f[27]), z = r(z, C, D, E, x, 5, f[28]), E = r(E, z, C, D, h, 9, f[29]), D = r(D, E, z, C, y, 14, f[30]), z = i(z, C = r(C, D, E, z, k, 20, f[31]), D, E, l, 4, f[32]), E = i(E, z, C, D, _, 11, f[33]), D = i(D, E, z, C, B, 16, f[34]), C = i(C, D, E, z, m, 23, f[35]), z = i(z, C, D, E, o, 4, f[36]), E = i(E, z, C, D, d, 11, f[37]), D = i(D, E, z, C, y, 16, f[38]), C = i(C, D, E, z, v, 23, f[39]), z = i(z, C, D, E, x, 4, f[40]), E = i(E, z, C, D, a, 11, f[41]), D = i(D, E, z, C, p, 16, f[42]), C = i(C, D, E, z, u, 23, f[43]), z = i(z, C, D, E, g, 4, f[44]), E = i(E, z, C, D, k, 11, f[45]), D = i(D, E, z, C, S, 16, f[46]), z = n(z, C = i(C, D, E, z, h, 23, f[47]), D, E, a, 6, f[48]), E = n(E, z, C, D, y, 10, f[49]), D = n(D, E, z, C, m, 15, f[50]), C = n(C, D, E, z, l, 21, f[51]), z = n(z, C, D, E, k, 6, f[52]), E = n(E, z, C, D, p, 10, f[53]), D = n(D, E, z, C, v, 15, f[54]), C = n(C, D, E, z, o, 21, f[55]), z = n(z, C, D, E, _, 6, f[56]), E = n(E, z, C, D, S, 10, f[57]), D = n(D, E, z, C, u, 15, f[58]), C = n(C, D, E, z, x, 21, f[59]), z = n(z, C, D, E, d, 6, f[60]), E = n(E, z, C, D, B, 10, f[61]), D = n(D, E, z, C, h, 15, f[62]), C = n(C, D, E, z, g, 21, f[63]);
s[0] = s[0] + z | 0, s[1] = s[1] + C | 0, s[2] = s[2] + D | 0, s[3] = s[3] + E | 0
},
_doFinalize: function () {
var t = this._data,
r = t.words,
i = 8 * this._nDataBytes,
n = 8 * t.sigBytes;
r[n >>> 5] |= 128 << 24 - n % 32;
var c = e.floor(i / 4294967296);
for (r[15 + (n + 64 >>> 9 << 4)] = 16711935 & (c << 8 | c >>> 24) | 4278255360 & (c << 24 | c >>> 8), r[14 + (n + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8), t.sigBytes = 4 * (r.length + 1), this._process(), r = (t = this._hash).words, i = 0; 4 > i; i++) n = r[i], r[i] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8);
return t
},
clone: function () {
var e = o.clone.call(this);
return e._hash = this._hash.clone(), e
}
}), c.MD5 = o._createHelper(a), c.HmacMD5 = o._createHmacHelper(a)
}(Math),
function () {
var e, t = x,
r = (e = t.lib).Base,
i = e.WordArray,
n = (e = t.algo).EvpKDF = r.extend({
cfg: r.extend({
keySize: 4,
hasher: e.MD5,
iterations: 1
}),
init: function (e) {
this.cfg = this.cfg.extend(e)
},
compute: function (e, t) {
for (var r = (o = this.cfg).hasher.create(), n = i.create(), c = n.words, s = o.keySize, o = o.iterations; c.length < s;) {
a && r.update(a);
var a = r.update(e).finalize(t);
r.reset();
for (var f = 1; f < o; f++) a = r.finalize(a), r.reset();
n.concat(a)
}
return n.sigBytes = 4 * s, n
}
});
t.EvpKDF = function (e, t, r) {
return n.create(r).compute(e, t)
}
}(), x.lib.Cipher || function (e) {
var t = (l = x).lib,
r = t.Base,
i = t.WordArray,
n = t.BufferedBlockAlgorithm,
c = l.enc.Base64,
s = l.algo.EvpKDF,
o = t.Cipher = n.extend({
cfg: r.extend(),
createEncryptor: function (e, t) {
return this.create(this._ENC_XFORM_MODE, e, t)
},
createDecryptor: function (e, t) {
return this.create(this._DEC_XFORM_MODE, e, t)
},
init: function (e, t, r) {
this.cfg = this.cfg.extend(r), this._xformMode = e, this._key = t, this.reset()
},
reset: function () {
n.reset.call(this), this._doReset()
},
process: function (e) {
return this._append(e), this._process()
},
finalize: function (e) {
return e && this._append(e), this._doFinalize()
},
keySize: 4,
ivSize: 4,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
_createHelper: function (e) {
return {
encrypt: function (t, r, i) {
return ("string" == typeof r ? u : d).encrypt(e, t, r, i)
},
decrypt: function (t, r, i) {
return ("string" == typeof r ? u : d).decrypt(e, t, r, i)
}
}
}
});
t.StreamCipher = o.extend({
_doFinalize: function () {
return this._process(!0)
},
blockSize: 1
});
var a = l.mode = {},
f = function (e, t, r) {
var i = this._iv;
i ? this._iv = void 0 : i = this._prevBlock;
for (var n = 0; n < r; n++) e[t + n] ^= i[n]
},
h = (t.BlockCipherMode = r.extend({
createEncryptor: function (e, t) {
return this.Encryptor.create(e, t)
},
createDecryptor: function (e, t) {
return this.Decryptor.create(e, t)
},
init: function (e, t) {
this._cipher = e, this._iv = t
}
})).extend();
h.Encryptor = h.extend({
processBlock: function (e, t) {
var r = this._cipher,
i = r.blockSize;
f.call(this, e, t, i), r.encryptBlock(e, t), this._prevBlock = e.slice(t, t + i)
}
}), h.Decryptor = h.extend({
processBlock: function (e, t) {
var r = this._cipher,
i = r.blockSize,
n = e.slice(t, t + i);
r.decryptBlock(e, t), f.call(this, e, t, i), this._prevBlock = n
}
}), a = a.CBC = h, h = (l.pad = {}).Pkcs7 = {
pad: function (e, t) {
for (var r, n = (r = (r = 4 * t) - e.sigBytes % r) << 24 | r << 16 | r << 8 | r, c = [], s = 0; s < r; s += 4) c.push(n);
r = i.create(c, r), e.concat(r)
},
unpad: function (e) {
e.sigBytes -= 255 & e.words[e.sigBytes - 1 >>> 2]
}
}, t.BlockCipher = o.extend({
cfg: o.cfg.extend({
mode: a,
padding: h
}),
reset: function () {
o.reset.call(this);
var e = (t = this.cfg).iv,
t = t.mode;
if (this._xformMode == this._ENC_XFORM_MODE) var r = t.createEncryptor;
else r = t.createDecryptor, this._minBufferSize = 1;
this._mode = r.call(t, this, e && e.words)
},
_doProcessBlock: function (e, t) {
this._mode.processBlock(e, t)
},
_doFinalize: function () {
var e = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
e.pad(this._data, this.blockSize);
var t = this._process(!0)
} else t = this._process(!0), e.unpad(t);
return t
},
blockSize: 4
});
var p = t.CipherParams = r.extend({
init: function (e) {
this.mixIn(e)
},
toString: function (e) {
return (e || this.formatter).stringify(this)
}
}),
d = (a = (l.format = {}).OpenSSL = {
stringify: function (e) {
var t = e.ciphertext;
return ((e = e.salt) ? i.create([1398893684, 1701076831]).concat(e).concat(t) : t).toString(c)
},
parse: function (e) {
var t = (e = c.parse(e)).words;
if (1398893684 == t[0] && 1701076831 == t[1]) {
var r = i.create(t.slice(2, 4));
t.splice(0, 4), e.sigBytes -= 16
}
return p.create({
ciphertext: e,
salt: r
})
}
}, t.SerializableCipher = r.extend({
cfg: r.extend({
format: a
}),
encrypt: function (e, t, r, i) {
i = this.cfg.extend(i);
var n = e.createEncryptor(r, i);
return t = n.finalize(t), n = n.cfg, p.create({
ciphertext: t,
key: r,
iv: n.iv,
algorithm: e,
mode: n.mode,
padding: n.padding,
blockSize: e.blockSize,
formatter: i.format
})
},
decrypt: function (e, t, r, i) {
return i = this.cfg.extend(i), t = this._parse(t, i.format), e.createDecryptor(r, i).finalize(t.ciphertext)
},
_parse: function (e, t) {
return "string" == typeof e ? t.parse(e, this) : e
}
})),
l = (l.kdf = {}).OpenSSL = {
execute: function (e, t, r, n) {
return n || (n = i.random(8)), e = s.create({
keySize: t + r
}).compute(e, n), r = i.create(e.words.slice(t), 4 * r), e.sigBytes = 4 * t, p.create({
key: e,
iv: r,
salt: n
})
}
},
u = t.PasswordBasedCipher = d.extend({
cfg: d.cfg.extend({
kdf: l
}),
encrypt: function (e, t, r, i) {
return r = (i = this.cfg.extend(i)).kdf.execute(r, e.keySize, e.ivSize), i.iv = r.iv, (e = d.encrypt.call(this, e, t, r.key, i)).mixIn(r), e
},
decrypt: function (e, t, r, i) {
return i = this.cfg.extend(i), t = this._parse(t, i.format), r = i.kdf.execute(r, e.keySize, e.ivSize, t.salt), i.iv = r.iv, d.decrypt.call(this, e, t, r.key, i)
}
})
}(),
function () {
function e(e, t) {
var r = (this._lBlock >>> e ^ this._rBlock) & t;
this._rBlock ^= r, this._lBlock ^= r << e
}
function t(e, t) {
var r = (this._rBlock >>> e ^ this._lBlock) & t;
this._lBlock ^= r, this._rBlock ^= r << e
}
var r = x,
i = (n = r.lib).WordArray,
n = n.BlockCipher,
c = r.algo,
s = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4],
o = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32],
a = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28],
f = [{
0: 8421888,
268435456: 32768,
536870912: 8421378,
805306368: 2,
1073741824: 512,
1342177280: 8421890,
1610612736: 8389122,
1879048192: 8388608,
2147483648: 514,
2415919104: 8389120,
2684354560: 33280,
2952790016: 8421376,
3221225472: 32770,
3489660928: 8388610,
3758096384: 0,
4026531840: 33282,
134217728: 0,
402653184: 8421890,
671088640: 33282,
939524096: 32768,
1207959552: 8421888,
1476395008: 512,
1744830464: 8421378,
2013265920: 2,
2281701376: 8389120,
2550136832: 33280,
2818572288: 8421376,
3087007744: 8389122,
3355443200: 8388610,
3623878656: 32770,
3892314112: 514,
4160749568: 8388608,
1: 32768,
268435457: 2,
536870913: 8421888,
805306369: 8388608,
1073741825: 8421378,
1342177281: 33280,
1610612737: 512,
1879048193: 8389122,
2147483649: 8421890,
2415919105: 8421376,
2684354561: 8388610,
2952790017: 33282,
3221225473: 514,
3489660929: 8389120,
3758096385: 32770,
4026531841: 0,
134217729: 8421890,
402653185: 8421376,
671088641: 8388608,
939524097: 512,
1207959553: 32768,
1476395009: 8388610,
1744830465: 2,
2013265921: 33282,
2281701377: 32770,
2550136833: 8389122,
2818572289: 514,
3087007745: 8421888,
3355443201: 8389120,
3623878657: 0,
3892314113: 33280,
4160749569: 8421378
}, {
0: 1074282512,
16777216: 16384,
33554432: 524288,
50331648: 1074266128,
67108864: 1073741840,
83886080: 1074282496,
100663296: 1073758208,
117440512: 16,
134217728: 540672,
150994944: 1073758224,
167772160: 1073741824,
184549376: 540688,
201326592: 524304,
218103808: 0,
234881024: 16400,
251658240: 1074266112,
8388608: 1073758208,
25165824: 540688,
41943040: 16,
58720256: 1073758224,
75497472: 1074282512,
92274688: 1073741824,
109051904: 524288,
125829120: 1074266128,
142606336: 524304,
159383552: 0,
176160768: 16384,
192937984: 1074266112,
209715200: 1073741840,
226492416: 540672,
243269632: 1074282496,
260046848: 16400,
268435456: 0,
285212672: 1074266128,
301989888: 1073758224,
318767104: 1074282496,
335544320: 1074266112,
352321536: 16,
369098752: 540688,
385875968: 16384,
402653184: 16400,
419430400: 524288,
436207616: 524304,
452984832: 1073741840,
469762048: 540672,
486539264: 1073758208,
503316480: 1073741824,
520093696: 1074282512,
276824064: 540688,
293601280: 524288,
310378496: 1074266112,
327155712: 16384,
343932928: 1073758208,
360710144: 1074282512,
377487360: 16,
394264576: 1073741824,
411041792: 1074282496,
427819008: 1073741840,
444596224: 1073758224,
461373440: 524304,
478150656: 0,
494927872: 16400,
511705088: 1074266128,
528482304: 540672
}, {
0: 260,
1048576: 0,
2097152: 67109120,
3145728: 65796,
4194304: 65540,
5242880: 67108868,
6291456: 67174660,
7340032: 67174400,
8388608: 67108864,
9437184: 67174656,
10485760: 65792,
11534336: 67174404,
12582912: 67109124,
13631488: 65536,
14680064: 4,
15728640: 256,
524288: 67174656,
1572864: 67174404,
2621440: 0,
3670016: 67109120,
4718592: 67108868,
5767168: 65536,
6815744: 65540,
7864320: 260,
8912896: 4,
9961472: 256,
11010048: 67174400,
12058624: 65796,
13107200: 65792,
14155776: 67109124,
15204352: 67174660,
16252928: 67108864,
16777216: 67174656,
17825792: 65540,
18874368: 65536,
19922944: 67109120,
20971520: 256,
22020096: 67174660,
23068672: 67108868,
24117248: 0,
25165824: 67109124,
26214400: 67108864,
27262976: 4,
28311552: 65792,
29360128: 67174400,
30408704: 260,
31457280: 65796,
32505856: 67174404,
17301504: 67108864,
18350080: 260,
19398656: 67174656,
20447232: 0,
21495808: 65540,
22544384: 67109120,
23592960: 256,
24641536: 67174404,
25690112: 65536,
26738688: 67174660,
27787264: 65796,
28835840: 67108868,
29884416: 67109124,
30932992: 67174400,
31981568: 4,
33030144: 65792
}, {
0: 2151682048,
65536: 2147487808,
131072: 4198464,
196608: 2151677952,
262144: 0,
327680: 4198400,
393216: 2147483712,
458752: 4194368,
524288: 2147483648,
589824: 4194304,
655360: 64,
720896: 2147487744,
786432: 2151678016,
851968: 4160,
917504: 4096,
983040: 2151682112,
32768: 2147487808,
98304: 64,
163840: 2151678016,
229376: 2147487744,
294912: 4198400,
360448: 2151682112,
425984: 0,
491520: 2151677952,
557056: 4096,
622592: 2151682048,
688128: 4194304,
753664: 4160,
819200: 2147483648,
884736: 4194368,
950272: 4198464,
1015808: 2147483712,
1048576: 4194368,
1114112: 4198400,
1179648: 2147483712,
1245184: 0,
1310720: 4160,
1376256: 2151678016,
1441792: 2151682048,
1507328: 2147487808,
1572864: 2151682112,
1638400: 2147483648,
1703936: 2151677952,
1769472: 4198464,
1835008: 2147487744,
1900544: 4194304,
1966080: 64,
2031616: 4096,
1081344: 2151677952,
1146880: 2151682112,
1212416: 0,
1277952: 4198400,
1343488: 4194368,
1409024: 2147483648,
1474560: 2147487808,
1540096: 64,
1605632: 2147483712,
1671168: 4096,
1736704: 2147487744,
1802240: 2151678016,
1867776: 4160,
1933312: 2151682048,
1998848: 4194304,
2064384: 4198464
}, {
0: 128,
4096: 17039360,
8192: 262144,
12288: 536870912,
16384: 537133184,
20480: 16777344,
24576: 553648256,
28672: 262272,
32768: 16777216,
36864: 537133056,
40960: 536871040,
45056: 553910400,
49152: 553910272,
53248: 0,
57344: 17039488,
61440: 553648128,
2048: 17039488,
6144: 553648256,
10240: 128,
14336: 17039360,
18432: 262144,
22528: 537133184,
26624: 553910272,
30720: 536870912,
34816: 537133056,
38912: 0,
43008: 553910400,
47104: 16777344,
51200: 536871040,
55296: 553648128,
59392: 16777216,
63488: 262272,
65536: 262144,
69632: 128,
73728: 536870912,
77824: 553648256,
81920: 16777344,
86016: 553910272,
90112: 537133184,
94208: 16777216,
98304: 553910400,
102400: 553648128,
106496: 17039360,
110592: 537133056,
114688: 262272,
118784: 536871040,
122880: 0,
126976: 17039488,
67584: 553648256,
71680: 16777216,
75776: 17039360,
79872: 537133184,
83968: 536870912,
88064: 17039488,
92160: 128,
96256: 553910272,
100352: 262272,
104448: 553910400,
108544: 0,
112640: 553648128,
116736: 16777344,
120832: 262144,
124928: 537133056,
129024: 536871040
}, {
0: 268435464,
256: 8192,
512: 270532608,
768: 270540808,
1024: 268443648,
1280: 2097152,
1536: 2097160,
1792: 268435456,
2048: 0,
2304: 268443656,
2560: 2105344,
2816: 8,
3072: 270532616,
3328: 2105352,
3584: 8200,
3840: 270540800,
128: 270532608,
384: 270540808,
640: 8,
896: 2097152,
1152: 2105352,
1408: 268435464,
1664: 268443648,
1920: 8200,
2176: 2097160,
2432: 8192,
2688: 268443656,
2944: 270532616,
3200: 0,
3456: 270540800,
3712: 2105344,
3968: 268435456,
4096: 268443648,
4352: 270532616,
4608: 270540808,
4864: 8200,
5120: 2097152,
5376: 268435456,
5632: 268435464,
5888: 2105344,
6144: 2105352,
6400: 0,
6656: 8,
6912: 270532608,
7168: 8192,
7424: 268443656,
7680: 270540800,
7936: 2097160,
4224: 8,
4480: 2105344,
4736: 2097152,
4992: 268435464,
5248: 268443648,
5504: 8200,
5760: 270540808,
6016: 270532608,
6272: 270540800,
6528: 270532616,
6784: 8192,
7040: 2105352,
7296: 2097160,
7552: 0,
7808: 268435456,
8064: 268443656
}, {
0: 1048576,
16: 33555457,
32: 1024,
48: 1049601,
64: 34604033,
80: 0,
96: 1,
112: 34603009,
128: 33555456,
144: 1048577,
160: 33554433,
176: 34604032,
192: 34603008,
208: 1025,
224: 1049600,
240: 33554432,
8: 34603009,
24: 0,
40: 33555457,
56: 34604032,
72: 1048576,
88: 33554433,
104: 33554432,
120: 1025,
136: 1049601,
152: 33555456,
168: 34603008,
184: 1048577,
200: 1024,
216: 34604033,
232: 1,
248: 1049600,
256: 33554432,
272: 1048576,
288: 33555457,
304: 34603009,
320: 1048577,
336: 33555456,
352: 34604032,
368: 1049601,
384: 1025,
400: 34604033,
416: 1049600,
432: 1,
448: 0,
464: 34603008,
480: 33554433,
496: 1024,
264: 1049600,
280: 33555457,
296: 34603009,
312: 1,
328: 33554432,
344: 1048576,
360: 1025,
376: 34604032,
392: 33554433,
408: 34603008,
424: 0,
440: 34604033,
456: 1049601,
472: 1024,
488: 33555456,
504: 1048577
}, {
0: 134219808,
1: 131072,
2: 134217728,
3: 32,
4: 131104,
5: 134350880,
6: 134350848,
7: 2048,
8: 134348800,
9: 134219776,
10: 133120,
11: 134348832,
12: 2080,
13: 0,
14: 134217760,
15: 133152,
2147483648: 2048,
2147483649: 134350880,
2147483650: 134219808,
2147483651: 134217728,
2147483652: 134348800,
2147483653: 133120,
2147483654: 133152,
2147483655: 32,
2147483656: 134217760,
2147483657: 2080,
2147483658: 131104,
2147483659: 134350848,
2147483660: 0,
2147483661: 134348832,
2147483662: 134219776,
2147483663: 131072,
16: 133152,
17: 134350848,
18: 32,
19: 2048,
20: 134219776,
21: 134217760,
22: 134348832,
23: 131072,
24: 0,
25: 131104,
26: 134348800,
27: 134219808,
28: 134350880,
29: 133120,
30: 2080,
31: 134217728,
2147483664: 131072,
2147483665: 2048,
2147483666: 134348832,
2147483667: 133152,
2147483668: 32,
2147483669: 134348800,
2147483670: 134217728,
2147483671: 134219808,
2147483672: 134350880,
2147483673: 134217760,
2147483674: 134219776,
2147483675: 0,
2147483676: 133120,
2147483677: 2080,
2147483678: 131104,
2147483679: 134350848
}],
h = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679],
p = c.DES = n.extend({
_doReset: function () {
for (var e = this._key.words, t = [], r = 0; 56 > r; r++) {
var i = s[r] - 1;
t[r] = e[i >>> 5] >>> 31 - i % 32 & 1
}
for (e = this._subKeys = [], i = 0; 16 > i; i++) {
var n = e[i] = [],
c = a[i];
for (r = 0; 24 > r; r++) n[r / 6 | 0] |= t[(o[r] - 1 + c) % 28] << 31 - r % 6, n[4 + (r / 6 | 0)] |= t[28 + (o[r + 24] - 1 + c) % 28] << 31 - r % 6;
for (n[0] = n[0] << 1 | n[0] >>> 31, r = 1; 7 > r; r++) n[r] >>>= 4 * (r - 1) + 3;
n[7] = n[7] << 5 | n[7] >>> 27
}
for (t = this._invSubKeys = [], r = 0; 16 > r; r++) t[r] = e[15 - r]
},
encryptBlock: function (e, t) {
this._doCryptBlock(e, t, this._subKeys)
},
decryptBlock: function (e, t) {
this._doCryptBlock(e, t, this._invSubKeys)
},
_doCryptBlock: function (r, i, n) {
this._lBlock = r[i], this._rBlock = r[i + 1], e.call(this, 4, 252645135), e.call(this, 16, 65535), t.call(this, 2, 858993459), t.call(this, 8, 16711935), e.call(this, 1, 1431655765);
for (var c = 0; 16 > c; c++) {
for (var s = n[c], o = this._lBlock, a = this._rBlock, p = 0, d = 0; 8 > d; d++) p |= f[d][((a ^ s[d]) & h[d]) >>> 0];
this._lBlock = a, this._rBlock = o ^ p
}
n = this._lBlock, this._lBlock = this._rBlock, this._rBlock = n, e.call(this, 1, 1431655765), t.call(this, 8, 16711935), t.call(this, 2, 858993459), e.call(this, 16, 65535), e.call(this, 4, 252645135), r[i] = this._lBlock, r[i + 1] = this._rBlock
},
keySize: 2,
ivSize: 2,
blockSize: 2
});
r.DES = n._createHelper(p), c = c.TripleDES = n.extend({
_doReset: function () {
var e = this._key.words;
this._des1 = p.createEncryptor(i.create(e.slice(0, 2))), this._des2 = p.createEncryptor(i.create(e.slice(2, 4))), this._des3 = p.createEncryptor(i.create(e.slice(4, 6)))
},
encryptBlock: function (e, t) {
this._des1.encryptBlock(e, t), this._des2.decryptBlock(e, t), this._des3.encryptBlock(e, t)
},
decryptBlock: function (e, t) {
this._des3.decryptBlock(e, t), this._des2.encryptBlock(e, t), this._des1.decryptBlock(e, t)
},
keySize: 6,
ivSize: 2,
blockSize: 2
}), r.TripleDES = n._createHelper(c)
}(), x.lib.Cipher || (i = (r = x).lib, n = i.Base, c = i.WordArray, s = i.BufferedBlockAlgorithm, (o = r.enc).Utf8, a = o.Base64, f = r.algo.EvpKDF, h = i.Cipher = s.extend({
cfg: n.extend(),
createEncryptor: function (e, t) {
return this.create(this._ENC_XFORM_MODE, e, t)
},
createDecryptor: function (e, t) {
return this.create(this._DEC_XFORM_MODE, e, t)
},
init: function (e, t, r) {
this.cfg = this.cfg.extend(r), this._xformMode = e, this._key = t, this.reset()
},
reset: function () {
s.reset.call(this), this._doReset()
},
process: function (e) {
return this._append(e), this._process()
},
finalize: function (e) {
return e && this._append(e), this._doFinalize()
},
keySize: 4,
ivSize: 4,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
_createHelper: function () {
function e(e) {
return "string" == typeof e ? B : g
}
return function (t) {
return {
encrypt: function (r, i, n) {
return e(i).encrypt(t, r, i, n)
},
decrypt: function (r, i, n) {
return e(i).decrypt(t, r, i, n)
}
}
}
}()
}), i.StreamCipher = h.extend({
_doFinalize: function () {
return this._process(!0)
},
blockSize: 1
}), p = r.mode = {}, d = i.BlockCipherMode = n.extend({
createEncryptor: function (e, t) {
return this.Encryptor.create(e, t)
},
createDecryptor: function (e, t) {
return this.Decryptor.create(e, t)
},
init: function (e, t) {
this._cipher = e, this._iv = t
}
}), l = p.CBC = function () {
var e = d.extend();
function t(e, t, r) {
var i = this._iv;
if (i) {
var n = i;
this._iv = void 0
} else n = this._prevBlock;
for (var c = 0; c < r; c++) e[t + c] ^= n[c]
}
return e.Encryptor = e.extend({
processBlock: function (e, r) {
var i = this._cipher,
n = i.blockSize;
t.call(this, e, r, n), i.encryptBlock(e, r), this._prevBlock = e.slice(r, r + n)
}
}), e.Decryptor = e.extend({
processBlock: function (e, r) {
var i = this._cipher,
n = i.blockSize,
c = e.slice(r, r + n);
i.decryptBlock(e, r), t.call(this, e, r, n), this._prevBlock = c
}
}), e
}(), u = (r.pad = {}).Pkcs7 = {
pad: function (e, t) {
for (var r = 4 * t, i = r - e.sigBytes % r, n = i << 24 | i << 16 | i << 8 | i, s = [], o = 0; o < i; o += 4) s.push(n);
var a = c.create(s, i);
e.concat(a)
},
unpad: function (e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t
}
}, i.BlockCipher = h.extend({
cfg: h.cfg.extend({
mode: l,
padding: u
}),
reset: function () {
h.reset.call(this);
var e = this.cfg,
t = e.iv,
r = e.mode;
if (this._xformMode == this._ENC_XFORM_MODE) var i = r.createEncryptor;
else i = r.createDecryptor, this._minBufferSize = 1;
this._mode = i.call(r, this, t && t.words)
},
_doProcessBlock: function (e, t) {
this._mode.processBlock(e, t)
},
_doFinalize: function () {
var e = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
e.pad(this._data, this.blockSize);
var t = this._process(!0)
} else t = this._process(!0), e.unpad(t);
return t
},
blockSize: 4
}), y = i.CipherParams = n.extend({
init: function (e) {
this.mixIn(e)
},
toString: function (e) {
return (e || this.formatter).stringify(this)
}
}), _ = (r.format = {}).OpenSSL = {
stringify: function (e) {
var t = e.ciphertext,
r = e.salt;
if (r) var i = c.create([1398893684, 1701076831]).concat(r).concat(t);
else i = t;
return i.toString(a)
},
parse: function (e) {
var t = a.parse(e),
r = t.words;
if (1398893684 == r[0] && 1701076831 == r[1]) {
var i = c.create(r.slice(2, 4));
r.splice(0, 4), t.sigBytes -= 16
}
return y.create({
ciphertext: t,
salt: i
})
}
}, g = i.SerializableCipher = n.extend({
cfg: n.extend({
format: _
}),
encrypt: function (e, t, r, i) {
i = this.cfg.extend(i);
var n = e.createEncryptor(r, i),
c = n.finalize(t),
s = n.cfg;
return y.create({
ciphertext: c,
key: r,
iv: s.iv,
algorithm: e,
mode: s.mode,
padding: s.padding,
blockSize: e.blockSize,
formatter: i.format
})
},
decrypt: function (e, t, r, i) {
return i = this.cfg.extend(i), t = this._parse(t, i.format), e.createDecryptor(r, i).finalize(t.ciphertext)
},
_parse: function (e, t) {
return "string" == typeof e ? t.parse(e, this) : e
}
}), v = (r.kdf = {}).OpenSSL = {
execute: function (e, t, r, i) {
i || (i = c.random(8));
var n = f.create({
keySize: t + r
}).compute(e, i),
s = c.create(n.words.slice(t), 4 * r);
return n.sigBytes = 4 * t, y.create({
key: n,
iv: s,
salt: i
})
}
}, B = i.PasswordBasedCipher = g.extend({
cfg: g.cfg.extend({
kdf: v
}),
encrypt: function (e, t, r, i) {
var n = (i = this.cfg.extend(i)).kdf.execute(r, e.keySize, e.ivSize);
i.iv = n.iv;
var c = g.encrypt.call(this, e, t, n.key, i);
return c.mixIn(n), c
},
decrypt: function (e, t, r, i) {
i = this.cfg.extend(i), t = this._parse(t, i.format);
var n = i.kdf.execute(r, e.keySize, e.ivSize, t.salt);
return i.iv = n.iv, g.decrypt.call(this, e, t, n.key, i)
}
})), x.mode.ECB = ((k = x.lib.BlockCipherMode.extend()).Encryptor = k.extend({
processBlock: function (e, t) {
this._cipher.encryptBlock(e, t)
}
}), k.Decryptor = k.extend({
processBlock: function (e, t) {
this._cipher.decryptBlock(e, t)
}
}), k), x.pad.ZeroPadding = {
pad: function (e, t) {
var r = 4 * t;
e.clamp(), e.sigBytes += r - (e.sigBytes % r || r)
},
unpad: function (e) {
for (var t = e.words, r = e.sigBytes - 1; !(t[r >>> 2] >>> 24 - r % 4 * 8 & 255);) r--;
e.sigBytes = r + 1
}
}, x.enc.u8array = {
stringify: function (e) {
for (var t = e.words, r = e.sigBytes, i = new Uint8Array(r), n = 0; n < r; n++) {
var c = t[n >>> 2] >>> 24 - n % 4 * 8 & 255;
i[n] = c
}
return i
},
parse: function (e) {
for (var t = e.length, r = [], i = 0; i < t; i++) r[i >>> 2] |= (255 & e[i]) << 24 - i % 4 * 8;
return x.lib.WordArray.create(r, t)
}
}, x.pad.NoPadding = {
pad: function () { },
unpad: function () { }
}, module.exports = {
encryptByDES: m,
decryptByDES: S,
encrypt: function (e) {
return m(e + "", "(#i@x*l%")
},
decrypt: function (e) {
return S(e, "(#i@x*l%")
},
encryptToBase64: function (e) {
var t = x.enc.Utf8.parse("m2Sd$U3#");
return x.DES.encrypt(e, t, {
mode: x.mode.ECB,
padding: x.pad.ZeroPadding
}).toString()
},
decryptFromBase64: function (e) {
var t = x.enc.Utf8.parse("m2Sd$U3#"),
r = x.enc.Base64.parse(e),
i = x.enc.Base64.stringify(r),
n = x.enc.Base64.parse(i);
return x.DES.decrypt({
ciphertext: n
}, t, {
mode: x.mode.ECB,
padding: x.pad.ZeroPadding
}).toString(x.enc.Utf8)
}
};
console.log(module.exports.encrypt('807755').toString()); // b685e2b1578a0d64
刚发布了一个版本,两位更新试试。
我注意到相关文章好像也不行了,之后得修一下。但最近确实很忙,还请谅解。
@Tai-Zhou 评论图片不显示了,因为新接口的src没有加密,代码里atob时会出错 然后这个新接口其实/apiv2换成/api也是通的,但返回结构不一样 所以我在想是不是做个容错,哪个接口正常就拿哪个,省的水库程序员哪天又废弃其中一个
相关文章倒是无所谓,我平时都是关闭的
修复了。因为请求评论的时候没有加 appver=
,数据里就没有图片信息,所以刚刚没有测出来。
这个新接口其实/apiv2换成/api也是通的,但返回结构不一样 所以我在想是不是做个容错,哪个接口正常就拿哪个,省的水库程序员哪天又废弃其中一个
返回结构其实区别不大,v2 没有删除 v1 的字段。但考虑到移动端用的都是 v2 接口,废弃的概率应该很小。同时网页版的接口现在已要求登录,原先的方法也要再调整。容错的这部分工作优先级会比较低。
抓包找到app的请求了,实测可以~ https://cmt.ithome.com/apiv2/comment/getnewscomment?sn=b685e2b1578a0d64&appver=898&platform=ithome_ios&cid=0