迅雷中的VBS脚本

标签: , , ,

无意中在迅雷安装目录下发现了一个VBS脚本xlvip_delWorkingDirectory.vbs。

On Error Resume Next
Dim osversion 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!//" & strComputer & "/root/cimv2")
Set colOperatingSystems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem In colOperatingSystems     
    osversion = objOperatingSystem.Version
Next
Dim  osiversion 
osiversion = Mid( osversion , 1, 1)

Const CSIDL_COMMON_STARTMENU = &H16
Set objShell = CreateObject("Shell.Application")
Set objAllUsersSartMenu = objShell.NameSpace(CSIDL_COMMON_STARTMENU)
strAllUsersSartMenuPath = objAllUsersSartMenu.Self.Path

'Set objFolder = objShell.Namespace(objAllUsersSartMenu) 
'Set objFolderItem = objFolder.ParseName("迅雷看看播放器.lnk") 
'Set colVerbs = objFolderItem.Verbs
'Dim attstr
'if CInt(osiversion) < 6 Then
'   attstr = "从「开始」菜单脱离(I)"
'Else
'   attstr = "从「开始」菜单解锁(U)"
'End If
'For Each objVerb in colVerbs
'    If Replace(objVerb.name, "&", "") = attstr Then 
'   Sleep 100
'       objVerb.DoIt
'    End If
'Next

' 删掉锁定到任务栏
Dim cpuaddresswidth 
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objItem in colItems
    cpuaddresswidth = objItem.AddressWidth        
Next

set WshShell = WScript.CreateObject("WScript.Shell")
Dim strWorkingDirectory
If CInt(cpuaddresswidth) = 64 And CInt(osiversion) >= 6 Then
    strWorkingDirectory = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Thunder Network\ThunderOem\thunder_backwnd\instdir") & "\program\"
End If

If strWorkingDirectory = "" Then
    strWorkingDirectory = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Thunder Network\ThunderOem\thunder_backwnd\instdir") & "\program\"
End If

'msgbox strWorkingDirectory

Set objWorkingDirectory = objShell.NameSpace(strWorkingDirectory)
Set objWorkingDirItem = objWorkingDirectory.ParseName("Thunder.exe")

Set colVerbs = objWorkingDirItem.Verbs
For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "从任务栏脱离(K)" Then 
    Sleep 100
        objVerb.DoIt
    End If
Next

'Set objFileSystem = CreateObject("Scripting.FileSystemObject")
'objFileSystem.DeleteFile(strAllUsersSartMenuPath & "\迅雷看看播放器.lnk")
'objFileSystem.DeleteFile(strWorkingDirectory & "\迅雷看看播放器.lnk")

'msgbox "ok"
赞赏

微信赞赏支付宝赞赏

随机文章:

  1. VBS基础教程第二篇
  2. 用C语言实现IBindStatusCallback接口
  3. 批处理技术内幕:预处理
  4. VBS发送带Cookie的HTTP请求
  5. VBS实现“多线程”

2 条评论 发表在“迅雷中的VBS脚本”上

  1. zffwsflove说道:

    https://code.google.com/p/pytool/source/browse/trunk/pythunder.py?r=47
    https://code.google.com/p/pytool/source/browse/trunk/aes.py?r=47
    前几天在Python中文件邮件列表里看到讨论使用Python实现迅雷,后来又在Ubuntu论坛看到一个贴子,实现了获取迅雷服务器上的侯选资源(不是开源的)。突然就对这个迅雷协议很感兴趣,在别人分析的基础上用Python写了个小工具,与Ubuntu论坛上那个作用是一样的,获取迅雷服务器上的侯选资源。

    迅雷有多个资源服务器,有的资源服务器返回完全一样,有的返回某些一样,这样可以指定多个服务器,获取更多的资源,同时也可以防止某个服务器不能正常响应。
    pythunder现在可以在google code里下载了,需要另一个aes.py文件支持。
    http://cocobear.info/blog/close-guestbook/
    http://cocobear.info/blog/rewrite-pythunder/

    ——————————————————————

    Python获取迅雷服务器上的侯选资源,再调用wget, Demon兄会不会感兴趣呢?

  2. 名称说道:

    大神膜拜

留下回复