如何手动解密此JSON字符串?

时间:2013-01-19 06:52:31

标签: json string encryption

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

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

这是字符串:

调用编译的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,10,32,32,123,13,10,32,3 2,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];

3 个答案:

答案 0 :(得分:1)

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

_geschwitz = call compile preprocessFileLineNumbers“scr \ menu \ menulist \ gilligan.sqf”;

答案 1 :(得分: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(''));

答案 2 :(得分:0)

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

与等效的JavaScript比较:

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

在JavaScript中,可以将eval替换为console.logdocument.write或类似函数来进行反混淆:

<pre id="mycode"></pre>
<script>
document.getElementById('mycode').appendChild(
    document.createTextNode(
        String.fromCharCode(...)
    )
);
</script>