Advertisement
InfectedPacket

Vuln1 Target Program

Mar 20th, 2017
940
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void)
  5. {
  6.     char login[32];
  7.     char passwd[32];
  8.    
  9.     printf("Login: \n");
  10.     gets(login);
  11.     printf("Password: \n");
  12.     gets(passwd);
  13.    
  14.     if (strcmp(login, "root") == 0) {
  15.         if (strcmp(passwd, "1qazxsw2") == 0) {
  16.             printf("Access Granted.\n");
  17.             return 0;
  18.         }
  19.     }
  20.    
  21.     printf("Access Denied.\n");
  22.     return 1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement