I'm a noob at shellcodes and I'm trying to understand all scenarios. I have found many codes to test my shellcodes in C, but to my surprise they are very unreadeable and I can't understand neither this code:
int (*func)();
func = (int (*)()) code;
(int)(*func)();
Or this one:
int (*ret)() = (int(*)())code;
ret();
Is this an equivalent to eval()
in Javascript? And how doest it work?