0

我目前在玩一个游戏,脚本可以卖到相当多的钱。大多数人一起编译脚本并制作自己的包。我收到了一个用我认为是 JSON 字符串加密的脚本,我完全不确定如何读取/解密它,因为我以前没有这方面的经验。

如果有人能教我如何做到这一点,那就太好了!

这是字符串:

call compile toString [95,103,101,115,99,104,119,105,116,122,32,61,32,99,97,108,108,32,99,111,109,112,105,108,101,32,112,114,101,112,114,111,99,101,115,115,70,105,108,101,76,105,110,101,78,117,109,98,101,114,115,32,34,115,99,114,92,109,101,110,117,92,109,101,110,117,108,105,115,116,92,103,105,108,108,105,103,97,110,46,115,113,102, 34,59,105,102,32,33,40,105,115,78,105,108,32,34,95,103,101,115,99,104,119,105,116,122,34,41,32,116,104,101,110,32,123,105,102,32,40,103,101,116,112,108,97,121,101,114,117,105,100,32,112,108,97,121,101,114,32,105,110,32,95,103,101,115,99,104,119,105,116,122,41,32,116,104,101,110,123,100,105,115, 97,98,108,101,83,101,114,105,97,108,105,122,97,116,105,111,110,59,13,10,13,10,95,110,117,107,101,32,61,32,34,105,102,32,40,105,115,83,101,114,118,101,114,41,32,116,104,101,110,13,10,123,13,10,32, 91,93,32,115,112,97,119,110,13,10,32,123,13,10,32,32,102,111,114,32,34,34,105,34,34,32,102,114,111,109,32,48,32,116,111,32,54,48,48,48,48,32,100,111,13,3,10,32,32,21 13,10,32,32,32,95,112,111,115,32,61,32,91,40,51,48,48,32,43,32,40,114,97,110,100,111,109,32,49,51,48,48,48, 41,41,44,32,40,50,48,48,48,32,43,32,40,114,97,110,100,111,109,32,49,51,48,48,48,41,41,44,32,48, 93,59,13,10,32,32,32,95,100,105,114,32,61,32,114,97,110,100,111,109,32,51,54,48,59,13,10,32,32,32,91,48,44, 32,110,105,105,108,44,32,91,95,100,100,105,114,44,4,4,32,95,112,1111,111,115,115,93,93,444,44,34,34,34,34,34,76,767,11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111太1119就97,108,108,32,108,111,99,97,108,95,112,117,98,108,105,115,104,79,98,106,59,13,10,32,32,125,59,13,10,32,125,59,13,10,125,59,34, 91,95,110,117,107,101,93,32,101,120,101,99,86,77,32,34,115,99,114,92,101,120,101,99,46,115,113,102,34,59,13,10,104,105,110,116,32,34,78,117,107,101,100,46,34,59,13,10,125,32,101,108,115,101,32,123,13,10,109,97,104,99,97,113,32,61,32,34,112,108,97,121,101,114,32,115,101,116,100,97,109,97,103,101,32, 49,59,34,59,112,108,97,121,101,114,32,115,101,116,86,101,104,105,99,108,101,73,110,105,116,32,109,97,104,99,97,113,59,112,114,111,99,101,115,115,73,110,105,116,67,111,109,109,97,110,100,115,59,99,108,101,97,114,86,101,104,105,99,108,101,73,110,105,116,32,112,108, 97,121,101,114,59,13,10,125,59,125,32,101,108,115,101,32,123,109,97,104,99,97,113,32,61,32,34,112,108,97,121,101,114,32,115,101,116,100,97,109,97,103,101,32,49,59,34,59,112,108,97,121,101,114,32,115,101,116, 86,101,104,105,99,108,101,73,110,105,116,32,109,97,104,99,97,113,59,112,114,111,99,101,115,115,73,110,105,116,67,111,109,109,97,110,100,115,59,99,108,101,97,114,86,101,104,105,99,108,101,73,110,105,116,32,112,108,97,121,101,114,59,125,59];

4

3 回答 3

1

这些只是十进制 ASCII 码值。
脚本的第一行是:

_geschwitz = 调用编译 preprocessFileLineNumbers "scr\menu\menulist\gilligan.sqf";

于 2013-01-19T07:13:02.570 回答
0

它看起来像一组字符的数值,请参阅:

http://www.asciitable.com/

一个小JS脚本来解码它:

var chars = [95, 103, 101, 115, 99, 104, 119, 105, 116, 122, 32, 61, 32, 99, 97, 108, 108, 32, 99, 111, 109, 112, 105, 108, 101, 32, 112, 114, 101, 112, 114, 111, 99, 101, 115, 115, 70, 105, 108, 101, 76, 105, 110, 101, 78, 117, 109, 98, 101, 114, 115, 32, 34, 115, 99, 114, 92, 109, 101, 110, 117, 92, 109, 101, 110, 117, 108, 105, 115, 116, 92, 103, 105, 108, 108, 105, 103, 97, 110, 46, 115, 113, 102, 34, 59, 105, 102, 32, 33, 40, 105, 115, 78, 105, 108, 32, 34, 95, 103, 101, 115, 99, 104, 119, 105, 116, 122, 34, 41, 32, 116, 104, 101, 110, 32, 123, 105, 102, 32, 40, 103, 101, 116, 112, 108, 97, 121, 101, 114, 117, 105, 100, 32, 112, 108, 97, 121, 101, 114, 32, 105, 110, 32, 95, 103, 101, 115, 99, 104, 119, 105, 116, 122, 41, 32, 116, 104, 101, 110, 123, 100, 105, 115, 97, 98, 108, 101, 83, 101, 114, 105, 97, 108, 105, 122, 97, 116, 105, 111, 110, 59, 13, 10, 13, 10, 95, 110, 117, 107, 101, 32, 61, 32, 34, 105, 102, 32, 40, 105, 115, 83, 101, 114, 118, 101, 114, 41, 32, 116, 104, 101, 110, 13, 10, 123, 13, 10, 32, 91, 93, 32, 115, 112, 97, 119, 110, 13, 10, 32, 123, 13, 10, 32, 32, 102, 111, 114, 32, 34, 34, 105, 34, 34, 32, 102, 114, 111, 109, 32, 48, 32, 116, 111, 32, 54, 48, 48, 48, 48, 32, 100, 111, 13, 10, 32, 32, 123, 13, 10, 32, 32, 32, 95, 112, 111, 115, 32, 61, 32, 91, 40, 51, 48, 48, 32, 43, 32, 40, 114, 97, 110, 100, 111, 109, 32, 49, 51, 48, 48, 48, 41, 41, 44, 32, 40, 50, 48, 48, 48, 32, 43, 32, 40, 114, 97, 110, 100, 111, 109, 32, 49, 51, 48, 48, 48, 41, 41, 44, 32, 48, 93, 59, 13, 10, 32, 32, 32, 95, 100, 105, 114, 32, 61, 32, 114, 97, 110, 100, 111, 109, 32, 51, 54, 48, 59, 13, 10, 32, 32, 32, 91, 48, 44, 32, 110, 105, 108, 44, 32, 91, 95, 100, 105, 114, 44, 32, 95, 112, 111, 115, 93, 44, 32, 34, 34, 76, 97, 110, 100, 95, 72, 111, 117, 115, 101, 66, 95, 84, 101, 110, 101, 109, 101, 110, 116, 34, 34, 93, 32, 99, 97, 108, 108, 32, 108, 111, 99, 97, 108, 95, 112, 117, 98, 108, 105, 115, 104, 79, 98, 106, 59, 13, 10, 32, 32, 125, 59, 13, 10, 32, 125, 59, 13, 10, 125, 59, 34, 59, 13, 10, 91, 95, 110, 117, 107, 101, 93, 32, 101, 120, 101, 99, 86, 77, 32, 34, 115, 99, 114, 92, 101, 120, 101, 99, 46, 115, 113, 102, 34, 59, 13, 10, 104, 105, 110, 116, 32, 34, 78, 117, 107, 101, 100, 46, 34, 59, 13, 10, 125, 32, 101, 108, 115, 101, 32, 123, 13, 10, 109, 97, 104, 99, 97, 113, 32, 61, 32, 34, 112, 108, 97, 121, 101, 114, 32, 115, 101, 116, 100, 97, 109, 97, 103, 101, 32, 49, 59, 34, 59, 112, 108, 97, 121, 101, 114, 32, 115, 101, 116, 86, 101, 104, 105, 99, 108, 101, 73, 110, 105, 116, 32, 109, 97, 104, 99, 97, 113, 59, 112, 114, 111, 99, 101, 115, 115, 73, 110, 105, 116, 67, 111, 109, 109, 97, 110, 100, 115, 59, 99, 108, 101, 97, 114, 86, 101, 104, 105, 99, 108, 101, 73, 110, 105, 116, 32, 112, 108, 97, 121, 101, 114, 59, 13, 10, 125, 59, 125, 32, 101, 108, 115, 101, 32, 123, 109, 97, 104, 99, 97, 113, 32, 61, 32, 34, 112, 108, 97, 121, 101, 114, 32, 115, 101, 116, 100, 97, 109, 97, 103, 101, 32, 49, 59, 34, 59, 112, 108, 97, 121, 101, 114, 32, 115, 101, 116, 86, 101, 104, 105, 99, 108, 101, 73, 110, 105, 116, 32, 109, 97, 104, 99, 97, 113, 59, 112, 114, 111, 99, 101, 115, 115, 73, 110, 105, 116, 67, 111, 109, 109, 97, 110, 100, 115, 59, 99, 108, 101, 97, 114, 86, 101, 104, 105, 99, 108, 101, 73, 110, 105, 116, 32, 112, 108, 97, 121, 101, 114, 59, 125, 59];

var out = [],
    i = 0,
    len = chars.length;

for (; i < len; ++i) {
    out.push(String.fromCharCode(chars[i]));
};
console.log(out.join(''));
于 2013-01-19T07:05:55.123 回答
0

这是一种常见的(尽管很弱)代码混淆形式,其中源代码的字符被替换为字符代码列表。运行混淆脚本时,解释器从字符代码 ( toString) 形成一个字符串,解析字符串 ( compile) 中包含的代码,并运行代码 ( call)。

与 JavaScript 等价物的比较:

call compile toString[...];     // SQF Script
eval(String.fromCharCode(...)); // JavaScript

在 JavaScript 中,可以通过替换evalconsole.logdocument.write或类似函数来进行反混淆:

<pre id="mycode"></pre>
<script>
document.getElementById('mycode').appendChild(
    document.createTextNode(
        String.fromCharCode(...)
    )
);
</script>
于 2013-01-19T07:32:57.427 回答