Skip to content

Commit fc16ada

Browse files
fix:
1 parent c38088c commit fc16ada

1 file changed

Lines changed: 29 additions & 28 deletions

File tree

main.cpp

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,35 +2103,7 @@ void PIDinspect(const std::vector<DWORD>& pids, const std::vector<std::string>&
21032103
pidMap.emplace(pe32.th32ProcessID, pe32);
21042104
} while (Process32Next(hshot, &pe32));
21052105
}
2106-
std::string procName = GetProcessNameFromPid(pid, hshot);
2107-
std::string process = GetWindowTitle(hshot);
2108-
21092106

2110-
if (virtualTerminalEnabled) {
2111-
if (!process.empty()) {
2112-
std::cout << "\033[34mTarget:\033[0m " << procName << "\033[0m" << std::endl;
2113-
std::cout << "\033[34mProcess:\033[0m " << process << "\033[90m (pid " << std::to_string(pid) << ")\033[0m" << std::endl;
2114-
} else
2115-
if (procName == "") {
2116-
std::cout << "\033[34mTarget:\033[0m N/A\n\033[34mProcess:\033[0m N/A\n";
2117-
} else {
2118-
std::cout << "\033[34mTarget:\033[0m " << procName << "\033[0m" << std::endl;
2119-
std::cout << "\033[34mProcess:\033[0m " << procName << "\033[90m (pid " << std::to_string(pid) << ")\033[0m" << std::endl;
2120-
}
2121-
} else {
2122-
if (!process.empty()) {
2123-
std::cout << "Target: " << procName << std::endl;
2124-
std::cout << "Process: " << process << " (pid " << std::to_string(pid) << ")" << std::endl;
2125-
} else {
2126-
if (procName == ""){
2127-
std::cout << "Target: N/A\nProcess: N/A\n";
2128-
} else {
2129-
std::cout << "Target: " << procName << std::endl;
2130-
std::cout << "Process: " << procName << " (pid " << std::to_string(pid) << ")" << std::endl;
2131-
}
2132-
2133-
}
2134-
}
21352107

21362108

21372109

@@ -2174,6 +2146,35 @@ void PIDinspect(const std::vector<DWORD>& pids, const std::vector<std::string>&
21742146

21752147

21762148
}
2149+
std::string procName = GetProcessNameFromPid(pid, hshot);
2150+
std::string process = GetWindowTitle(hProcess);
2151+
2152+
2153+
if (virtualTerminalEnabled) {
2154+
if (!process.empty()) {
2155+
std::cout << "\033[34mTarget:\033[0m " << procName << "\033[0m" << std::endl;
2156+
std::cout << "\033[34mProcess:\033[0m " << process << "\033[90m (pid " << std::to_string(pid) << ")\033[0m" << std::endl;
2157+
} else
2158+
if (procName == "") {
2159+
std::cout << "\033[34mTarget:\033[0m N/A\n\033[34mProcess:\033[0m N/A\n";
2160+
} else {
2161+
std::cout << "\033[34mTarget:\033[0m " << procName << "\033[0m" << std::endl;
2162+
std::cout << "\033[34mProcess:\033[0m " << procName << "\033[90m (pid " << std::to_string(pid) << ")\033[0m" << std::endl;
2163+
}
2164+
} else {
2165+
if (!process.empty()) {
2166+
std::cout << "Target: " << procName << std::endl;
2167+
std::cout << "Process: " << process << " (pid " << std::to_string(pid) << ")" << std::endl;
2168+
} else {
2169+
if (procName == ""){
2170+
std::cout << "Target: N/A\nProcess: N/A\n";
2171+
} else {
2172+
std::cout << "Target: " << procName << std::endl;
2173+
std::cout << "Process: " << procName << " (pid " << std::to_string(pid) << ")" << std::endl;
2174+
}
2175+
2176+
}
2177+
}
21772178

21782179

21792180
char exePath[MAX_PATH] = {0};

0 commit comments

Comments
 (0)