Root-Me.org
-
Stack buffer overflow basic 3Root-Me.org 2016. 7. 16. 02:57
/* gcc -m32 -o ch16 ch16.c */ #include #include #include #include void shell(void); int main() { char buffer[64]; int check; int i = 0; int count = 0; printf("Enter your name: "); fflush(stdout); while(1) { if(count >= 64) printf("Oh no...Sorry !\n"); if(check == 0xbffffabc) shell(); else { read(fileno(stdin),&i,1); switch(i) { case '\n': printf("\a"); break; case 0x08: count--; printf("\b"); br..
-
-