社区讨论

求助关于freopen被认为是病毒

灌水区参与者 8已保存回复 8

讨论操作

快速查看讨论及其快照的属性,并进行相关操作。

当前回复
8 条
当前快照
1 份
快照标识符
@m0d9pa58
此快照首次捕获于
2024/08/28 10:59
2 年前
此快照最后确认于
2025/11/04 22:13
4 个月前
查看原帖
今天写了一个这样的代码:
CPP
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int MX=1e6+10;
const int mod=1e9+7;
int main(){
	freopen("main.txt","w",stdout);
	cout << 114514;
	fclose(stdout);
	cout << 1919810;
	freopen("main.txt","r",stdin);
	int a;
	cin >> a;
	if(a==114514){
		cout << 114514;
	}
	return 0;
}
然后运行的时候被火绒卡掉了,火绒是这么说的:
CPP
病毒名称:HVM:HackTool/RingQ.b
病毒ID:3B8A43362EB7BFC6
病毒路径:C:\Users\29383\Desktop\main.exe
操作类型:修改 
操作结果:已处理,删除文件

进程ID:2680
操作进程:C:\Program Files\RedPanda-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe
操作进程命令行:"C:/Program Files/RedPanda-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe" -plugin "C:/Program Files/RedPanda-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/liblto_plugin-0.dll" "-plugin-opt=C:/Program Files/RedPanda-Cpp/MinGW64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/lto-wrapper.exe" -plugin-opt=-fresolution=C:\Users\29383\AppData\Local\Temp\ccFJpSk1.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin
父进程:C:\Program Files\RedPanda-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\10.3.0\collect2.exe
请问有没有神犇解释一下为什么

回复

8 条回复,欢迎继续交流。

正在加载回复...