Skip to content

Commit f6cb073

Browse files
[Fix] HCRYPTKEY structure pointer print
1 parent 031a188 commit f6cb073

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/scanners.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ std::unordered_set<Key, Key::KeyHashFunction> CryptoAPIScan::Scan(unsigned char
119119
while ((search_result = search(search_start, input_buffer + heap_info.GetSize(), searcher)) != input_buffer + heap_info.GetSize()) {
120120
uintptr_t position = search_result - input_buffer;
121121
match_count++;
122-
printf(" HCRYPTKEY structure found at [%p]\n", search_result);
122+
printf(" HCRYPTKEY structure found at offset [0x%p]\n", (void*) (position + heap_info.GetBaseAddress()));
123123
// ProcessCapturer::PrintMemory(search_result, 64, heap_info.base_address + position); // print the HCRYPTKEY structure
124124

125125
// XOR with the magic constant
@@ -176,4 +176,4 @@ ScannerVector::ScannerVector(std::unique_ptr<std::vector<std::unique_ptr<ScanStr
176176
scanners_ = std::move(scanners);
177177
}
178178

179-
} // namespace key_scanner
179+
} // namespace key_scanner

0 commit comments

Comments
 (0)