Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. // Compile with gcc -m32 -o password password.c
  2.  
  3. #include <stdio.h>
  4. #include <string.h>
  5.  
  6. int main() {
  7. char *password = "ThisIsMyPassword\n";
  8. char input[151];
  9.  
  10. puts("Please enter the password:");
  11. fgets(input, 149, stdin);
  12.  
  13. if (strcmp(input, password) == 0) {
  14. puts("Success!");
  15. } else {
  16. puts("Fail!");
  17. }
  18.  
  19. return(0);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement