我在JavaScript中使用此代码:
[(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+
(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+
(!![]+[])[+!+[]]]
在控制台中,它将返回
Array [ "filter" ]
我如何解码许多与上述文字类似的文字? E.g:
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+
(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+
([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+
(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+
(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+
(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+
([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+
(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+
(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+
(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+
([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+
(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]
我希望看到简单的脚本。
答案 0 :(得分:11)
我已经看到很多解码尝试,但没有一个可靠地工作。我发现解码非字母数字Javascript的最简单方法是使用Chrome。
打开Chrome>转到jsfuck.com>粘贴您要在窗口中解码的代码>点击Run This。
然后打开控制台,如果您的specific code from PasteBin会出现错误:
Uncaught TypeError: Cannot read property 'innerHTML' of null
在错误的右侧,单击行号链接,将显示代码。结果是:
(function(){
window.false=document.getElementById('sc').innerHTML;
})
这解释了为什么在尝试使用JSFuck本身解码它时会出现错误。
在其网站上没有标识为sc
的元素。
答案 1 :(得分:5)
您可以使用此网站解码jsfuck: http://codertab.com/jsunfuck
已更新 我从上面的URL中提取了解码javascript,这就是解码过程的工作原理:(javascript)
s = source.slice(0,source.length - 2); txtResult = eval(s);
希望有所帮助!
答案 2 :(得分:1)
let elem = yourJSFuck
function decode(elem) {
return (/\n(.+)/.exec(eval(elem.replace(/\s+/, "").slice(0, -2)))[1]);
}
console.log(decode(elem))
这应该有用,来源是this page