Exemplo n.º 1
0
        private void ButtonInjectDll_Click(object sender, RoutedEventArgs e)
        {
            if (listboxProcesses.SelectedItem != null)
            {
                string dllFolder = Path.GetDirectoryName(
                    ((CProcess)listboxProcesses.SelectedItem).Process.MainModule.FileName);
                string dllName = Path.GetFileName(DllPath);

                string dllPath = $"{dllFolder}\\{dllName}";

                if (File.Exists(dllPath))
                {
                    File.Delete(dllPath);
                }
                File.Copy(DllPath, dllPath);

                TrashMem.InjectDll(DllPath);

                UpdateAllocationsAndThreads();
            }
        }