You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
857B

  1. #include <cstdint>
  2. #include <iostream>
  3. #include <iomanip>
  4. #include "../test_cases/test_cases.h"
  5. #include "abstracthook.h"
  6. #include "mhook.h"
  7. #pragma comment(lib, "..\\x64\\debug\\test_cases.lib")
  8. extern AbstractHookEngine* g_mhook,
  9. *g_PolyHook,
  10. *g_MinHook;
  11. int main(int argc, char** argv) {
  12. AbstractHookEngine* engines[] = {
  13. g_mhook,
  14. g_PolyHook,
  15. g_MinHook
  16. };
  17. for(auto&& x : engines) {
  18. if (!x->hook_all()) {
  19. std::cerr << x->name() << " can't hook\n";
  20. x->unhook_all();
  21. continue;
  22. }
  23. SelfTest();
  24. x->unhook_all();
  25. }
  26. std::cout << "+----------+-+-+-+-+-+-+-+" << std::endl <<
  27. '|' << std::setw(10) << "Name" << std::setw(1) << "|S|B|R|A|?|L|T|" << std::endl <<
  28. "+----------+-+-+-+-+-+-+-+" << std::endl;
  29. for (auto&& x : engines) {
  30. std::cout << *x << std::endl;
  31. }
  32. std::cout << "+----------+-+-+-+-+-+-+-+" << std::endl;
  33. }