须知
网站:https://translate.google.de/
TK对应入口函数:teanslate_m_zh_CN文件/vu函数
TKK对应文件:/index页面,直接搜索TKK值即可
Goolgle翻译的TK值不好找,后来通过网络查找资料最终找到了这段代码
正文
let uu = "441448.2475474917" //TKK的值,可以在/index页面直接搜索到,
su = function(a) {
return function() {
return a
}
},
tu = function(a, b) {
for (var c = 0; c < b.length - 2; c += 3) {
var d = b.charAt(c + 2);
d = "a" <= d ? d.charCodeAt(0) - 87 : Number(d);
d = "+" == b.charAt(c + 1) ? a >>> d : a << d;
a = "+" == b.charAt(c) ? a + d & 4294967295 : a ^ d
}
return a
},
vu = function(a) {
if (null !== uu)
var b = uu;
else {
b = su(String.fromCharCode(84));
var c = su(String.fromCharCode(75));
b = [b(), b()];
b[1] = c();
b = (uu = window[b.join(c())] || "") || ""
}
var d = su(String.fromCharCode(116)); //直接在网页搜索TK的请求参数是搜索不到的,因为这里直接写成了t和k的编码形式
c = su(String.fromCharCode(107));
d = [d(), d()];
d[1] = c();
c = "&" + d.join("") + "="; //这里的值为 &tk=
d = b.split("."); //这里将tkk的值通过 点 进行分割
b = Number(d[0]) || 0;
//后面的就不说了,看不懂,想看懂就先了解位运算吧
for (var e = [], f = 0, g = 0; g < a.length; g++) {
var k = a.charCodeAt(g);
128 > k ? e[f++] = k : (2048 > k ? e[f++] = k >> 6 | 192 : (55296 == (k & 64512) && g + 1 < a.length && 56320 == (a.charCodeAt(g + 1) & 64512) ? (k = 65536 + ((k & 1023) << 10) + (a.charCodeAt(++g) & 1023),
e[f++] = k >> 18 | 240,
e[f++] = k >> 12 & 63 | 128) : e[f++] = k >> 12 | 224,
e[f++] = k >> 6 & 63 | 128),
e[f++] = k & 63 | 128)
}
a = b;
for (f = 0; f < e.length; f++)
a += e[f],
a = tu(a, "+-a^+6");
a = tu(a, "+-3^+b+-f");
a ^= Number(d[1]) || 0;
0 > a && (a = (a & 2147483647) + 2147483648);
a %= 1E6;
return c + (a.toString() + "." + (a ^ b))
}
注意事项
字符串中有一些字符是另起一行的情况,"\n"的编码成为"%0A",但是这个字符输出还是不变,你可以通过 反引号
字符串包括其中,这样就不会改变tk的值计算问题,