// file: guard.c
#include <stdio.h>
#include <string.h>
int main() {
char granted = 0;
char passwd[7];
printf("Password: ");
gets(passwd);
if (!strcmp(passwd, "pa$$wd")) {
granted = 1;
}
if (granted == 1) {
printf("Access granted!\n");
}
return 0;
}
Mem Adress | Value | ||
---|---|---|---|
0xbfffec7c | 0xb7d82637 | Return Address | |
-> | 0xbfffec78 | 0x00000000 | Prev Frame Pointer |
0xbfffec74 | 0xbfffec90 | ||
0xbfffec70 | 0xb7f1c3dc | ||
0xbfffec6c | 0x4aff7c9d | ||
0xbfffec68 | 0xce0a659f |