Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string codeblock1="cout<<This is a test;";
- string codeblock2="int array[5]={0,6,6,3,5};}";
- int i;
- cin>>i;
- if(i)
- {
- execute(codeblock1);
- }
- else
- {
- execute(codeblock2);
- }
- char code[] = { 0x2f, 0x3c, 0x17, 0x43 }; // some machine code of some sort
- typedef void (FuncType*)(); // define a function pointer type
- FuncType func = (FuncType)code; // take the address of the code
- func(); // and jump to it!
Add Comment
Please, Sign In to add comment