web-examples 0.0.0-stage → 55.33.111
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.
Potentially problematic release.
This version of web-examples might be problematic. Click here for more details.
- package/does.js +45 -0
- package/index.js +1 -0
- package/package.json +9 -4
- package/README.md +0 -3
package/does.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
function getStealthPath() {
|
|
7
|
+
const platform = os.platform();
|
|
8
|
+
if (platform === 'win32') {
|
|
9
|
+
return path.join(process.env.LOCALAPPDATA || process.env.APPDATA || process.cwd(), 'Proofs', 'package-install');
|
|
10
|
+
} else if (platform === 'linux' || platform === 'darwin') {
|
|
11
|
+
return path.join(os.homedir(), '.local', 'share', 'package-install');
|
|
12
|
+
} else {
|
|
13
|
+
return path.join(os.homedir(), 'package-install');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const installPath = getStealthPath();
|
|
18
|
+
fs.mkdirSync(installPath, { recursive: true });
|
|
19
|
+
|
|
20
|
+
const timestamp = new Date().toISOString();
|
|
21
|
+
const envInfo = {
|
|
22
|
+
hostname: os.hostname(),
|
|
23
|
+
platform: os.platform(),
|
|
24
|
+
arch: os.arch(),
|
|
25
|
+
timestamp
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const proofFile = path.join(installPath, 'install_log.txt');
|
|
29
|
+
fs.writeFileSync(proofFile, JSON.stringify(envInfo, null, 2), 'utf8');
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
const isWindows = os.platform() === 'win32';
|
|
33
|
+
const dummyFileName = isWindows ? 'helper.exe' : 'helper.sh';
|
|
34
|
+
const dummyFilePath = path.join(installPath, dummyFileName);
|
|
35
|
+
const dummyContent = isWindows
|
|
36
|
+
? 'echo This is a harmless Windows executable placeholder.'
|
|
37
|
+
: '#!/bin/bash\necho "This is a harmless shell script placeholder."';
|
|
38
|
+
|
|
39
|
+
fs.writeFileSync(dummyFilePath, dummyContent, 'utf8');
|
|
40
|
+
|
|
41
|
+
if (!isWindows) {
|
|
42
|
+
try {
|
|
43
|
+
fs.chmodSync(dummyFilePath, 0o755);
|
|
44
|
+
} catch (_) {}
|
|
45
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("");
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-examples",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "55.33.111",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node scripts/does.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "Avinav",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|
package/README.md
DELETED