[
  {
    "path": "NeteaseNpkUnpack/.vscode/launch.json",
    "content": "{\n    // Use IntelliSense to learn about possible attributes.\n    // Hover to view descriptions of existing attributes.\n    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Python: Current File\",\n            \"type\": \"python\",\n            \"request\": \"launch\",\n            \"program\": \"${file}\",\n            \"console\": \"integratedTerminal\",\n            \"args\": [\"/mnt/d/Program Files (x86)/stzb/ui.npk\",\"/mnt/d/npk_ui\"]\n        }\n    ]\n}"
  },
  {
    "path": "NeteaseNpkUnpack/NeteaseNpkUnpack.py",
    "content": "\nimport argparse\n\n\n\nparser = argparse.ArgumentParser(description='Unpack npk file')\nparser.add_argument(\"INPUT_NAME\", help='input file')\nparser.add_argument(\"OUTPUT_DIR\", help='output dir')\nargs = parser.parse_args()\n\n###文件夹//判断 \n\ntry:\n    f = open(args.INPUT_NAME,'rb')\n    s_file = f.read()\n    f.close()\nexcept:\n    print 'Open file failed!'\n    exit()\n\nif args.OUTPUT_DIR[-1:-2] != '/':\n    args.OUTPUT_DIR = args.OUTPUT_DIR + '/'\n\n\ndef byte_to_int(ss):\n    try:\n        a = ord(ss[0])\n        b = ord(ss[1])\n        c = ord(ss[2])\n        d = ord(ss[3])\n    except:\n        return None\n\n    return  a | b << 8 | c << 16 | d << 24\n\n\n\ns_size = s_file[4:8]\ns_size = byte_to_int(s_size)\n\ns_size = (s_size * 8 - s_size) * 4\n\ns_offset = s_file[0x14:0x18]\ns_offset = byte_to_int(s_offset)\n\n\n\n# s_file = byte(s_file, encoding = \"utf8\")\ns_list = s_file[s_offset:s_offset + s_size]\n\ntry:\n    cur_off = 0\n    for i in range(s_size / (4 * 7)):\n        cur_off = i * 4 * 7\n        s_data_off = s_list[cur_off + 4: cur_off + 8]\n        s_data_off = byte_to_int(s_data_off)\n\n        s_size_off = s_list[cur_off + 8: cur_off + 12]\n        s_size_off = byte_to_int(s_size_off)\n\n        f = open(args.OUTPUT_DIR + \"npkdump-\" + str(i),'wb')\n        f.write(s_file[s_data_off:s_data_off + s_size_off])\n        f.close()\nexcept:\n    print 'Decode error'\n\n "
  },
  {
    "path": "NeteaseNxsUnpack/DecodeNetNxs.py",
    "content": "import zlib\nimport argparse  \n\ndef init_rotor():\n    asdf_dn = 'j2h56ogodh3se'\n    asdf_dt = '=dziaq.'\n    asdf_df = '|os=5v7!\"-234'\n    asdf_tm = asdf_dn * 4 + (asdf_dt + asdf_dn + asdf_df) * 5 + '!' + '#' + asdf_dt * 7 + asdf_df * 2 + '*' + '&' + \"'\"\n    import rotor\n    rot = rotor.newrotor(asdf_tm)\n    return rot\n\n\ndef _reverse_string(s):\n    l = list(s)\n    l = map(lambda x: chr(ord(x) ^ 154), l[0:128]) + l[128:]\n    l.reverse()\n    return ''.join(l)\n\n\nparser = argparse.ArgumentParser(description='Decode npk ')\nparser.add_argument(\"INPUT_NAME\", help='input file')\nparser.add_argument(\"OUTPUT_NAME\", help='output file')\nargs = parser.parse_args()\n\nfp = None\ndata = None\ntry:\n    fp = open(args.INPUT_NAME,'rb')\n    data = fp.read()\n    fp.close()\nexcept:\n    print \"File read error\"\n    exit()\nrotor = init_rotor()\ndata = rotor.decrypt(data)\ndata = zlib.decompress(data)\ndata = _reverse_string(data)\n\nfp = open(args.OUTPUT_NAME,'wb')\ndata = fp.write(data)\nfp.close()\n\n#data = marshal.loads(data)"
  },
  {
    "path": "NeteasePycObject/.vscode/launch.json",
    "content": "{\n    // Use IntelliSense to learn about possible attributes.\n    // Hover to view descriptions of existing attributes.\n    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"wsl_c++\",\n            \"type\": \"cppdbg\",\n            \"request\": \"launch\",\n            \"program\": \"${fileDirname}/${fileBasenameNoExtension}\",\n            \"args\": [\"/home/yuan/Desktop/stzb_patch/NeteasePycDecode/npkdump1.pyc\",\"/home/yuan/Desktop/stzb_patch/NeteasePycDecode/npkdump1_main.pyc\",\"0\"],\n            \"stopAtEntry\": false,\n            \"cwd\": \"${workspaceFolder}\",\n            \"environment\": [],\n            \"externalConsole\": false,\n            \"MIMode\": \"gdb\",\n            \"setupCommands\": [\n                {\n                    \"description\": \"Enable pretty-printing for gdb\",\n                    \"text\": \"-enable-pretty-printing\",\n                    \"ignoreFailures\": true\n                }\n            ],\n            \"preLaunchTask\": \"build\",\n            \"miDebuggerPath\": \"/usr/bin/gdb\"\n        }\n    ]\n   \n}"
  },
  {
    "path": "NeteasePycObject/.vscode/settings.json",
    "content": "{\n    \"files.associations\": {\n        \"iostream\": \"cpp\"\n    },\n    \"python.pythonPath\": \"/usr/bin/python\"\n}"
  },
  {
    "path": "NeteasePycObject/.vscode/tasks.json",
    "content": "{\n    // See https://go.microsoft.com/fwlink/?LinkId=733558 \n    // for the documentation about the tasks.json format\n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"type\": \"shell\",\n            \"label\": \"cpp build active file\",\n            \"command\": \"/usr/bin/g++\",\n            \"args\": [\n                \"-g\",\n                \"${file}\",\n                \"-o\",\n                \"${fileDirname}/${fileBasenameNoExtension}\"\n            ],\n            \"options\": {\n                \"cwd\": \"/usr/bin\"\n            },\n            \"problemMatcher\": [\n                \"$gcc\"\n            ],\n            \"group\": \"build\"\n        },\n            {\n                \"label\": \"build\",\n                \"type\": \"shell\",\n                \"group\": {\n                    \"kind\": \"build\",\n                    \"isDefault\": true\n                },\n                \"presentation\": {\n                    \"echo\": true,\n                    \"reveal\": \"silent\",\n                    \"focus\": false,\n                    \"panel\": \"shared\",\n                    \"showReuseMessage\": false,\n                    \"clear\": true,\n                },\n                \"command\": \"g++\",\n                \"args\": [\n                    \"-g\",\n                    \"./${fileBasename}\",\n                    \"-o\",\n                    \"./${fileBasenameNoExtension}\",\n                    \"-std=c++11\"\n                ],\n                \"problemMatcher\": [\n                    \"$gcc\"\n                ]\n            }\n        ]\n}"
  },
  {
    "path": "NeteasePycObject/netpyc.cpp",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <iostream>\n#include <map>\n#include <string.h>\n\nusing namespace std;\n\n#define TYPE_NULL '0'\n#define TYPE_NONE 'N'\n#define TYPE_FALSE 'F'\n#define TYPE_TRUE 'T'\n#define TYPE_STOPITER 'S'\n#define TYPE_ELLIPSIS '.'\n#define TYPE_INT 'i'\n#define TYPE_INT64 'I'\n#define TYPE_FLOAT 'f'\n#define TYPE_COMPLEX 'x'\n#define TYPE_LONG 'l'\n#define TYPE_STRING 's'\n#define TYPE_INTERNED 't'\n#define TYPE_STRINGREF 'R'\n#define TYPE_TUPLE '('\n#define TYPE_LIST '['\n#define TYPE_DICT '{'\n#define TYPE_CODE 'c'\n#define TYPE_UNICODE 'u'\n#define TYPE_UNKNOWN '?'\n#define TYPE_SET '<'\n#define TYPE_FROZENSET '>'\n#define TYPE_UNKNOWNg 'g'\n\nmap<int, int> decrypt_opcode = {{1, 38}, {2, 46}, {3, 37}, {4, 66}, {5, 12}, {10, 35}, {11, 67}, {12, 81}, {13, 32}, {15, 9}, {19, 63}, {20, 70}, {21, 44}, {22, 36}, {23, 39}, {24, 57}, {25, 10}, {26, 52}, {28, 49}, {30, 86}, {31, 87}, {32, 88}, {33, 89}, {40, 24}, {41, 25}, {42, 26}, {43, 27}, {50, 14}, {51, 15}, {52, 16}, {53, 17}, {54, 8}, {55, 21}, {56, 55}, {57, 82}, {58, 34}, {59, 22}, {60, 65}, {61, 6}, {62, 58}, {63, 71}, {64, 43}, {65, 30}, {66, 19}, {67, 5}, {68, 60}, {71, 53}, {72, 42}, {73, 3}, {74, 48}, {75, 84}, {76, 77}, {77, 78}, {78, 85}, {79, 47}, {80, 51}, {81, 54}, {82, 50}, {83, 83}, {84, 74}, {85, 64}, {86, 31}, {87, 72}, {88, 45}, {89, 33}, {90, 145}, {91, 159}, {92, 125}, {93, 149}, {94, 157}, {95, 132}, {96, 95}, {97, 113}, {98, 111}, {99, 138}, {100, 153}, {101, 101}, {102, 135}, {103, 90}, {104, 99}, {105, 151}, {106, 96}, {107, 114}, {108, 134}, {109, 116}, {110, 156}, {111, 105}, {112, 130}, {113, 137}, {114, 148}, {115, 172}, {116, 155}, {119, 103}, {120, 158}, {121, 128}, {122, 110}, {124, 97}, {125, 104}, {126, 118}, {130, 93}, {131, 131}, {132, 136}, {133, 115}, {134, 100}, {135, 120}, {136, 129}, {137, 102}, {140, 140}, {141, 141}, {142, 142}, {143, 94}, {146, 109}, {147, 123}};\n// map<int, int> decrypt_opcode = {{ 101,101 },{ 131,131 },{ 1,38 },{ 116,155 },{ 2,46 },{ 90,145 },{ 97,113 },{ 3,37 },{ 100,153 },{ 4,66 },{ 85,64 },{ 99,138 },{ 33,89 },{ 55,21 },{ 5,12 },{ 43,27 },{ 10,35 },{ 11,67 },{ 12,81 },{ 13,32 },{ 15,9 },{ 19,63 },{ 20,70 },{ 21,44 },{ 22,36 },{ 23,39 },{ 24,57 },{ 25,10 },{ 26,52 },{ 28,49 },{ 30,86 },{ 31,87 },{ 32,88 },{ 40,24 },{ 41,25 },{ 42,26 },{ 50,14 },{ 51,15 },{ 52,16 },{ 53,17 },{ 105,151 },{ 54,8 },{ 56,55 },{ 57,82 },{ 58,34 },{ 59,22 },{ 60,65 },{ 61,6 },{ 62,58 },{ 63,71 },{ 64,43 },{ 65,30 },{ 66,19 },{ 67,5 },{ 120,158 },{ 68,60 },{ 93,149 },{ 113,137 },{ 87,72 },{ 71,53 },{ 72,42 },{ 73,3 },{ 74,48 },{ 75,84 },{ 76,77 },{ 77,78 },{ 78,85 },{ 79,47 },{ 114,148 },{ 80,51 },{ 143,94 },{ 81,54 },{ 88,45 },{ 132,136 },{ 89,33 },{ 108,134 },{ 84,74 },{ 91,159 },{ 92,125 },{ 103,90 },{ 94,157 },{ 95,132 },{ 96,95 },{ 102,135 },{ 104,99 },{ 106,96 },{ 107,114 },{ 109,116 },{ 110,156 },{ 111,105 },{ 112,130 },{ 115,172 },{ 121,128 },{ 119,103 },{ 122,110 },{ 130,93 },{ 133,115 },{ 140,140 },{ 141,141 },{ 142,142 },{ 83,83 },{ 0,0 },{ 149,104 },{ 76,23 },{ 249,119 },{ 0,255 },{ 232,23 },{ 2,0 }};\n\nchar *deal_pycodeobj(char *lp_data);\n\nbool isEnecrypt = false; //为真表示 加密  为假表示解密\n\nchar decode_opcode(int opcode)\n{\n    unsigned char c_ret = 0x00;\n    map<int, int>::iterator iter = decrypt_opcode.begin();\n\n    while (iter != decrypt_opcode.end())\n    {\n        if (isEnecrypt == true)\n        {\n            if (iter->first == opcode)\n            {\n\n                c_ret = iter->second & 0x000000FF;\n                return c_ret;\n            }\n        }\n        else\n        {\n            // c_ret = 0x6A;\n            // if(opcode == 173) return c_ret;\n            if (iter->second == opcode)\n            {\n                c_ret = iter->first & 0x000000FF;\n                return c_ret;\n            }\n        }\n        iter++;\n    }\n\n    return 0xFF;\n}\n\nchar *sub_type(char *lp_data, char type)\n{\n    switch (type)\n    {\n    case TYPE_NULL:\n        break;\n    case TYPE_NONE:\n        break;\n    case TYPE_FALSE:\n        break;\n    case TYPE_TRUE:\n        break;\n    case TYPE_STOPITER:\n        break;\n    case TYPE_ELLIPSIS:\n        break;\n    case TYPE_INT:\n    {\n        lp_data += 4;\n        break;\n    }\n    case TYPE_INT64: // no test\n    {\n        cout << \"TYPE_INT64\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n        lp_data += 8;\n        break;\n    }\n    case TYPE_FLOAT:\n    {\n        cout << \"TYPE_FLOAT\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n        int n_count = 0;\n        char c_count = *(lp_data++);\n        n_count = (int)c_count;\n        lp_data += n_count;\n        break;\n    }\n    case TYPE_COMPLEX: // no test\n    {\n        cout << \"TYPE_COMPLEX\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n        int n_count = 0;\n        char c_count = *(lp_data++);\n        n_count = (int)c_count;\n        lp_data += n_count;\n\n        n_count = 0;\n        c_count = *(lp_data++);\n        n_count = (int)c_count;\n        lp_data += n_count;\n        break;\n    }\n    case TYPE_LONG: // no test\n    {\n        // cout << \"TYPE_LONG\"\n        //      << \" -- >\"\n        //      << \"no test!\" << endl;\n\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n        lp_data +=  n_count * 2;\n        break;\n    }\n\n    case TYPE_STRING:\n    {\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n        lp_data += n_count;\n        break;\n    }\n\n    case TYPE_INTERNED:\n    {\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n        lp_data += n_count;\n        break;\n    }\n\n    case TYPE_STRINGREF:\n    {\n        lp_data += 4;\n        break;\n    }\n\n    case TYPE_TUPLE:\n    {\n        char c = 0x00;\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n        for (int i = 0; i < n_count; i++)\n        {\n            c = *(lp_data++);\n            lp_data = sub_type(lp_data, c);\n        }\n        break;\n    }\n\n    case TYPE_LIST: // no test\n    {\n        cout << \"TYPE_LIST\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n\n        char c = 0x00;\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n        for (int i = 0; i < n_count; i++)\n        {\n            c = *(lp_data++);\n            lp_data = sub_type(lp_data, c);\n        }\n        break;\n    }\n\n    case TYPE_DICT: // no test\n    {\n        cout << \"TYPE_DICT must be error\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n\n        char c = 0x00;\n        while (1)\n        {\n            c = *(lp_data++); //key\n            lp_data = sub_type(lp_data, c);\n\n            if (c == 0x00)\n                break; // need deal\n\n            c = *(lp_data++); // value\n            lp_data = sub_type(lp_data, c);\n        }\n        break;\n    }\n\n    case TYPE_CODE: //need deal\n    {\n        lp_data = deal_pycodeobj(lp_data);\n        break;\n    }\n\n    case TYPE_UNICODE:\n    {\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n        lp_data += n_count;\n        break;\n    }\n\n    case TYPE_UNKNOWN: // no test\n    {\n        cout << \"TYPE_UNKNOWN\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n        break;\n    }\n\n    case TYPE_SET: // no test\n    {\n        cout << \"TYPE_SET\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n\n        char c = 0x00;\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n\n        for (int i = 0; i < n_count; i++)\n        {\n            c = *(lp_data++);\n            lp_data = sub_type(lp_data, c);\n        }\n\n        break;\n    }\n\n    case TYPE_FROZENSET: // no test\n    {\n        cout << \"TYPE_FROZENSET\"\n             << \" -- >\"\n             << \"no test!\" << endl;\n\n        char c = 0x00;\n        int n_count = *(int *)lp_data;\n        lp_data += 4;\n\n        for (int i = 0; i < n_count; i++)\n        {\n            c = *(lp_data++);\n            lp_data = sub_type(lp_data, c);\n        }\n        break;\n    }\n    case TYPE_UNKNOWNg:\n    {\n        lp_data += 8;\n        break;\n    }\n\n    default:\n        cout << \"error type : \" << type << endl;\n        break;\n    }\n    return lp_data;\n}\n\nchar *deal_opcode(char *lp_data)\n{\n    int n_count = *(int *)lp_data;\n    lp_data += 4;\n\n    int n_code = 0x00;\n    for (int i = 0; i < n_count;)\n    {\n        // c_code = lp_data[i];\n        n_code = lp_data[i] & 0x000000FF;\n        unsigned char c = (char)(decode_opcode(n_code) & 0x000000FF);\n        if (c == 0xFF)\n        {\n            cout << \"Error opcode :\" << n_code << endl;\n            i++;\n            continue;\n        }\n\n        lp_data[i] = c;\n\n        if (c < 0x5A)\n            i += 1;\n        else\n            i += 3;\n    }\n\n    lp_data += n_count;\n    return lp_data;\n}\n\nchar *deal_pycodeobj(char *lp_data)\n{\n    lp_data += 4;\n    lp_data += 4;\n    lp_data += 4;\n    lp_data += 4;\n\n    lp_data += 1; // 0x73\n    lp_data = deal_opcode(lp_data);\n\n    char c_type = 0x00;\n    for (int i = 0; i < 9; i++)\n    {\n        if (i == 7)\n        {\n            lp_data += 4;\n            continue;\n        }\n        c_type = *(lp_data++);\n        lp_data = sub_type(lp_data, c_type);\n    }\n    return lp_data;\n}\n\nint main(int argc, char **argv)\n{\n    unsigned char magic_number[8] = {0x03, 0xF3, 0x0D, 0x0A, 0x00, 0x00, 0x00, 0x00};\n    if (argc < 3)\n    {\n        cout << \"arg error\\nnetpyc input_file_name(Maybe absolute path) output_file_name(Maybe absolute path) [is_Encrytry(0,1)(default 0)]\\n\"\n             << endl;\n        return 0;\n    }\n\n    if (argc >= 4)\n    {\n        if (argv[3][0] == '1')\n            isEnecrypt = true;\n    }\n\n    // map<int, int>::iterator iter;\n    // iter = decrypt_opcode.begin();\n    // while (iter != decrypt_opcode.end())\n    // {\n    //     cout << iter->first << \" : \" << iter->second << endl;\n    //     iter++;\n    // }\n\n    // FILE *fp = fopen(\"/home/yuan/Desktop/stzb_patch/NeteasePycDecode/dumpx1.pyc\", \"rb\");\n    FILE *fp = fopen(argv[1], \"rb\"); //打开文件\n    if (fp == NULL)\n    {\n        cout << \"Input file read error\" << endl;\n        return 0;\n    }\n\n    fseek(fp, 0, SEEK_END); //读取文件\n    size_t len = ftell(fp);\n    char *lp_buf = new char[len];\n    // bzero(szBuf,0,len);\n    fseek(fp, 0, SEEK_SET);\n    int iRead = fread(lp_buf, 1, len, fp);\n    fclose(fp);\n\n    // lp_buf += 1; // 0x73\n\n    deal_pycodeobj(lp_buf + 1); //处理文件\n    // isEnecrypt = true;\n\n    // fp = fopen(\"/home/yuan/Desktop/stzb_patch/NeteasePycDecode/dumpx1_main.pyc\", \"wb\");\n    fp = fopen(argv[2], \"wb\");\n    if (fp == NULL)\n    {\n        cout << \"Input file read error\" << endl;\n        return 0;\n    }\n\n    fwrite(magic_number, 1, 8, fp);\n    fwrite(lp_buf, 1, len, fp);\n    fclose(fp);\n    delete lp_buf;\n    //     if (argc < 3)\n    //     {  \n    //         printf(\"error!\\n\");\n    //         printf(\"./main str\\n\");\n    //  \n    //         return -1;\n    //     }\n}\n"
  },
  {
    "path": "NeteasePycOpcode/pyopcode.py",
    "content": "# from __future__ import division\n\n# def_op('STOP_CODE', 0)\n# ignore\n\n# def_op('POP_TOP', 1)\na()\n\n# def_op('ROT_TWO', 2)\n(a, b) = (b, a)\n\n# def_op('ROT_THREE', 3)\n(a, a, a) = (a, a, a)\n\n# def_op('DUP_TOP', 4)\nexec 1\n\n# def_op('ROT_FOUR', 5)\na[2:4] += 'abc'\n\n# def_op('NOP', 9)\n# ignore\n\n# def_op('UNARY_POSITIVE', 10)\n+ a\n\n# def_op('UNARY_NEGATIVE', 11)\n- a\n\n# def_op('UNARY_NOT', 12)\nnot a\n\n# def_op('UNARY_CONVERT', 13)\na = `a`\n\n# def_op('UNARY_INVERT', 15)\na = ~a\n\n# def_op('BINARY_POWER', 19)\na ** 1\n\n# def_op('BINARY_MULTIPLY', 20)\na * 1\n\n# def_op('BINARY_DIVIDE', 21)\na / 1\n\n# def_op('BINARY_MODULO', 22)\na % 1\n\n# def_op('BINARY_ADD', 23)\na + 1\n\n# def_op('BINARY_SUBTRACT', 24)\na - 1\n\n# def_op('BINARY_SUBSCR', 25)\na[1]\n\n# def_op('BINARY_FLOOR_DIVIDE', 26)\na // 1\n\n# def_op('BINARY_TRUE_DIVIDE', 27)\n# add 'from __future__ import division' to header\n\n# def_op('INPLACE_FLOOR_DIVIDE', 28)\na //= 1\n\n# def_op('INPLACE_TRUE_DIVIDE', 29)\n# add 'from __future__ import division' to header\n\n# def_op('SLICE+0', 30)\na[:]\n\n# def_op('SLICE+1', 31)\na[1:]\n\n# def_op('SLICE+2', 32)\na[:2]\n\n# def_op('SLICE+3', 33)\na[1:2]\n\n# def_op('STORE_SLICE+0', 40)\na[:] = 1\n\n# def_op('STORE_SLICE+1', 41)\na[1:] = 1\n\n# def_op('STORE_SLICE+2', 42)\na[:2] = 1\n\n# def_op('STORE_SLICE+3', 43)\na[1:2] =1\n\n# def_op('DELETE_SLICE+0', 50)\ndel a[:]\n\n# def_op('DELETE_SLICE+1', 51)\ndel a[1:]\n\n# def_op('DELETE_SLICE+2', 52)\ndel a[:2]\n\n# def_op('DELETE_SLICE+3', 53)\ndel a[1:2]\n\n# def_op('STORE_MAP', 54)\n{\"1\": 1}\n\n# def_op('INPLACE_ADD', 55)\na += 1\n\n# def_op('INPLACE_SUBTRACT', 56)\na -= 1\n\n# def_op('INPLACE_MULTIPLY', 57)\na *= 1\n\n# def_op('INPLACE_DIVIDE', 58)\na /= 1\n\n# def_op('INPLACE_MODULO', 59)\na %= 1\n\n# def_op('STORE_SUBSCR', 60)\na[1] = 1\n\n# def_op('DELETE_SUBSCR', 61)\ndel a[1]\n\n# def_op('BINARY_LSHIFT', 62)\na << 1\n\n# def_op('BINARY_RSHIFT', 63)\na >> 1\n\n# def_op('BINARY_AND', 64)\na & 1\n\n# def_op('BINARY_XOR', 65)\na ^ 1\n\n# def_op('BINARY_OR', 66)\na | 1\n\n# def_op('INPLACE_POWER', 67)\na **= 1\n\n# def_op('GET_ITER', 68)\nfor i in a:\n    pass\n\n# def_op('PRINT_EXPR', 70)\n# ignore\n\n# def_op('PRINT_ITEM', 71)\nprint(1)\n\n# def_op('PRINT_NEWLINE', 72)\nprint(1)\n\n# def_op('PRINT_ITEM_TO', 73)\nprint >> fd, 1\n\n# def_op('PRINT_NEWLINE_TO', 74)\nprint >> fd, 1\n\n# def_op('INPLACE_LSHIFT', 75)\na <<= 1\n\n# def_op('INPLACE_RSHIFT', 76)\na >>= 1\n\n# def_op('INPLACE_AND', 77)\na &= 1\n\n# def_op('INPLACE_XOR', 78)\na ^= 1\n\n# def_op('INPLACE_OR', 79)\na |= 1\n\n# def_op('BREAK_LOOP', 80)\nwhile True:\n    break\n\n# def_op('WITH_CLEANUP', 81)\nwith a:\n    pass\n\n# def_op('LOAD_LOCALS', 82)\nclass a:\n    pass\n\n# def_op('RETURN_VALUE', 83)\ndef a():\n    return\n\n# def_op('IMPORT_STAR', 84)\nfrom module import *\n\n# def_op('EXEC_STMT', 85)\nexec 1\n\n# def_op('YIELD_VALUE', 86)\ndef a():\n    yield 1\n\n# def_op('POP_BLOCK', 87)\nwhile True:\n    pass\n\n# def_op('END_FINALLY', 88)\nwith a:\n    pass\n\n# def_op('BUILD_CLASS', 89)\nclass a:\n    pass\n\n# name_op('STORE_NAME', 90)       # Index in name list\na = 1\n\n# name_op('DELETE_NAME', 91)      # \"\"\ndel a\n\n# def_op('UNPACK_SEQUENCE', 92)   # Number of tuple items\na, b = 1, 2\n\n# jrel_op('FOR_ITER', 93)\nfor i in a:\n    pass\n\n# def_op('LIST_APPEND', 94)\n[i for i in a]\n\n# name_op('STORE_ATTR', 95)       # Index in name list\na.a = 1\n\n# name_op('DELETE_ATTR', 96)      # \"\"\ndel a.a\n\n# name_op('STORE_GLOBAL', 97)     # \"\"\ndef a():\n    global aa\n    aa = 1\n\n# name_op('DELETE_GLOBAL', 98)    # \"\"\ndef a():\n    global aa\n    del aa\n\n# def_op('DUP_TOPX', 99)          # number of items to duplicate\nb[a] += 1\n\n# def_op('LOAD_CONST', 100)       # Index in const list\n123\n\n# name_op('LOAD_NAME', 101)       # Index in name list\na\n\n# def_op('BUILD_TUPLE', 102)      # Number of tuple items\n(a, )\n\n# def_op('BUILD_LIST', 103)       # Number of list items\n[]\n\n# def_op('BUILD_SET', 104)        # Number of set items\n{1}\n\n# def_op('BUILD_MAP', 105)        # Number of dict entries (upto 255)\n{}\n\n# name_op('LOAD_ATTR', 106)       # Index in name list\na.a\n\n# def_op('COMPARE_OP', 107)       # Comparison operator\na == a\n\n# name_op('IMPORT_NAME', 108)     # Index in name list\nimport a\n\n# name_op('IMPORT_FROM', 109)     # Index in name list\nfrom a import b\n\n# jrel_op('JUMP_FORWARD', 110)    # Number of bytes to skip\nif True:\n    pass\n\n# jabs_op('JUMP_IF_FALSE_OR_POP', 111) # Target byte offset from beginning of code\n0 and False\n\n# jabs_op('JUMP_IF_TRUE_OR_POP', 112)  # \"\"\n0 or False\n\n\n# jabs_op('JUMP_ABSOLUTE', 113)        # \"\"\ndef a():\n    if b:\n        if c:\n            print('')\n\n# jabs_op('POP_JUMP_IF_FALSE', 114)    # \"\"\nif True:\n    pass\n\n# jabs_op('POP_JUMP_IF_TRUE', 115)     # \"\"\nif not True:\n    pass\n\n# name_op('LOAD_GLOBAL', 116)     # Index in name list\ndef a():\n    global b\n    return b\n\n# jabs_op('CONTINUE_LOOP', 119)   # Target address\nwhile True:\n    try: \n        continue\n    except: \n        pass\n\n\n# jrel_op('SETUP_LOOP', 120)      # Distance to target address\nwhile True:\n    pass\n\n# jrel_op('SETUP_EXCEPT', 121)    # \"\"\n# jrel_op('SETUP_FINALLY', 122)   # \"\"\ntry:\n    pass\nexcept:\n    pass\nfinally:\n    pass\n\n# def_op('LOAD_FAST', 124)        # Local variable number\ndef a():\n    aa = 1\n    return aa\n\n# def_op('STORE_FAST', 125)       # Local variable number\ndef a():\n    aa = 1\n\n# def_op('DELETE_FAST', 126)      # Local variable number\ndef a():\n    aa = 1\n    del aa\n\n# def_op('RAISE_VARARGS', 130)    # Number of raise arguments (1, 2, or 3)\nraise\n\n# def_op('CALL_FUNCTION', 131)    # #args + (#kwargs << 8)\na()\n\n# def_op('MAKE_FUNCTION', 132)    # Number of args with default values\ndef a():\n    pass\n\n# def_op('BUILD_SLICE', 133)      # Number of items\na[::]\n\n# def_op('MAKE_CLOSURE', 134)\n# def_op('LOAD_CLOSURE', 135)\n# def_op('LOAD_DEREF', 136)\n# def_op('STORE_DEREF', 137)\ndef f():\n    a = 1\n    def g():\n        return a + 1\n    return g()\n\n\n# def_op('CALL_FUNCTION_VAR', 140)     # #args + (#kwargs << 8)\na(*args)\n\n# def_op('CALL_FUNCTION_KW', 141)      # #args + (#kwargs << 8)\na(**kwargs)\n\n# def_op('CALL_FUNCTION_VAR_KW', 142)  # #args + (#kwargs << 8)\na(*args, **kwargs)\n\n# jrel_op('SETUP_WITH', 143)\nwith a:\n    pass\n\n# def_op('EXTENDED_ARG', 145)\n# ignore\n\n# def_op('SET_ADD', 146)\n{i for i in a}\n\n# def_op('MAP_ADD', 147)\n{i:i for i in a}\n"
  },
  {
    "path": "README.md",
    "content": "Usage：\n\n​\tNxsFile :\n\n​```\n​\t\tpython2 NeteaseNxsUnpack/DecodeNetNxs.py     INPUT_FILE    OUTPUT_FILE \n​```\n\n​\tNpkFile\n\n​```\n​\t\tpython2 NeteaseNpkUnpack/NeteaseNpkUnpack.py   INPUT_FILE(.npk)  OUTPUT_DIR\n​```\n\n​\tPycFile\n\n\n​```\n​\t\tcd NeteasePycObject\n\n​\t\tg++ netpyc -o netpyc\n\n​\t\tnetpyc  INPUT_FILE  OUT_FILE  [isEncrypt]\n\n​\t\tArg3 is option \n​```\n\n\nmore info click [here](<https://basicbit.cn/2019/03/01/2019-03-01-%E7%BD%91%E6%98%93%E6%B8%B8%E6%88%8F%E7%9A%84%E5%9B%9B%E7%A7%8D%E8%A7%A3%E5%AF%86&%E8%A7%A3%E5%8C%85%EF%BC%8C%E9%99%84%E5%B7%A5%E5%85%B7/>)\n"
  }
]