Advertisement
Guest User

Untitled

a guest
Jan 24th, 2015
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5. int main(void)
  6. {
  7.     char *mystr=(char*)malloc(sizeof(char)*50),*mypass=(char*)malloc(sizeof(char)*50);
  8.     strcpy(mypass,"MyPassword!!");
  9.     printf("[~] Please Enter your Password Here: ");
  10.     fgets(mystr,49,stdin);
  11.     if (!strcmp(strcat(mypass,"\n"),mystr) )
  12.         printf("\n\n[~] Right Password!\n\n");
  13.     else
  14.         printf("\n\n[!] Wrong Password!\n\n");
  15.     system("PAUSE");
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement