From 9f3bf4fb87b8f7da92f2808b063d0b26e788d853 Mon Sep 17 00:00:00 2001 From: BasileiaRhomaion1453 <974505452@qq.com> Date: Fri, 17 May 2024 21:24:49 +0800 Subject: [PATCH] Add files via upload --- password.txt | Bin 0 -> 32 bytes password1.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 password.txt create mode 100644 password1.c diff --git a/password.txt b/password.txt new file mode 100644 index 0000000000000000000000000000000000000000..ad06aca52c2a25b1a8731efdebae2583d2c04803 GIT binary patch literal 32 OcmZ>C#0>&O9T)(Gr3b +#include +#include +void attack() +{ + printf("ATTACK\n"); //attack函数 + system("pause"); +} + +int fuc(){ + //while(1){ + char password[6] = "ABCDE"; + password[5]='\0'; + char str[6]; + str[5]='\0'; + FILE *fp; + if((fp=fopen("./password.txt","r"))) //打开D盘的password.txt文件 + fscanf(fp,"%s",str); //将str的内容写入fp + if(!strncmp(password,str,6)) + { //判断str是否与password相同 + printf("OK.\n"); + } + else{ + printf("NO.\n"); + } + return 0; + + //} //运行func函数 +} +int main() +{ + fuc(); + return 0; +}