|
|
@ -1,4 +1,9 @@
|
|
|
|
#include "map_driver.hpp"
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "kernel_ctx/kernel_ctx.h"
|
|
|
|
|
|
|
|
#include "drv_image/drv_image.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace physmeme
|
|
|
|
namespace physmeme
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -31,6 +36,8 @@ namespace physmeme
|
|
|
|
#if PHYSMEME_DEBUGGING true
|
|
|
|
#if PHYSMEME_DEBUGGING true
|
|
|
|
std::cout << "[+] allocated " << std::hex << std::showbase << image.size() << " at: " << std::hex << std::showbase << pool_base << std::endl;
|
|
|
|
std::cout << "[+] allocated " << std::hex << std::showbase << image.size() << " at: " << std::hex << std::showbase << pool_base << std::endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (!pool_base)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// fix the driver image
|
|
|
|
// fix the driver image
|
|
|
@ -85,11 +92,13 @@ namespace physmeme
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
physmeme::unload_drv();
|
|
|
|
physmeme::unload_drv();
|
|
|
|
std::cin.get();
|
|
|
|
std::cin.get();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return !result; // 0x0 means STATUS_SUCCESS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool __cdecl map_driver(std::uint8_t * image, std::size_t size)
|
|
|
|
bool __cdecl map_driver(std::uint8_t * image, std::size_t size)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auto data = std::vector<std::uint8_t>(image, image + size);
|
|
|
|
auto data = std::vector<std::uint8_t>(image, image + size);
|
|
|
|
map_driver(data);
|
|
|
|
return map_driver(data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|