This commit is contained in:
2017-12-27 22:47:29 +01:00
parent 97f6ad47fe
commit 05573a8666
9 changed files with 175 additions and 14 deletions

View File

@@ -33,11 +33,24 @@ public:
virtual bool hook_all() = 0;
virtual bool unhook_all() = 0;
bool all_hooked() {
bool all_hooked() const {
return small_ && branch && rip_relative && avx && rdrand && loop && tail_recursion;
}
const char* name() {
const char* name() const {
return name_;
}
friend std::ostream& operator<< (std::ostream& stream, const AbstractHookEngine& eng) {
std::cout << '|' << std::setw(10) << eng.name() << std::setw(1) << '|' <<
(eng.small_ ? 'X' : ' ') << '|' <<
(eng.branch ? 'X' : ' ') << '|' <<
(eng.rip_relative ? 'X' : ' ') << '|' <<
(eng.avx ? 'X' : ' ') << '|' <<
(eng.rdrand ? 'X' : ' ') << '|' <<
(eng.loop ? 'X' : ' ') << '|' <<
(eng.tail_recursion ? 'X' : ' ') << '|';
return stream;
}
};