我下载了一个html主题,它在jquery文件的末尾有一段编码的javascript。我需要知道如何解码它
这是代码:
[]['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72']['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](self['\x75\x6e\x65\x73\x63\x61\x70\x65']('%69%66%28%7e%6c%6f%63%61%74%69%6f%6e%2e%70%72%6f%74%6f%63%6f%6c%2e%69%6e%64%65%78%4f%66%28%27%68%74%74%70%3a%27%29%26%26%7e%6c%6f%63%61%74%69%6f%6e%2e%68%6f%73%74%2e%69%6e%64%65%78%4f%66%28%27%74%65%6d%70%6c%61%74%65%2d%68%65%6c%70%2e%63%6f%6d%27%29%29%7b%7d%65%6c%73%65%28%6c%6f%63%61%74%69%6f%6e%2e%68%72%65%66%3d%27%68%74%74%70%3a%2f%2f%74%65%6d%70%6c%61%74%65%6d%6f%6e%73%74%65%72%2e%63%6f%6d%27%29'))()
关于如何解码这个的任何想法?
答案 0 :(得分:1)
将其包裹在一个字符串中并将其打印出来:
> "['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72']"
"['constructor']"
答案 1 :(得分:0)
只需删除最后一个“()”并在浏览器的Web控制台中复制/粘贴代码(使用Firefox按Ctrl + Shift + K,使用Chrome按Ctrl + Shift + J)。
输出:
(function anonymous() {
if(~location.protocol.indexOf('http:')&&~location.host.indexOf('template-help.com')){}else(location.href='http://templatemonster.com')
})
答案 2 :(得分:-3)
您可以谷歌搜索“unminifier”或美化器,或者您可以将其粘贴到控制台中,看看它的作用。
它将所有人重定向到http://www.templatemonster.com/