Skip to content

Instantly share code, notes, and snippets.

@macostag
Created June 16, 2019 16:05
Show Gist options
  • Save macostag/b72f3480dbde9273ea3f5202408b3f7d to your computer and use it in GitHub Desktop.
Save macostag/b72f3480dbde9273ea3f5202408b3f7d to your computer and use it in GitHub Desktop.
Downloader WScript.
var WinHttpReq = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
WinHttpReq.Open("GET", WScript.Arguments(0), /*async=*/false);
WinHttpReq.Send();
BinStream = new ActiveXObject("ADODB.Stream");
BinStream.Type = 1;
BinStream.Open();
BinStream.Write(WinHttpReq.ResponseBody);
BinStream.SaveToFile("c:\\Windows\\Temp\\file.txt");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment