added warning for executables that are not 64bit

master
a 2 years ago
parent c3427946b3
commit 7599e3e3de

@ -56,7 +56,13 @@ int __cdecl main(int argc, const char* argv[]) {
return -1; return -1;
} }
// only support 64bit executables...
auto img = reinterpret_cast<win::image_t<>*>(module_data.data()); auto img = reinterpret_cast<win::image_t<>*>(module_data.data());
if (img->get_nt_headers()->file_header.machine != win::machine_id::arm64) {
std::printf("[!] only 64bit executables are supported...\n");
return -1;
}
auto image_size = img->get_nt_headers()->optional_header.size_image; auto image_size = img->get_nt_headers()->optional_header.size_image;
const auto image_base = img->get_nt_headers()->optional_header.image_base; const auto image_base = img->get_nt_headers()->optional_header.image_base;

Loading…
Cancel
Save