- execjs
- requests
- re
# For Debian or Ubuntu
sudo apt-get install nodejs
pip3 install PyExecJS
pip3 install requests
-
token, sign的提取方式详见百度翻译接口 破解
-
观察觉得,token持续的时间比较短,而gtk持续的时间相对来说比较长。如果查询 https://fanyi.baidu.com/v2transapi 返回998的error则重新获取token即可。
百度翻译 API 破解
# For Debian or Ubuntu
sudo apt-get install nodejs
pip3 install PyExecJS
pip3 install requests
token, sign的提取方式详见百度翻译接口 破解
观察觉得,token持续的时间比较短,而gtk持续的时间相对来说比较长。如果查询 https://fanyi.baidu.com/v2transapi 返回998的error则重新获取token即可。
你好, 我想問一下
因為我短時間連續使用20次以後, 便會出現401 不能使用問題
要等分數鐘才能夠使用
請問有什麼方法可破解401 的問題
謝謝
如题,比如四十行英文,只传回了第一行的翻译
function e(r) {
var o = r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)
if (null === o) {
var t = r.length
t > 30 && (r = '' + r.substr(0, 10) + r.substr(Math.floor(t / 2) - 5, 10) + r.substr(-10, 10))
} else {
for (var e = r.split(/[\uD800-\uDBFF][\uDC00-\uDFFF]/), C = 0, h = e.length, f = []; h > C; C++)'' !== e[C] && f.push.apply(f, a(e[C].split(''))), C !== h - 1 && f.push(o[C])
var g = f.length
g > 30 && (r = f.slice(0, 10).join('') + f.slice(Math.floor(g / 2) - 5, Math.floor(g / 2) + 5).join('') + f.slice(-10).join(''))
} var u = void 0, l = '' + String.fromCharCode(103) + String.fromCharCode(116) + String.fromCharCode(107)
u = null !== i ? i : (i = window[l] || '') || ''
for (var d = u.split('.'), m = Number(d[0]) || 0, s = Number(d[1]) || 0, S = [], c = 0, v = 0; v < r.length; v++) {
var A = r.charCodeAt(v)
128 > A ? S[c++] = A : (2048 > A ? S[c++] = A >> 6 | 192 : (55296 === (64512 & A) && v + 1 < r.length && 56320 === (64512 & r.charCodeAt(v + 1)) ? (A = 65536 + ((1023 & A) << 10) + (1023 & r.charCodeAt(++v)), S[c++] = A >> 18 | 240, S[c++] = A >> 12 & 63 | 128) : S[c++] = A >> 12 | 224, S[c++] = A >> 6 & 63 | 128), S[c++] = 63 & A | 128)
} for (var p = m, F = '' + String.fromCharCode(43) + String.fromCharCode(45) + String.fromCharCode(97) + ('' + String.fromCharCode(94) + String.fromCharCode(43) + String.fromCharCode(54)), D = '' + String.fromCharCode(43) + String.fromCharCode(45) + String.fromCharCode(51) + ('' + String.fromCharCode(94) + String.fromCharCode(43) + String.fromCharCode(98)) + ('' + String.fromCharCode(43) + String.fromCharCode(45) + String.fromCharCode(102)), b = 0; b < S.length; b++)p += S[b], p = n(p, F)
return p = n(p, D), p ^= s, 0 > p && (p = (2147483647 & p) + 2147483648), p %= 1e6, p.toString() + '.' + (p ^ m)
}
内部出现的例如
[\uD800-\uDBFF]
这些字符超过了utf-8的解码范围,直接combine执行提示出错:
'utf-8' codec can't encode character '\ud800'
我只是取巧,把js代码存到一个js文件中,再读取出来,就可以。。很奇怪。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.