| 117 | } |
| 118 | |
| 119 | std::vector<uintptr_t> KittyScannerMgr::findHexAll(const uintptr_t start, |
| 120 | const uintptr_t end, |
| 121 | std::string hex, |
| 122 | const std::string &mask) const |
| 123 | { |
| 124 | std::vector<uintptr_t> list; |
| 125 | |
| 126 | if (!_pMem || start >= end || mask.empty() || !KittyUtils::String::validateHex(hex)) |
| 127 | return list; |
| 128 | |
| 129 | const size_t scan_size = mask.length(); |
| 130 | if ((hex.length() / 2) != scan_size) |
| 131 | return list; |
| 132 | |
| 133 | std::vector<char> pattern(scan_size); |
| 134 | KittyUtils::Data::fromHex(hex, &pattern[0]); |
| 135 | |
| 136 | list = findBytesAll(start, end, pattern.data(), mask); |
| 137 | return list; |
| 138 | } |
| 139 | |
| 140 | uintptr_t KittyScannerMgr::findHexFirst(const uintptr_t start, |
| 141 | const uintptr_t end, |