More tests

This commit is contained in:
momo5502 2022-04-18 20:39:39 +02:00
parent 378c52eb47
commit ce27636f3c
2 changed files with 4 additions and 12 deletions

View File

@ -194,17 +194,8 @@ namespace vmx
guest_context.exit_vm = true; guest_context.exit_vm = true;
} }
auto* hook = this->ept_hooks; const auto physical_base_address = reinterpret_cast<uint64_t>(PAGE_ALIGN(guest_context.guest_physical_address));
while (hook) auto* hook = this->find_ept_hook(physical_base_address);
{
if (hook->physical_base_address == reinterpret_cast<uint64_t>(PAGE_ALIGN(
guest_context.guest_physical_address)))
{
break;
}
hook = hook->next_hook;
}
if (!hook) if (!hook)
{ {
return; return;

View File

@ -67,9 +67,10 @@ void unsafe_main(const int /*argc*/, char* /*argv*/[])
hook_request hook_request{}; hook_request hook_request{};
hook_request.process_id = _pid; //GetCurrentProcessId(); hook_request.process_id = _pid; //GetCurrentProcessId();
hook_request.target_address = (void*)0x41297A;//0x14007DCF7; hook_request.target_address = (void*)0x4488A8;//0x41297A;
uint8_t buffer[] = {0x90, 0x90}; uint8_t buffer[] = {0x90, 0x90};
//uint8_t buffer[] = { 0x48, 0x89, 0xD9, 0x90 };
hook_request.source_data = buffer; hook_request.source_data = buffer;
hook_request.source_data_size = sizeof(buffer); hook_request.source_data_size = sizeof(buffer);