daily pastebin goal
19%
SHARE
TWEET

Untitled

a guest Jan 13th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(){
  5.     long val=0x41414141;
  6.     char buf[20];
  7.  
  8.     printf("Correct val's value from 0x41414141 -> 0xdeadbeef!\n");
  9.     printf("Here is your chance: ");
  10.     scanf("%24s",&buf);
  11.  
  12.     printf("buf: %s\n",buf);
  13.     printf("val: 0x%08x\n",val);
  14.  
  15.     if(val==0xdeadbeef){
  16.         setreuid(geteuid(),geteuid());
  17.         system("/bin/sh");
  18.     }
  19.     else {
  20.         printf("WAY OFF!!!!\n");
  21.         exit(1);
  22.     }
  23.  
  24.     return 0;
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top