#include<stdio.h>
#include<conio.h>
union abc
{
int a;
int x;
float g;
};
struct pqr
{
int a;
int x;
float g;
} ;
void main()
{
union abc b;
struct pqr c;
clrscr();
b.a=10;
textbackground(2);
textcolor(6);
cprintf(" A = %d",b.a);
printf("\nUnion = %d",sizeof(b));
printf("\nStructure = %d",sizeof(c));
getch();
}
이 프로그램을 virus.cpp로 저장했습니다. Turbo C 컴파일러를 사용하여이 프로그램을 컴파일하고 Turbo C (Ctrl + F9)에서 실행합니다.C 언어 프로그램이 바이러스로 탐지되었습니다.
Windows 7을 사용하고 Avira AntiVir 바이러스 시스템을 설치했습니다.
위의 프로그램을 실행하려고하면 웜 (DOS/Candy)이 생성됩니다. 나는 프로그램에 잘못된 점이 없다고 생각한다. 이제 여기
특별한 무언가이다. 다음과 같은 차이점이있는 동일한 프로그램을 실행하십시오.
#include<stdio.h>
#include<conio.h>
union abc
{
int a;
int x;
float g;
};
struct pqr
{
int a;
int x;
float g;
} ;
void main()
{
union abc b;
struct pqr c;
clrscr();
b.a=10;
textbackground(2);
textcolor(6);
cprintf(" A = %d",b.a);
printf("\n Union = %d",sizeof(b));
printf("\n Structure = %d",sizeof(c));
getch();
}
차이가 아니라 \ n 공간 : 여기 유일한 차이점 \n
사이의 공간이다. 내 질문은, 왜 내 간단한 프로그램이 바이러스로 탐지되는 것입니까? 심지어는 바이러스가 아닌 -
#include<iostream.h>
#include<conio.h>
class A
{
int a,b;
public:
A()
{
a=0;b=0;
}
A(int x)
{a=x;
b=0;
}
A(int x,int y)
{
a=x;
b=y;
}
~A()
{
cout<<"All things are deleted.";
}
void get()
{
cout<<"\nA = "<<a;
cout<<"\nB = "<<b;
}
};
void main()
{
A a1(5,10);
clrscr();
a1.get();
getch();
}
나는 그것이 "바이러스 경고"를주는이 프로그램을 실행
가 : 여기 다른 코드 예제, C++이 시간입니다. 이제 비극은 파괴자를 제거하면 바이러스로 탐지하지 못합니다.C Language - \n - creating virus
문제는 어떻게, 그리고 왜 : 여기
는 스크린 샷과 비슷한 질문입니까?
호기심에서 벗어나 : 왜 20 살짜리 컴파일러를 사용하고 있습니까? –
의심의 여지가 있지만,이 바이러스는 코드에서 정의되지 않은 동작으로부터 발전합니다. –
'void main'을 사용 했으므로 컴파일러가 프로그램을 바이러스로 변환하고 있습니다. :-) –