发现时 Delph1 写的程序

运行 发现报错信息

IDA加载看不到关键的字符串

但是找到可以的 <script> js标签

尝试 OD 运行 搜索字符串 发现存在 js 代码

然后再 IDA 的code 段也找到了 对应的 字符串

里面有一个 ckpswd() 函数

运行后 用 spy++ 查看文件的 窗口属性 Internet Explorer_Server

将程序里面存在的 script 代码copy下来

function test(x) {
    return 'test code is: ' + x + ';\\n by simpower91';
}
//-----------------------------------------------

function $(x) {
    return document.getElementById(x);
}
//-----------------------------------------------

function sptWBCallback(spt_wb_id, spt_wb_name, optionstr) {
    url = '#sptWBCallback:id=';
    url = url + spt_wb_id + ';eventName=' + spt_wb_name;
    if (optionstr) url = url + ';params=optionstr';
    location = url;
}
//-----------------------------------------------

< input value = ""
id = "pswd"
size = 39 >
    < /input>
<br><br><br>
<input type=button value="checkMyFlag" onclick="ckpswd();"></center >
//-----------------------------------------------

eval(function(p, a, c, k, e, d) {
                e = function(c) {
                    return (c < a ? '': e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
                };
                if (!''.replace(/^/, String)) {
                    while (c--) d[e(c)] = k[c] || e(c);
                    k = [function(e) {
                        return d[e]
                    }];
                    e = function() {
                        return '\\\\w+'
                    };
                    c = 1
                };
                while (c--) if (k[c]) p = p.replace(new RegExp('\\\\b' + e(c) + '\\\\b', 'g'), k[c]);
                return p
            } ('a 6() {    f="n";    3 = 8.5.l.q;    c (3.d(f) ==0) {        g=3.h;        b=f.h;        o(3.p(b,g));    } 9 {        4("r!<" + 3 + "> e j i 2 ;-)");        m "1";    }}a k(){  4("7!");}', 62, 28, '|1234|GUID|a|alert|all|ckpswd|congratulations|document|else|function|i|if|indexOf|is|key|l|length|my|not|ok|pswd|return|simpower91|sptWBCallback|substring|value|wrong'.split('|'), 0, {}))

有一段js 是加了混淆的

我们可以用 浏览器运行 得到原本的代码

evalconsloe.log