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.

31 lines
479B

  1. #pragma once
  2. class AbstractHookEngine {
  3. private:
  4. const char* name_;
  5. public:
  6. /* boolean for each hook test case, which are set by the hooks */
  7. struct {
  8. bool small_;
  9. bool branch;
  10. bool rip_relative;
  11. bool avx;
  12. bool rdrand;
  13. };
  14. public:
  15. AbstractHookEngine(const char* name) : name_(name) {
  16. }
  17. virtual bool hook_all() = 0;
  18. virtual bool unhook_all() = 0;
  19. bool all_hooked() {
  20. return small_ && branch && rip_relative;
  21. }
  22. const char* name() {
  23. return name_;
  24. }
  25. };