如果你的Bit-defender报告了虚假阳性问题Gen:Variant.Tedy.304469,你可以按照以下步骤解决问题:
确认你的电脑已经更新到最新版本的Bit-defender软件。
禁用Bit-defender全盘扫描功能,或将其设置为“仅扫描已知的安全文件”。
将被误报的文件加入到Bit-defender的信任列表中,以便Bit-defender不会再次误报。
以下是将文件加入Bit-defender信任列表的代码示例:
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class BitdefenderTrustList {
public static void main(String[] args) {
//设置需要加入信任列表的文件路径
Path trustedFilePath = Paths.get("C:\\Program Files\\MyProgram\\MyFile.exe");
//获取Bit-defender的信任列表路径
Path trustListPath = Paths.get(System.getenv("APPDATA") + "\\Bitdefender\\Bitdefender 2019\\bdre\\data\\trusted_apps.txt");
try {
//将文件路径写入Bit-defender信任列表
Files.write(trustListPath, (trustedFilePath.toString() + "\n").getBytes(), java.nio.file.StandardOpenOption.APPEND);
System.out.println("已将文件路径添加到Bit-defender信任列表!");
} catch (IOException e) {
System.err.println("添加文件路径到Bit-defender信任列表失败!");
e.printStackTrace();
}
}
}
将上述代码中的“trustedFilePath”修改为你需要加入信任列表的文件路径,运行程序即可将该文件加入Bit-defender信任列表。
下一篇:Bit-没有定义构建任务的组件。