Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. void func(int key){
  5.         char overflowme[32];
  6.         printf("overflow me : ");
  7.         gets(overflowme);       // smash me!
  8.         if(key == 0xcafebabe){
  9.                 system("/bin/sh");
  10.         }
  11.         else{
  12.                 printf("Nah..\n");
  13.         }
  14. }
  15. int main(int argc, char* argv[]){
  16.         func(0xdeadbeef);
  17.         return 0;
  18. }