diff options
author | jbzdarkid <jbzdarkid@gmail.com> | 2018-10-26 21:09:12 -0700 |
---|---|---|
committer | jbzdarkid <jbzdarkid@gmail.com> | 2018-10-26 21:09:12 -0700 |
commit | 9503fc300e1c2d9fcddcf5b8ecc009cd4429337a (patch) | |
tree | 2be6a28d2e1c5e70a7e83a77f9f53d819ae820fd /WitnessRandomizer/Memory.cpp | |
parent | 2270169041973370d171347e534071d34b88714e (diff) | |
download | witness-tutorializer-9503fc300e1c2d9fcddcf5b8ecc009cd4429337a.tar.gz witness-tutorializer-9503fc300e1c2d9fcddcf5b8ecc009cd4429337a.tar.bz2 witness-tutorializer-9503fc300e1c2d9fcddcf5b8ecc009cd4429337a.zip |
Change offsets to #defines, support new version
Diffstat (limited to 'WitnessRandomizer/Memory.cpp')
-rw-r--r-- | WitnessRandomizer/Memory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/WitnessRandomizer/Memory.cpp b/WitnessRandomizer/Memory.cpp index 8ad5452..92a5136 100644 --- a/WitnessRandomizer/Memory.cpp +++ b/WitnessRandomizer/Memory.cpp | |||
@@ -18,7 +18,7 @@ Memory::Memory(const std::string& processName) { | |||
18 | } | 18 | } |
19 | } | 19 | } |
20 | if (!_handle) { | 20 | if (!_handle) { |
21 | OutputDebugStringA("Process is not open!\n"); | 21 | std::cout << "Couldn't find " << processName.c_str() << ", is it open?" << std::endl; |
22 | exit(EXIT_FAILURE); | 22 | exit(EXIT_FAILURE); |
23 | } | 23 | } |
24 | 24 | ||
@@ -38,7 +38,7 @@ Memory::Memory(const std::string& processName) { | |||
38 | } | 38 | } |
39 | } | 39 | } |
40 | if (_baseAddress == 0) { | 40 | if (_baseAddress == 0) { |
41 | OutputDebugStringA("Couldn't find base address!\n"); | 41 | std::cout << "Couldn't find the base process address!" << std::endl; |
42 | exit(EXIT_FAILURE); | 42 | exit(EXIT_FAILURE); |
43 | } | 43 | } |
44 | } | 44 | } |
@@ -52,7 +52,7 @@ Memory::~Memory() { | |||
52 | void Memory::ThrowError() { | 52 | void Memory::ThrowError() { |
53 | std::string message(256, '\0'); | 53 | std::string message(256, '\0'); |
54 | FormatMessageA(4096, NULL, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.length()), NULL); | 54 | FormatMessageA(4096, NULL, GetLastError(), 1024, &message[0], static_cast<DWORD>(message.length()), NULL); |
55 | OutputDebugStringA(message.c_str()); | 55 | std::cout << message.c_str() << std::endl; |
56 | exit(EXIT_FAILURE); | 56 | exit(EXIT_FAILURE); |
57 | } | 57 | } |
58 | 58 | ||