打开NSSCTF靶场,下载附件得到:
![]()
打开之后让AI分析一下代码内容并写出反向求出flag的.c文件:
#include <stdio.h>
#include <string.h>
int main(){
char a[]="wwwwwww";
char b[]="d`vxbQd";
//try to find out the flag
printf("please input flag:");
scanf(" %s",&a);
if(strlen(a)!=7){
printf("NoNoNo\n");
system("pause");
return 0;
}
for(int i=0;i<7;i++){
a[i]++;
a[i]=a[i]^2;
}
if(!strcmp(a,b)){
printf("good!\n");
system("pause");
return 0;
}
printf("NoNoNo\n");
system("pause");
return 0;
//flag 记得包上 NSSCTF{} 再提交!!!
}
#include <stdio.h>
#include <string.h>
int main() {
char b[] = "d`vxbQd"

最低0.47元/天 解锁文章
2497

被折叠的 条评论
为什么被折叠?



