|
@ -1,3 +1,4 @@ |
|
|
|
|
|
//gcc -fno-stack-protector -no-pie -z execstack -fno-builtin -mpreferred-stack-boundary=2 -m32 membuat.c -o membuat |
|
|
#include <stdlib.h> |
|
|
#include <stdlib.h> |
|
|
#include <unistd.h> |
|
|
#include <unistd.h> |
|
|
#include <stdio.h> |
|
|
#include <stdio.h> |
|
@ -11,7 +12,7 @@ int main(int argc, char **argv) |
|
|
fflush(stdout); |
|
|
fflush(stdout); |
|
|
gets(buffer); |
|
|
gets(buffer); |
|
|
printf("selamat datang %s\n",buffer); |
|
|
printf("selamat datang %s\n",buffer); |
|
|
printf("buffer ada di : %p\n",vuln); |
|
|
|
|
|
|
|
|
printf("buffer ada di : [%p]\n",vuln); |
|
|
fflush(stdout); |
|
|
fflush(stdout); |
|
|
gets(vuln); |
|
|
gets(vuln); |
|
|
} |
|
|
} |