Guest User

Arc injection

a guest
Feb 4th, 2020
92
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int check(void) {
  5.     char correct[8]="arc";
  6.     char input[8];
  7.     int ok=0;
  8.     printf("password: ");
  9.     gets(input);
  10.     if(strcmp(input,correct)==0) {
  11.         ok=1;
  12.     }
  13.     return ok;
  14. }
  15. int main(void) {
  16.     int a=check();
  17.     if(a) printf("Access granted\n");
  18.     else printf("Access denied\n");
  19.     return a?0:1;
  20. }
RAW Paste Data