|
- #include <cstdint>
- #include <iostream>
- #include <iomanip>
- #include "../test_cases/test_cases.h"
-
- #include "abstracthook.h"
- #include "mhook.h"
-
- #pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
-
- extern AbstractHookEngine* g_mhook,
- *g_PolyHook,
- *g_MinHook;
-
- int main(int argc, char** argv) {
- AbstractHookEngine* engines[] = {
- g_mhook,
- g_PolyHook,
- g_MinHook
- };
-
- SelfTest();
-
- for(auto&& x : engines) {
- if (!x->hook_all()) {
- std::cerr << x->name() << " can't hook\n";
- x->unhook_all();
- continue;
- }
-
- SelfTest();
- x->unhook_all();
- }
-
- std::cout << "+----------+-+-+-+-+-+-+-+" << std::endl <<
- '|' << std::setw(10) << "Name" << std::setw(1) << "|S|B|R|A|?|L|T|" << std::endl <<
- "+----------+-+-+-+-+-+-+-+" << std::endl;
- for (auto&& x : engines) {
- std::cout << *x << std::endl;
- }
- std::cout << "+----------+-+-+-+-+-+-+-+" << std::endl;
- }
|