js安全介绍

秘钥加密

通过iVbwQXxFy中前 4 个字符,产生加密串VwbiQVbbbQVbwwQVbVVQVwiiQVwbiQbwwQVwiVQwibQwVwQwbVQwVVQwVVQwibQwbiQwVwQwVVQwibQwVVQwbiQwbVQwViQwiwQwViQwbbQwbVQwVbQwVbQwwbQbiwQVwbiQVbibQVbiwQVbViQwViQVbVVQwVVQwbbQbiwQ

加密算法,输出结果如上:

1

解码算法,输出结果为:wabc3d49

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function changeFunc(d, e, f) {
var array = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/'.split('')
var h = array.slice(0, e)
var i = array.slice(0, f)
var j = d['split']('')
['reverse']()
['reduce'](function (a, b, c) {
if (h['indexOf'](b) !== -1) return (a += h['indexOf'](b) * Math['pow'](e, c))
}, 0)
var k = ''
while (j > 0) {
k = i[j % f] + k
j = (j - (j % f)) / f
}
return k || '0'
}
eval(
(function (h, u, n, t, e, r) {
r = ''
for (var i = 0, len = h.length; i < len; i++) {
var s = ''
while (h[i] !== n[e]) {
s += h[i]
i++
}
for (var j = 0; j < n.length; j++) s = s.replace(new RegExp(n[j], 'g'), j)
r += String.fromCharCode(changeFunc(s, e, 10) - t)
}
return decodeURIComponent(escape(r))
})(
'VwbiQVbbbQVbwwQVbVVQVwiiQVwbiQbwwQVwiVQwibQwVwQwbVQwVVQwVVQwibQwbiQwVwQwVVQwibQwVVQwbiQwbVQwViQwiwQwViQwbbQwbVQwVbQwVbQwwbQbiwQVwbiQVbibQVbiwQVbViQwViQVbVVQwVVQwbbQbiwQ',
39,
'iVbwQXxFy',
1,
4,
3
)
)

加密算法二

https://www.movable-type.co.uk/scripts/tea.html

在线加密

https://www.sojson.com/javascriptobfuscator.html