#include #include #include void main(){ int correct = 0; char buffer[] = "Hello World"; int y = 42; char other_buffer[20] = "fox"; printf("What would you like to put in other_buffer?\n"); // size_t readlen = read(0, other_buffer, 20); // other_buffer[readlen-1] = 0; scanf("%s", other_buffer); printf("%lu\n", buffer); printf("%lx\n", buffer); printf("other_buffer: %s\n", other_buffer); printf("buffer: %s\n", buffer); printf("correct = %x\n", correct); printf("y = %x\n", y); puts(buffer); if(strcmp(other_buffer, "hamster") == 0) correct = 1; if(y != 42){ printf("Hacking attempt detected!\n"); return; } if(correct) printf("Access is Granted!\n"); else printf("You don't know the password. Please go away.\n"); }