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