From edc46813271a924646b6282ab233b9b62a45c0df Mon Sep 17 00:00:00 2001 From: xerox Date: Sat, 25 Apr 2020 03:03:38 -0700 Subject: [PATCH] fixed some nonsense :flushed: --- physmeme-lib/map_driver.cpp | 13 +++++++++++-- physmeme-lib/map_driver.hpp | 7 +------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/physmeme-lib/map_driver.cpp b/physmeme-lib/map_driver.cpp index 18bb90f..bc9a422 100644 --- a/physmeme-lib/map_driver.cpp +++ b/physmeme-lib/map_driver.cpp @@ -1,4 +1,9 @@ -#include "map_driver.hpp" +#include +#include +#include + +#include "kernel_ctx/kernel_ctx.h" +#include "drv_image/drv_image.h" namespace physmeme { @@ -31,6 +36,8 @@ namespace physmeme #if PHYSMEME_DEBUGGING true std::cout << "[+] allocated " << std::hex << std::showbase << image.size() << " at: " << std::hex << std::showbase << pool_base << std::endl; #endif + if (!pool_base) + return false; // // fix the driver image @@ -85,11 +92,13 @@ namespace physmeme #endif physmeme::unload_drv(); std::cin.get(); + + return !result; // 0x0 means STATUS_SUCCESS } bool __cdecl map_driver(std::uint8_t * image, std::size_t size) { auto data = std::vector(image, image + size); - map_driver(data); + return map_driver(data); } } \ No newline at end of file diff --git a/physmeme-lib/map_driver.hpp b/physmeme-lib/map_driver.hpp index c9db0b5..673163c 100644 --- a/physmeme-lib/map_driver.hpp +++ b/physmeme-lib/map_driver.hpp @@ -1,10 +1,5 @@ #pragma once -#include -#include -#include - -#include "kernel_ctx/kernel_ctx.h" -#include "drv_image/drv_image.h" +#include namespace physmeme {