Advertisement
Guest User

Untitled

a guest
Mar 31st, 2018
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<Windows.h>
  3.  
  4. unsigned char buf[] =
  5. "";
  6.  
  7. int main ()
  8. {
  9. void *exec = VirtualAlloc(0, sizeof buf, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
  10. memcpy(exec, buf, sizeof buf);
  11. ((void(*)())exec)();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement