예제 #1
0
    def run(cls):
        # Find the PID of THUD
        c = wmi.WMI()
        pid = None
        for process in c.Win32_Process():
            if process.Name.lower() == 'turbohud.exe':
                print('Found THUD')
                print(process.ProcessId, process.Name)
                pid = process.ProcessId

        if not pid:
            print('No PID')
            sys.exit(1)

        print('Full DLL path: %s' % dll_path)

        # Inject DLL into THUD
        print('Injecting...')
        injector = Injector()
        injector.load_from_pid(pid)
        injector.inject_dll(dll_path)
        injector.unload()
        print('Injectine Done.')

        # Countdown until exit
        for i in range(10, 1, -1):
            print('Exiting in ... %s' % i)
            time.sleep(1)
예제 #2
0
def main():
    path_exe = str(sys.argv[1])
    path_dll = str(sys.argv[2])

    injector = Injector()
    pid = injector.create_process(path_exe)
    injector.load_from_pid(pid)
    injector.inject_dll(path_dll)
    injector.unload()
예제 #3
0
def inject_packet_logger(pid: int):
    injector = Injector()
    injector.load_from_pid(pid)
    injector.inject_dll(get_packet_logger_path(pid))