I just tried the following code snippet for shellcode testing purposes:-
#include using namespace std; char sc[] = \"\"; #i\'ve removed the
I think the following should work:
char sc[] = ""; // i've removed the shellcode int main() { int (*func)() = (int(*)())sc; // C++ int (*func)() = sc; /* C */ func(); }
It's technically undefined behaviour, but then again that's the whole point of shellcode.