Exemple #1
1
 public void ClearLuaInjection()
 {
     RemoteObject = null;
 }
Exemple #2
0
        public void InjectLua(int ProcessID)
        {
            try
            {
                //create IPC log channell for injected dll, so it can log to the console
                string logChannelName = null;
                IpcServerChannel ipcLogChannel = RemoteHooking.IpcCreateServer<Logger>(ref logChannelName,
                                                                                       WellKnownObjectMode.Singleton);
                var remoteLog = RemoteHooking.IpcConnectClient<Logger>(logChannelName);

                //inject dante.dll, pass in the log channel name
                RemoteHooking.Inject(
                    ProcessID,
                    "Dante.dll",
                    "Dante.dll",
                    logChannelName);

                //wait for the remote object channel to be created
                Thread.Sleep(200);

                //get remote object from channel name
                RemoteObject = RemoteHooking.IpcConnectClient<DanteInterface>(remoteLog.InjectedDLLChannelName);

                // If we're not using autologin we make sure that the LUA hook is off the way until we are logged in
                //RemoteObject.RegisterLuaHandler();
                //RemoteObject.Patch();

                // Set our codecave offset
                SetPatchOffset(Convert.ToUInt32(
                    ProcessManager.Config.CustomParams.LuaCallback, 16));

                Output.Instance.Log("Dante injected");
            }
            catch (Exception ExtInfo)
            {
                Output.Instance.Log("There was an error while connecting to the target DLL");
                Output.Instance.LogError(ExtInfo);
            }
        }
Exemple #3
0
        public void InjectLua(int ProcessID)
        {
            try
            {
                //create IPC log channell for injected dll, so it can log to the console
                string logChannelName = null;
                IpcServerChannel ipcLogChannel =
                    RemoteHooking.IpcCreateServer<Logger>(
                        ref logChannelName, WellKnownObjectMode.Singleton);
                var remoteLog = RemoteHooking.IpcConnectClient<Logger>(logChannelName);

                //inject dante.dll, pass in the log channel name
                RemoteHooking.Inject(
                    ProcessID,
                    "Dante.dll",
                    "Dante.dll",
                    logChannelName);

                //wait for the remote object channel to be created
                Thread.Sleep(200);

                //get remote object from channel name
                RemoteObject = RemoteHooking.IpcConnectClient<DanteInterface>(
                                                remoteLog.InjectedDLLChannelName);

                // Register Lua Delegate
                RemoteObject.RegisterLuaDelegate(
                        ProcessManager.GlobalOffsets.LuaDelegates);

                // Set our codecave offset
                SetPatchOffset(Convert.ToUInt32(
                    ProcessManager.Config.CustomParams.LuaCallback, 16));

                // Pass wow's main thread id
                SetWowMainThread();

                Output.Instance.Log("Dante injected");
            }
            catch (Exception ExtInfo)
            {
                Output.Instance.Log("There was an error while connecting to the target DLL");
                Output.Instance.LogError(ExtInfo);
            }
        }