AV抱怨code是恶意 [英] AV complains code is malicious
问题描述
当我调试我的项目,我的AV(Avast的)抱怨说,.exe文件感染了 Win32的前夕根[停赛]
,然后编译器说:无法复制文件OBJ \ 86 \调试\ Payroll.exe到斌\调试\ Payroll.exe。找不到文件的obj \ 86 \调试\ Payroll.exe'。
这是令人惊讶的是,当我注释掉以下code表格,没有病毒,它编译没有错误!什么是恶意这里?
私人布尔ValidateView()
{
如果(string.IsNullOrWhiteSpace(txtEmployeeID.Text))
{
的MessageBox.show(空字段雇员ID);
返回false;
}
如果(string.IsNullOrWhiteSpace(cmbName.Text))
{
的MessageBox.show(空场员工姓名);
返回false;
}
如果(string.IsNullOrWhiteSpace(cmbType.Text))
{
的MessageBox.show(空字段雇员ID);
返回false;
}
如果(string.IsNullOrWhiteSpace(txtAmount.Text))
{
的MessageBox.show(空字段数量);
返回false;
}
如果(string.IsNullOrWhiteSpace(cmbMonths.Text))
{
的MessageBox.show(空场分期付款);
返回false;
}
返回true;
}
没有什么恶意的存在。这只是一个假阳性。防病毒犯了一个错误。这有时会发生。很少,但它确实。如果更新您的防病毒没有帮助,我建议将您的项目文件夹,它的例外列表中(这样就不会检查该文件夹中的病毒)。它会加快您的工作了。
When I debug my project, My AV (Avast) complains that the .exe file is infected by Win32 eve-gen [Susp]
and then the compiler says : Unable to copy file "obj\x86\Debug\Payroll.exe" to "bin\Debug\Payroll.exe". Could not find file 'obj\x86\Debug\Payroll.exe'.
It's surprising that when I commented out following code in Form , no viruses and it compiles without error! What would be malicious here?
private bool ValidateView()
{
if (string.IsNullOrWhiteSpace(txtEmployeeID.Text))
{
MessageBox.Show("Empty field Employee ID");
return false;
}
if (string.IsNullOrWhiteSpace(cmbName.Text))
{
MessageBox.Show("Empty field Employee Name");
return false;
}
if (string.IsNullOrWhiteSpace(cmbType.Text))
{
MessageBox.Show("Empty field Employee ID");
return false;
}
if (string.IsNullOrWhiteSpace(txtAmount.Text))
{
MessageBox.Show("Empty field Amount");
return false;
}
if (string.IsNullOrWhiteSpace(cmbMonths.Text))
{
MessageBox.Show("Empty field Instalments");
return false;
}
return true;
}
There's nothing malicious there. It's just a false-positive. The antivirus made a mistake. That happens sometimes. Rarely, but it does. If updating your antivirus doesn't help, I suggest adding your projects folder to it's exception list (so that it doesn't check that folder for viruses). It will speed up your work too.
这篇关于AV抱怨code是恶意的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!