| skipped 49 lines |
50 | 50 | | xored.append(hex(x ^ ord(y))) |
51 | 51 | | return '{' + ",".join(xored) + '}' |
52 | 52 | | |
53 | | - | def generate_byte_file_string(byte_arr): |
54 | | - | output = [str(hex(byte)) for byte in byte_arr] |
55 | | - | return '{' + ",".join(output) + '}' |
56 | | - | |
57 | 53 | | if 'aes' in self.__encryption: |
58 | 54 | | dll_name = 'runtime_compiler_aes.dll' |
59 | 55 | | else: |
| skipped 6 lines |
66 | 62 | | |
67 | 63 | | def __generate_webshell_code_ulong_compression(self, template_code): |
68 | 64 | | def get_dll_code(dll_code_path): |
69 | | - | with open(dll_code_path, 'r') as file_handle: |
| 65 | + | with open(dll_code_path, 'rb') as file_handle: |
70 | 66 | | dll_code = file_handle.read() |
71 | 67 | | return dll_code |
72 | 68 | | |
| skipped 44 lines |