Advertisement
Guest User

33

a guest
Nov 1st, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5.  
  6. void login(){
  7. int passcode1;
  8. int passcode2;
  9.  
  10. printf("enter passcode1 : ");
  11. scanf("%d", passcode1);
  12. fflush(stdin);
  13.  
  14. // ha! mommy told me that 32bit is vulnerable to bruteforcing :)
  15. printf("enter passcode2 : ");
  16. scanf("%d", passcode2);
  17.  
  18. printf("checking...\n");
  19. if(passcode1==338150 && passcode2==13371337){
  20. printf("Login OK!\n");
  21. system("/bin/cat flag");
  22. }
  23. else{
  24. printf("Login Failed!\n");
  25. exit(0);
  26. }
  27. }
  28.  
  29. void welcome(){
  30. char name[100];
  31. printf("enter you name : ");
  32. scanf("%100s", name);
  33. printf("Welcome %s!\n", name);
  34. }
  35.  
  36. int main(){
  37. printf("Toddler's Secure Login System 1.0 beta.\n");
  38.  
  39. welcome();
  40. login();
  41.  
  42. // something after login...
  43. printf("Now I can safely trust you that you have credential :)\n");
  44. return 0;
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement