This file is indexed.

/usr/lib/autorun4linuxcd/autorun/autorun.vbs is in autorun4linuxcd 0.13+nmu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
' Copyright (C) 2007 Franklin Piat <fpiat@bigfoot.com>
'
' This program is free software; you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation; either version 2 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful, but
' WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
' General Public License for more details.

Option Explicit
Const FsoOpenForReading = 1, FsoOpenForWriting = 2, FsoOpenForAppending = 8
Const TristateFalse = -2
Dim CurrentTab
Dim DefaultTab
Dim WshShell
Dim fso
Dim oScriptFile
Dim oScriptFolder

Sub About_callBack()
	' nothing to do
End Sub

Sub Refs_callBack()
	' nothing to do
End Sub

Sub MainPage_callBack()
	' nothing to do
End Sub

Sub QemuPage_callBack()
	' nothing to do
End Sub

Sub QemuOptions_callBack()
	' nothing to do
End Sub

' ///////////////////////////////////////////////////////////////

Function Between( ByRef x, ByRef minVal, ByRef maxVal )
	Between = Min(Max( minVal, x),maxVal)
End Function

Function Max(ByRef a, ByRef b)
	If (a>b) Then
		Max = a
	Else
		Max = b
	End If
End Function

Public Function Min(ByRef a,ByRef b)
	If (a>b) Then
		Min = b
	Else
		Min = a
	End If
End Function

' ///////////////////////////////////////////////////////////////

Sub buildMenu()
	Dim td, action,title, node
	For each td in document.getElementById("main").childNodes
		title = td.title
		action = td.id
		action = left(action,len(action)-7)
		Set node = document.createElement("<input id=""" & action & "Tab"" type=""button"" href=""#" & td.id & """ class=""tabTitle"" value=""" & title & """ />")
		menu.appendChild(node)
		Set document.getElementById(action & "Tab").onclick =  GetRef("ShowHideTab")
	Next
End Sub

Sub DOM_removeChildren(obj)
	Dim subObj
	For Each subObj in obj.childNodes
		If (subObj.hasChildNodes()) Then
			DOM_removeChildren(subObj)
		End If
		obj.removeChild(subObj)
	 Next
End Sub

Sub ShowHideTab()
	Dim action, Sub_exists

	if (window.event.type = "click" ) Then
		action = window.event.srcElement.id
		If (Not  right(action ,3) = "Tab") Then
			Exit Sub
		End If
		action = left(action,len(action)-3)
	Else
		action = DefaultTab
	End If

	If (CurrentTab <> "") Then
		window.document.getElementById(CurrentTab & "Content").style.display = "none"
		window.document.getElementById(CurrentTab & "Tab").style.borderColor = ""
		window.document.getElementById(CurrentTab & "Tab").style.backgroundColor = ""
  		window.document.getElementById(CurrentTab & "Tab").style.color = ""
	End If
	window.document.getElementById(action & "Content").style.display = "block"
	window.document.getElementById(action & "Tab").style.borderColor  = ""
	window.document.getElementById(action & "Tab").style.backgroundColor = "highlight"
	window.document.getElementById(action & "Tab").style.color = "CaptionText"
	CurrentTab = action
	Execute("Call " & action & "_callBack()")
End Sub

Function checkRunningInHTA()
	checkRunningInHTA = not IsNull(myHta.getAttribute("commandLine"))
End Function

Sub ParseArgs
	'Parse Args:
	'http://www.microsoft.com/technet/scriptcenter/resources/qanda/apr05/hey0420.mspx
	arrCommands = Split(oHTA.commandLine, chr(34))
	For i = 3 to (Ubound(arrCommands) - 1) Step 2
		Msgbox arrCommands(i)
	Next
End Sub


Sub Could_Not_Load_AutorunVBS()
	' XXX.VBS has been fount.. fine !
	' This sub is for debug purpose only
End Sub

' ///////////////////////////////////////////////////////////////


Sub runVM()
	Dim cmd, Drive
'		& " -hda \\.\PhysicalDrive1 "_
	Drive = oDrive.driveLetter
	'Drive = "D"
	cmd = """" & oScriptFolder.Path & "\qemu\qemu.exe"" -L " & oScriptFolder.Path & "\qemu\ -no-kqemu " _
		& " -hda \\.\" & Drive  & ": -snapshot "_
		& " -kernel """ & Drive &":\" & Replace(bKernel.value,"/","\") & """ "
	If (Trim(bInitrd.value) <> "") Then
		cmd = cmd & " -initrd """ & Drive &":\" & Replace(Trim(bInitrd.value),"/","\") & """ "
	End If

	If (Trim(bAppend.value) <> "") Then
		cmd = cmd & " -append """ & Trim(bAppend.value) & """ "
	End If

	'WshShell.run  "cmd /k echo " & cmd
	WshShell.run  cmd
End Sub


Sub keyEventHandler()
	key = window.event.Keycode
	If (key >= 48 And key <= 57) Then
		key = key - 48
		If (helpPages.Exists("F" & key) And VarType(WshShell) = 9) Then
			WshShell.exec "notepad " & oDrive.driveLetter &":\"& helpPages.item("F" & key)
		End If
	End If
End Sub

sub configListChanged()
	dim s, p
	bKernel.value = bootConfigs.item(configList.value).item("KERNEL")
	bIPAppend.value = bootConfigs.item(configList.value).item("IPAPPEND")
	s = " " &bootConfigs.item(configList.value).item("APPEND")
	p = InStr(s,"initrd=")
	If (p>0) Then
		bAppend.value = Trim( Left(s,p-1) & Mid(s,InStr(p,s," ")))
		bInitrd.value = Mid(s,p+7,InStr(p,s," ")-1 -7)
	Else
		bInitrd.value = ""
		bAppend.value = bootConfigs.item(configList.value).item("APPEND")
	End If
	Call localeChanged()
End Sub


' ## LOAD SYSCONF FILE
Sub LoadSysConfFile()
	Dim ts, currentLabel, s, p, keyword, args, bootConfigs_default, keynames,i, myOpt, lastline
	Set helpPages = CreateObject("Scripting.Dictionary")
	Set bootConfigs = CreateObject("Scripting.Dictionary")
	On Error Resume next
	Err.Clear
	Set ts = fso.OpenTextFile(oDrive.driveLetter & ":\syslinux.cfg", FsoOpenForReading, false, TristateFalse)
	If (Err.Number > 0) Then
		Err.Clear
		Set ts = fso.OpenTextFile(oDrive.driveLetter & ":\syslinux\syslinux.cfg", FsoOpenForReading, false, TristateFalse)
	End If
	If (Err.Number > 0) Then
		Err.Clear
		Set ts = fso.OpenTextFile(oDrive.driveLetter & ":\isolinux\isolinux.cfg", FsoOpenForReading, false, TristateFalse)
	End If
	If (Err.Number > 0) Then
		runVmBtn.disabled = "disabled"
		Exit Sub
	End If
	On Error Goto 0
	currentLabel=""
	bootConfigs.add currentLabel, CreateObject("Scripting.Dictionary")
	bootConfigs.item(currentLabel).add "KERNEL",   "linux"
	bootConfigs.item(currentLabel).add "APPEND",   ""
	bootConfigs.item(currentLabel).add "IPAPPEND", ""
	Do While Not ts.AtEndOfStream
		s = Trim(Replace(ts.ReadLine,vbTab," "))
		p = InStr(s," ")
		If (( Left(s,1) <> "#" ) And (s <> "") And (p>1) ) Then
			keyword = UCase(Left(s, p - 1 ))
			If (keyword = "MENU") Then
				p = InStr(p+1,s," ")
				keyword = UCase(Left(s, p - 1 ))
				' If (keyword = "MENU LABEL") Then keyword="LABEL"
			End If
			args = Ltrim(Mid(s, p + 1))
			Select Case keyword
				Case "DEFAULT"
					bootConfigs_default = args
				Case "LABEL"
					currentLabel = args
					If Not bootConfigs.Exists(args) Then
						bootConfigs.add args, CreateObject("Scripting.Dictionary")
						If ((Left(lastline,2) = "# ") and (Trim(Mid(lastline,2,99)) <> "")) Then
							bootConfigs.item(args).add "LABEL", Trim(Mid(lastline,2,99))
						Else
							bootConfigs.item(args).add "LABEL", Trim(args)
						End If
						bootConfigs.item(args).add "KERNEL", bootConfigs.item("").item("KERNEL")
						bootConfigs.item(args).add "APPEND", bootConfigs.item("").item("APPEND")
						bootConfigs.item(args).add "IPAPPEND", bootConfigs.item("").item("IPAPPEND")
					End If
				Case "MENU LABEL"
					bootConfigs.item(currentLabel).item("LABEL") = Trim(args)
				Case "KERNEL"
					bootConfigs.item(currentLabel).item("KERNEL") = args
				Case "APPEND"
					If (args="-") Then
						bootConfigs.item(currentLabel).item("APPEND") = ""
					Else
						bootConfigs.item(currentLabel).item("APPEND") = args
					End If
				Case "IPAPPEND"
					If (args="-") Then
						bootConfigs.item(currentLabel).item("APPEND") = ""
					Else
						bootConfigs.item(currentLabel).item("APPEND") = args
					End If
				Case "F1","F2","F3","F4","F5","F6","F7","F8","F9","F0"
					If Not helpPages.Exists(keyword) Then
						helpPages.add keyword, args
					Else
						helpPages.item(keyword) = args
					End If
				Case "SAY"
					'TODO
				Case "DISPLAY"
					'TODO
				Case "ALLOWOPTIONS"
				Case "IMPLICIT"
				Case "PROMPT"
					'TODO
				Case "TIMEOUT"
					'Ignored !
				Case Else
					MsgBox "Ignored Line :" & vBcRlF & "'" & keyword & "' '" & args & "'"
			End Select
		End If
		lastline = s
	Loop


	' ## insert syslinux menu entries in the dropdown list
	If (bootConfigs.count > 1) Then
		configList.style.Visibility= "visible"
		keynames = bootConfigs.Keys
		For i = 0 to bootConfigs.count -1
			If ((keyNames(i) <> "" Or keyNames(i) = bootConfigs_default) _
				AND Not ( InStr(LCase(bootConfigs.item(keyNames(i)).item("KERNEL")),"memtest") >=1 )) Then
				Set myOpt = Document.createElement("OPTION")
				myOpt.Text = bootConfigs.item(keyNames(i)).item("LABEL")
				myOpt.Value = keyNames(i)
				If (keyNames(i) = bootConfigs_default) Then
					myOpt.selected="selected"
				End If
				configList.add(myOpt)
			End If
		Next
	Else
		configList.style.Display = "none"
		configList.style.Visibility= "hidden"
	End if
	' ## trigger an event, to reload "options" page.
	Call configListChanged()
End Sub

Sub localeChanged()
	Dim locale , p, p2
	locale = localesList.value
	If (InStr(locale,".")>0) Then
		locale = Left (locale, InStr(locale,".")-1)
	End If
	p = inStr(Lcase(bAppend.value), "lang=")
	if (p >= 1) Then
		p2 = inStr(p, Lcase(bAppend.value), " ")
		if (p2 >= 1) Then
			bAppend.value = Left(bAppend.value,p -1) & "lang=" & locale & Mid(bAppend.value,p, p2-p)
		Else
			bAppend.value = Left(bAppend.value,p -1) & "lang=" & locale
		End If
	Else
		bAppend.value = bAppend.value & " lang=" & locale
	End if

End Sub


' ##Let's pick a keyboard and language (according to current windows session)
Sub ChooseLang()
	Dim lang,i,j,myOpt
	If (InStr("PAD,"&availableLocales&",",  ","&Left(navigator.userLanguage,5))>1) Then
		lang = Left(navigator.userLanguage,5)
	ElseIf (InStr("PAD,"&availableLocales&",",  ","&Left(navigator.userLanguage,2))>1) Then
		lang = Left(navigator.userLanguage,2)
	Else
		lang = ""
	End If

	Dim ts, s
	On Error Resume next
	Err.Clear
	Set ts = fso.OpenTextFile(oDrive.driveLetter & ":\autorun\language.txt", FsoOpenForReading, false, TristateFalse)
	If (Err.Number = 0) Then
		On Error GoTo 0
		Do While Not ts.AtEndOfStream
			s = Split(Trim(Replace(ts.ReadLine,vbTab," ")),";",-1, vbTextCompare)
			If (UBound(s) >= 6) Then
				Set myOpt = Document.createElement("OPTION")
				myOpt.Value = s(4)
				myOpt.Text = s(0)
			'	MsgBox myOpt.Value &"/"& lang
				localesList.add(myOpt)
				If (s(2) = lang) Then
					myOpt.selected="selected"
				End If
			End If
		Loop
	Else
		On Error GoTo 0
		i = 1
		Do While (inStr(i,availableLocales,",") <> False)
			j = inStr(i,availableLocales,",")
			Set myOpt = Document.createElement("OPTION")
			myOpt.Value = Mid(availableLocales,i,j-i)
			myOpt.Text = myOpt.Value
		'	MsgBox myOpt.Value &"/"& lang
		'		If (myOpt.Value = lang) Then
		'			myOpt.selected="selected"
		'		End If
			localesList.add(myOpt)
			i = j+1
		Loop
		localesList.Value = lang
	End If
End Sub