mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-04-19 21:52:55 +00:00
Show console in window mode
This commit is contained in:
parent
7a9c19e0fd
commit
b09cf1130e
@ -35,8 +35,8 @@ html_frame::html_frame()
|
||||
|
||||
if (needs_restart)
|
||||
{
|
||||
//utils::nt::relaunch_self();
|
||||
//utils::nt::terminate(0);
|
||||
utils::nt::relaunch_self();
|
||||
utils::nt::terminate(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,8 @@ std::filesystem::path extract_driver()
|
||||
|
||||
void unsafe_main(const int /*argc*/, char* /*argv*/[])
|
||||
{
|
||||
launcher().run();
|
||||
//launcher().run();
|
||||
//return;
|
||||
|
||||
const auto driver_file = extract_driver();
|
||||
|
||||
@ -110,16 +111,16 @@ void unsafe_main(const int /*argc*/, char* /*argv*/[])
|
||||
patch_data(driver_device, pid, 0x443A2A, data3, sizeof(data3));
|
||||
patch_data(driver_device, pid, 0x443978, data3, sizeof(data3));
|
||||
|
||||
/*
|
||||
insert_nop(driver_device, pid, 0x441D5A, 6);
|
||||
insert_nop(driver_device, pid, 0x525104, 2);
|
||||
insert_nop(driver_device, pid, 0x525121, 2);
|
||||
/*
|
||||
insert_nop(driver_device, pid, 0x441D5A, 6);
|
||||
insert_nop(driver_device, pid, 0x525104, 2);
|
||||
insert_nop(driver_device, pid, 0x525121, 2);
|
||||
|
||||
constexpr uint8_t data3[] = {0xEB};
|
||||
patch_data(driver_device, pid, 0x525087, data3, sizeof(data3));
|
||||
patch_data(driver_device, pid, 0x524E7F, data3, sizeof(data3));
|
||||
patch_data(driver_device, pid, 0x52512C, data3, sizeof(data3));
|
||||
*/
|
||||
constexpr uint8_t data3[] = {0xEB};
|
||||
patch_data(driver_device, pid, 0x525087, data3, sizeof(data3));
|
||||
patch_data(driver_device, pid, 0x524E7F, data3, sizeof(data3));
|
||||
patch_data(driver_device, pid, 0x52512C, data3, sizeof(data3));
|
||||
*/
|
||||
printf("Press any key to disable all hooks!\n");
|
||||
(void)_getch();
|
||||
|
||||
@ -150,5 +151,13 @@ int main(const int argc, char* argv[])
|
||||
|
||||
int __stdcall WinMain(HINSTANCE, HINSTANCE, char*, int)
|
||||
{
|
||||
AllocConsole();
|
||||
AttachConsole(GetCurrentProcessId());
|
||||
|
||||
FILE* fp;
|
||||
freopen_s(&fp, "conin$", "r", stdin);
|
||||
freopen_s(&fp, "conout$", "w", stdout);
|
||||
freopen_s(&fp, "conout$", "w", stderr);
|
||||
|
||||
return main(__argc, __argv);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user