V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
hahaha888
V2EX  ›  问与答

这种 js 混肴代码怎么反混肴,!+[]+!![]+[]...

  •  
  •   hahaha888 · 2016-12-01 14:24:00 +08:00 · 2477 次点击
    这是一个创建于 2709 天前的主题,其中的信息可能已经有所发展或是发生改变。
    完整的代码是这样的,以前好像有看到过哪里可以发混肴的,一时想不起来了。
    (function(){
    var a = function() {try{return !!window.addEventListener} catch(e) {return !1} },
    b = function(b, c) {a() ? document.addEventListener("DOMContentLoaded", b, c) : document.attachEvent("onreadystatechange", b)};
    b(function(){
    var a = document.getElementById('cf-content');a.style.display = 'block';
    setTimeout(function(){
    var s,t,o,p,b,r,e,a,k,i,n,g,f, VTDktxa={"bNdVqScWyCy":+((!+[]+!![]+[])+(!+[]+!![]))};
    t = document.createElement('div');
    t.innerHTML="<a href='/'>x</a>";
    t = t.firstChild.href;r = t.match(/https?:\/\//)[0];
    t = t.substr(r.length); t = t.substr(0,t.length-1);
    a = document.getElementById('jschl-answer');
    f = document.getElementById('challenge-form');
    ;VTDktxa.bNdVqScWyCy-=+((!+[]+!![]+!![]+[])+(!+[]+!![]));VTDktxa.bNdVqScWyCy+=+((!+[]+!![]+[])+(!+[]+!![]+!![]+!![]));VTDktxa.bNdVqScWyCy+=!+[]+!![]+!![]+!![]+!![]+!![]+!![];VTDktxa.bNdVqScWyCy*=+!![];a.value = parseInt(VTDktxa.bNdVqScWyCy, 10) + t.length; '; 121'
    f.submit();
    }, 4000);
    }, false);
    })();
    3 条回复    2016-12-01 15:05:26 +08:00
    nfroot
        1
    nfroot  
       2016-12-01 14:55:35 +08:00
    代码短的话自己执行一下表达式 替换下内容就可以了

    我只想知道这玩意叫什么加密 搜索搜不出相关的内容
    shiji
        2
    shiji  
       2016-12-01 15:01:49 +08:00 via Android   ❤️ 1
    @nfroot 我印象里见过两个,比较出名的叫 jsfuck ,还有一个乌云曾经提到过叫 jother 。原理基本都差不多

    这个算是编码,本质上达不到混淆效果,试试 alert 或者 console.log 就能解码。

    这好像是网络安全竞赛的基础知识。什么 ctf 之类的
    suinia
        3
    suinia  
       2016-12-01 15:05:26 +08:00
    看起来好像没混淆
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   800 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:20 · PVG 06:20 · LAX 15:20 · JFK 18:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.