#include char password[128]; void generate_password() { FILE *file = fopen("/dev/urandom","r"); fgets(password, 128, file); fclose(file); } void main() { puts("Welcome to my ultra secure login service!"); // no way they can guess my password if it's random! generate_password(); char input[128]; printf("Enter the password: "); fgets(input, 128, stdin); if (strcmp(input, password) == 0) { char flag[128]; FILE *file = fopen("flag.txt","r"); if (!file) { puts("Error: missing flag.txt."); exit(1); } fgets(flag, 128, file); puts(flag); } else { puts("Wrong!"); } }