28 lines
451 B
C++
28 lines
451 B
C++
#pragma once
|
|
class AbstractHookEngine {
|
|
private:
|
|
const char* name_;
|
|
|
|
public:
|
|
/* boolean for each hook test case, which are set by the hooks */
|
|
struct {
|
|
bool small_;
|
|
bool branch;
|
|
bool rip_relative;
|
|
};
|
|
public:
|
|
AbstractHookEngine(const char* name) : name_(name) {
|
|
|
|
}
|
|
|
|
virtual bool hook_all() = 0;
|
|
virtual bool unhook_all() = 0;
|
|
|
|
bool all_hooked() {
|
|
return small_ && branch && rip_relative;
|
|
}
|
|
|
|
const char* name() {
|
|
return name_;
|
|
}
|
|
}; |