(*(void(*)()) shellcode)();
> and suddenly this looks way more interesting. Is it really possible to literally just execute random bytes stored in a string like that?Well it's just a sequence of bytes somewhere in-memory, no? If the C compiler allows the cast, then it'd compile fine, and the CPU wouldn't know the difference; it'd just execute whatever instructions the sequence of bytes listed.