Guest User

crackme.c

a guest
Mar 9th, 2017
1,852
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void secret() {
  4. printf("You found the secret function!\n");
  5. printf("Congrats!\n");
  6. printf("The password is: Rev3ngineering1sc00l!\n");
  7. exit(0);
  8. }
  9.  
  10. int main() {
  11. char pass[] = "Rev3ngineering1sc00l!";
  12. char input[30];
  13. int valid = 0;
  14.  
  15. printf("Enter the password! ");
  16. gets(input);
  17.  
  18. if (!memcmp(input, pass, 22)) {
  19. valid = 1;
  20. }
  21.  
  22. printf("\nChecking password...\n\n");
  23.  
  24. if (valid) {
  25. printf("Successfully logged in!\nGood job!\n");
  26. exit(0);
  27. } else {
  28. printf("Login failed!\n");
  29. }
  30.  
  31. return 0;
  32. }
Add Comment
Please, Sign In to add comment