[FEATURE] Permit scanning own workingset & threads (Issue #104)

This commit is contained in:
hasherezade
2022-08-30 17:25:03 -07:00
parent e5757e6d1e
commit a9e625b1f8
2 changed files with 3 additions and 11 deletions
+2 -2
View File
@@ -6,8 +6,8 @@
namespace pesieve {
#endif
const char PESIEVE_VERSION[] = "0.3.4-a";
const DWORD PESIEVE_VERSION_ID = 0x00030400; // 00 03 04 00
const char PESIEVE_VERSION[] = "0.3.4.1";
const DWORD PESIEVE_VERSION_ID = 0x00030401; // 00 03 04 01
const char PESIEVE_URL[] = "https://github.com/hasherezade/pe-sieve";
#ifdef __cplusplus
+1 -9
View File
@@ -211,10 +211,7 @@ ProcessScanReport* pesieve::ProcessScanner::scanRemote()
// scan working set
size_t regionsScanned = 0;
try {
//dont't scan your own working set
if (peconv::get_process_id(this->processHandle) != GetCurrentProcessId()) {
regionsScanned = scanWorkingSet(*pReport);
}
regionsScanned = scanWorkingSet(*pReport);
} catch (std::exception &e) {
regionsScanned = 0;
errorsStr << e.what();
@@ -447,11 +444,6 @@ size_t pesieve::ProcessScanner::scanThreads(ProcessScanReport& pReport) //throws
{
const DWORD pid = pReport.pid; //original PID, not a reflection!
//dont't scan your own threads - it may give wrong results:
if (pid == GetCurrentProcessId()) {
return 0;
}
const bool is_64bit = pesieve::util::is_process_64bit(this->processHandle);
#ifndef _WIN64
if (is_64bit) return 0;