From 6d59ad763c99798bb08c1f81c24a594b2eeff65d Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Thu, 13 Sep 2018 11:59:15 -0400 Subject: [PATCH] process id as hex --- GUI/mainwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index d37f671..44c5897 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -182,10 +182,11 @@ void MainWindow::on_attachButton_clicked() QString process = QInputDialog::getItem(this, "Select Process", "If you don't see the process you want to inject, try running with admin rights\r\nYou can also type in the process id if you know it", processList, 0, true, &ok); + bool injected = false; if (!ok) return; - if (process.toInt()) ok &= Host::InjectProcess(process.toInt()); - else for (auto i : allProcesses.values(process)) ok &= Host::InjectProcess(i); - if (!ok) Host::AddConsoleOutput(L"failed to attach"); + if (process.toInt(nullptr, 0)) injected |= Host::InjectProcess(process.toInt(nullptr, 0)); + else for (auto i : allProcesses.values(process)) injected |= Host::InjectProcess(i); + if (!injected) Host::AddConsoleOutput(L"failed to inject"); } void MainWindow::on_detachButton_clicked()