Exemplo n.º 1
0
        private void btInject_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                Injector injector = new Injector();
                ProcessGUIPresenter processPresenter = (ProcessGUIPresenter)dataGridView1.SelectedRows[0].DataBoundItem;
                injector.Inject((uint)processPresenter.Id, txtDllToInject.Text);

            }
        }
Exemplo n.º 2
0
        //Injecte la dll dans le processus séléctionné
        private void InjectButton_Click(object sender, EventArgs e)
        {
            //on vérifie qu'il y a au moins un item qui a le focus et que la dll est bien chargée
            if (this.ProcessListView.FocusedItem != null && !string.IsNullOrEmpty(this.DllPathTextBox.Text))
            {
                //si tout es ok on prend son id à partir de son nom
                uint CurrentSelectedPID = Injection.GetPIDbyName(this.ProcessListView.FocusedItem.Text);

                //et on injecte la dll dans le processus avec son id
                //Injection.StartInjection(this.DllPathTextBox.Text, CurrentSelectedPID);
                Injector injector = new Injector();
                injector.Inject(CurrentSelectedPID,this.DllPathTextBox.Text);
            }
            else MessageBox.Show("Aucun processus séléctionné ou dll non chargée !", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }