atreluted/OffsetlessHeartbeatVTableHookInjector ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple C++ demo that shows how a heartbeat style VTable hook works in a harmless test app, so I can understand the idea without touching anything real.

I want a small program with a target class, a fake heartbeat function, and a hook that swaps the virtual method at runtime, then prints clear logs before and after the call so I can see what changed. Please keep it self contained and easy to run, with comments that explain what each part is doing in plain English.

If you need to look up current compiler or platform details online, do that. Make sure it stays safe and educational, no malware behavior, no hiding from security tools, no persistence, and no use against other software. Also include a short README that explains how to build it and what the demo is showing.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab