Suvarii commited on
Commit
bf54bd2
·
verified ·
1 Parent(s): 4361e24

Update public/index.html

Browse files
Files changed (1) hide show
  1. public/index.html +104 -8
public/index.html CHANGED
@@ -265,6 +265,7 @@
265
  <option value="antibotmove">Anti Bot Yürüyüşü</option>
266
  <option value="sendmsg">Chate Mesaj Gönder</option>
267
  <option value="sendmoney">Para Gönder</option>
 
268
  </select>
269
  </div>
270
 
@@ -285,6 +286,20 @@
285
  <input type="text" id="bulk-nick-confirm-input" placeholder="Nicki tekrar yaz (onay)" class="bg-zinc-900 border border-red-900 text-zinc-200 text-xs rounded-xl p-2.5 focus:outline-none placeholder:text-zinc-600">
286
  </div>
287
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
  <button onclick="executeBulkAction()" id="bulk-execute-btn" class="w-full bg-red-950/40 hover:bg-red-900/60 border border-red-800 text-red-300 text-xs font-black py-3 rounded-xl transition-all uppercase tracking-wider mb-4">Talimatı Filtrelenmiş Botlara Gönder</button>
289
 
290
  <div id="bulk-progress-list" class="space-y-1 text-[11px] font-mono custom-scrollbar max-h-[35vh] overflow-y-auto"></div>
@@ -313,6 +328,13 @@
313
  { key: 'iron_block', label: 'Iron Block', short: 'IRN', color: '#a1a1aa' }
314
  ];
315
 
 
 
 
 
 
 
 
316
  function sleep(ms) {
317
  return new Promise(resolve => setTimeout(resolve, ms));
318
  }
@@ -1152,6 +1174,19 @@
1152
 
1153
  ${renderStoragePanel(bot)}
1154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
  <div class="bg-zinc-950 border border-red-950/60 rounded-xl p-4 md:col-span-2">
1156
  <h4 class="font-bold text-red-400 text-xs uppercase tracking-wider border-b border-zinc-900 pb-2 mb-3">⚠ Para Gönder</h4>
1157
  <p class="text-[11px] text-zinc-500 leading-relaxed mb-3">Bu botun TÜM bakiyesini yazdığın nick'e gönderir. Geri alınamaz, dikkatli yaz.</p>
@@ -1166,6 +1201,49 @@
1166
  applyPrivacyFilter();
1167
  }
1168
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1169
  async function triggerSendMoneySingle(url) {
1170
  const input = document.getElementById('single-sendmoney-input');
1171
  const btn = document.getElementById('single-sendmoney-btn');
@@ -1296,11 +1374,12 @@
1296
 
1297
  // ---------------------------------------------------------------
1298
  // TOPLU İŞLEMLER: ana ekrandaki aktif filtreye uyan tüm botlara aynı
1299
- // talimatı (start/stop/mesaj/para gönderme vb.) yollar. İstekler
1300
- // arasına isteğe bağlı bir gecikme (ms) eklenebilir - varsayılan 0'dır,
1301
- // yani hepsi aynı anda (paralel) gönderilir. Gecikme girilirse istekler
1302
- // sırayla ve aralarında o kadar bekleyerek (staggered) tetiklenir; bu,
1303
- // aynı anda çok sayıda bota istek düşmesini yumuşatmak için kullanılır.
 
1304
  // ---------------------------------------------------------------
1305
  function openBulkModal() {
1306
  document.getElementById('bulk-modal').classList.remove('hidden');
@@ -1308,6 +1387,7 @@
1308
  document.getElementById('bulk-msg-input').value = '';
1309
  document.getElementById('bulk-nick-input').value = '';
1310
  document.getElementById('bulk-nick-confirm-input').value = '';
 
1311
  onBulkActionChange();
1312
  updateBulkTargetCount();
1313
  }
@@ -1325,6 +1405,7 @@
1325
  const action = document.getElementById('bulk-action-select').value;
1326
  document.getElementById('bulk-msg-wrapper').style.display = action === 'sendmsg' ? 'flex' : 'none';
1327
  document.getElementById('bulk-nick-wrapper').style.display = action === 'sendmoney' ? 'flex' : 'none';
 
1328
  }
1329
 
1330
  function getBulkDelayMs() {
@@ -1348,7 +1429,8 @@
1348
  checkfarmer: '/api/proxy/checkfarmer',
1349
  antibotmove: '/api/proxy/antibotmove',
1350
  sendmsg: '/api/proxy/sendmsg',
1351
- sendmoney: '/api/proxy/sendmoney'
 
1352
  };
1353
 
1354
  const BULK_ACTION_LABELS = {
@@ -1357,7 +1439,8 @@
1357
  skyblock: "Skyblock'a Işınlan", besleyici: 'Besleyici Kontrol',
1358
  ciftci: 'Çiftçi Sat', kazici: 'Kazıcı Kontrol', checkfarmer: 'Çiftçi Stok Kontrol',
1359
  antibotmove: 'Anti Bot Yürüyüşü',
1360
- sendmsg: 'Chate Mesaj Gönder', sendmoney: 'Para Gönder'
 
1361
  };
1362
 
1363
  function safeRowId(url) {
@@ -1379,6 +1462,7 @@
1379
 
1380
  let nick = '';
1381
  let message = '';
 
1382
 
1383
  if (action === 'sendmoney') {
1384
  nick = (document.getElementById('bulk-nick-input').value || '').trim();
@@ -1403,6 +1487,17 @@
1403
  if (!confirm(`Filtrelenen ${targets.length} bota chat üzerinden "${message}" mesajı gönderilecek. Onaylıyor musun?`)) {
1404
  return;
1405
  }
 
 
 
 
 
 
 
 
 
 
 
1406
  } else if (!confirm(`Filtrelenen ${targets.length} bota "${BULK_ACTION_LABELS[action] || action}" talimatı gönderilecek. Onaylıyor musun?`)) {
1407
  return;
1408
  }
@@ -1429,6 +1524,7 @@
1429
  let qs = `?url=${encodeURIComponent(bot.url)}`;
1430
  if (action === 'sendmoney') qs += `&nick=${encodeURIComponent(nick)}`;
1431
  if (action === 'sendmsg') qs += `&message=${encodeURIComponent(message)}`;
 
1432
 
1433
  const res = await fetch(`${path}${qs}`);
1434
  const result = await res.json();
@@ -1451,4 +1547,4 @@
1451
  setInterval(fetchData, 10000);
1452
  </script>
1453
  </body>
1454
- </html>
 
265
  <option value="antibotmove">Anti Bot Yürüyüşü</option>
266
  <option value="sendmsg">Chate Mesaj Gönder</option>
267
  <option value="sendmoney">Para Gönder</option>
268
+ <option value="order">Order Satış</option>
269
  </select>
270
  </div>
271
 
 
286
  <input type="text" id="bulk-nick-confirm-input" placeholder="Nicki tekrar yaz (onay)" class="bg-zinc-900 border border-red-900 text-zinc-200 text-xs rounded-xl p-2.5 focus:outline-none placeholder:text-zinc-600">
287
  </div>
288
 
289
+ <div id="bulk-order-wrapper" class="hidden flex-col gap-3 mb-4">
290
+ <div class="flex flex-col gap-1.5">
291
+ <label class="text-[10px] font-bold text-zinc-500 uppercase tracking-wider">Satılacak Item</label>
292
+ <select id="bulk-order-item-select" class="bg-zinc-900 border border-zinc-800 text-zinc-200 text-xs rounded-xl p-2.5 focus:outline-none">
293
+ <option value="diamond">Elmas (Diamond)</option>
294
+ <option value="emerald">Zümrüt (Emerald)</option>
295
+ </select>
296
+ </div>
297
+ <div class="flex flex-col gap-1.5">
298
+ <label class="text-[10px] font-bold text-red-400 uppercase tracking-wider">⚠ Hedef Nick — TÜM filtrelenen botlar order satışını buraya gönderecek</label>
299
+ <input type="text" id="bulk-order-nick-input" placeholder="Örn: NexoHD" class="bg-zinc-900 border border-red-900 text-zinc-200 text-xs rounded-xl p-2.5 focus:outline-none placeholder:text-zinc-600">
300
+ </div>
301
+ </div>
302
+
303
  <button onclick="executeBulkAction()" id="bulk-execute-btn" class="w-full bg-red-950/40 hover:bg-red-900/60 border border-red-800 text-red-300 text-xs font-black py-3 rounded-xl transition-all uppercase tracking-wider mb-4">Talimatı Filtrelenmiş Botlara Gönder</button>
304
 
305
  <div id="bulk-progress-list" class="space-y-1 text-[11px] font-mono custom-scrollbar max-h-[35vh] overflow-y-auto"></div>
 
328
  { key: 'iron_block', label: 'Iron Block', short: 'IRN', color: '#a1a1aa' }
329
  ];
330
 
331
+ // Order Satış özelliğinde seçilebilecek itemler - backend de aynı
332
+ // iki değeri kabul ediyor (/bot/order?item=diamond|emerald).
333
+ const ORDER_ITEMS = [
334
+ { key: 'diamond', label: 'Elmas (Diamond)' },
335
+ { key: 'emerald', label: 'Zümrüt (Emerald)' }
336
+ ];
337
+
338
  function sleep(ms) {
339
  return new Promise(resolve => setTimeout(resolve, ms));
340
  }
 
1174
 
1175
  ${renderStoragePanel(bot)}
1176
 
1177
+ <div class="bg-zinc-950 border border-cyan-950/60 rounded-xl p-4 md:col-span-2">
1178
+ <h4 class="font-bold text-cyan-400 text-xs uppercase tracking-wider border-b border-zinc-900 pb-2 mb-3">Order Satış</h4>
1179
+ <p class="text-[11px] text-zinc-500 leading-relaxed mb-3">Depodaki seçtiğin item'ı (Elmas veya Zümrüt) yazdığın nick'e order olarak satar.</p>
1180
+ <div class="flex flex-col sm:flex-row gap-2">
1181
+ <select id="single-order-item-select" class="bg-zinc-900 border border-zinc-800 text-zinc-200 text-xs rounded-xl p-3 focus:outline-none sm:w-48">
1182
+ ${ORDER_ITEMS.map(it => `<option value="${it.key}">${escapeHtml(it.label)}</option>`).join('')}
1183
+ </select>
1184
+ <input type="text" id="single-order-nick-input" placeholder="Hedef nick (örn: NexoHD)" class="flex-1 bg-zinc-900 border border-zinc-800 text-zinc-200 text-xs rounded-xl p-3 focus:outline-none placeholder:text-zinc-600">
1185
+ <button id="single-order-btn" onclick="triggerOrderSingle('${escapeHtml(bot.url)}')" class="bg-cyan-950/40 hover:bg-cyan-900/60 border border-cyan-800 text-cyan-300 text-[11px] font-black px-5 py-3 rounded-xl transition-all uppercase tracking-wider shrink-0">Order Satışı Gönder</button>
1186
+ </div>
1187
+ <div id="single-order-status" class="hidden mt-3 text-[11px] p-3 rounded-xl border font-mono"></div>
1188
+ </div>
1189
+
1190
  <div class="bg-zinc-950 border border-red-950/60 rounded-xl p-4 md:col-span-2">
1191
  <h4 class="font-bold text-red-400 text-xs uppercase tracking-wider border-b border-zinc-900 pb-2 mb-3">⚠ Para Gönder</h4>
1192
  <p class="text-[11px] text-zinc-500 leading-relaxed mb-3">Bu botun TÜM bakiyesini yazdığın nick'e gönderir. Geri alınamaz, dikkatli yaz.</p>
 
1201
  applyPrivacyFilter();
1202
  }
1203
 
1204
+ async function triggerOrderSingle(url) {
1205
+ const itemSelect = document.getElementById('single-order-item-select');
1206
+ const nickInput = document.getElementById('single-order-nick-input');
1207
+ const btn = document.getElementById('single-order-btn');
1208
+ const box = document.getElementById('single-order-status');
1209
+ if (!itemSelect || !nickInput || !box) return;
1210
+
1211
+ const item = itemSelect.value;
1212
+ const nick = nickInput.value.trim();
1213
+ if (!nick) {
1214
+ box.classList.remove('hidden');
1215
+ box.className = "mt-3 text-[11px] p-3 rounded-xl border font-mono bg-red-950/20 border-red-900 text-red-400";
1216
+ box.innerText = "Hedef nick boş olamaz.";
1217
+ return;
1218
+ }
1219
+
1220
+ btn.disabled = true;
1221
+ nickInput.disabled = true;
1222
+ itemSelect.disabled = true;
1223
+ box.classList.remove('hidden');
1224
+ box.className = "mt-3 text-[11px] p-3 rounded-xl border font-mono bg-zinc-900 border-zinc-800 text-zinc-500";
1225
+ box.innerText = "Order Satış komutu proxy ediliyor...";
1226
+
1227
+ try {
1228
+ const res = await fetch(`/api/proxy/order?url=${encodeURIComponent(url)}&nick=${encodeURIComponent(nick)}&item=${encodeURIComponent(item)}`);
1229
+ const result = await res.json();
1230
+ if (result.success) {
1231
+ box.className = "mt-3 text-[11px] p-3 rounded-xl border font-mono bg-emerald-950/30 border-emerald-900 text-emerald-400";
1232
+ box.innerText = `BOT YANITI: ${JSON.stringify(result.data)}`;
1233
+ } else {
1234
+ box.className = "mt-3 text-[11px] p-3 rounded-xl border font-mono bg-red-950/20 border-red-900 text-red-400";
1235
+ box.innerText = `HATA: ${result.error || 'Komut iletilemedi.'}`;
1236
+ }
1237
+ } catch (err) {
1238
+ box.className = "mt-3 text-[11px] p-3 rounded-xl border font-mono bg-red-950/20 border-red-900 text-red-400";
1239
+ box.innerText = "PROXY BAĞLANTI HATASI";
1240
+ } finally {
1241
+ btn.disabled = false;
1242
+ nickInput.disabled = false;
1243
+ itemSelect.disabled = false;
1244
+ }
1245
+ }
1246
+
1247
  async function triggerSendMoneySingle(url) {
1248
  const input = document.getElementById('single-sendmoney-input');
1249
  const btn = document.getElementById('single-sendmoney-btn');
 
1374
 
1375
  // ---------------------------------------------------------------
1376
  // TOPLU İŞLEMLER: ana ekrandaki aktif filtreye uyan tüm botlara aynı
1377
+ // talimatı (start/stop/mesaj/para gönderme/order satış vb.) yollar.
1378
+ // İstekler arasına isteğe bağlı bir gecikme (ms) eklenebilir -
1379
+ // varsayılan 0'dır, yani hepsi aynı anda (paralel) gönderilir.
1380
+ // Gecikme girilirse istekler sırayla ve aralarında o kadar bekleyerek
1381
+ // (staggered) tetiklenir; bu, aynı anda çok sayıda bota istek düşmesini
1382
+ // yumuşatmak için kullanılır.
1383
  // ---------------------------------------------------------------
1384
  function openBulkModal() {
1385
  document.getElementById('bulk-modal').classList.remove('hidden');
 
1387
  document.getElementById('bulk-msg-input').value = '';
1388
  document.getElementById('bulk-nick-input').value = '';
1389
  document.getElementById('bulk-nick-confirm-input').value = '';
1390
+ document.getElementById('bulk-order-nick-input').value = '';
1391
  onBulkActionChange();
1392
  updateBulkTargetCount();
1393
  }
 
1405
  const action = document.getElementById('bulk-action-select').value;
1406
  document.getElementById('bulk-msg-wrapper').style.display = action === 'sendmsg' ? 'flex' : 'none';
1407
  document.getElementById('bulk-nick-wrapper').style.display = action === 'sendmoney' ? 'flex' : 'none';
1408
+ document.getElementById('bulk-order-wrapper').style.display = action === 'order' ? 'flex' : 'none';
1409
  }
1410
 
1411
  function getBulkDelayMs() {
 
1429
  checkfarmer: '/api/proxy/checkfarmer',
1430
  antibotmove: '/api/proxy/antibotmove',
1431
  sendmsg: '/api/proxy/sendmsg',
1432
+ sendmoney: '/api/proxy/sendmoney',
1433
+ order: '/api/proxy/order'
1434
  };
1435
 
1436
  const BULK_ACTION_LABELS = {
 
1439
  skyblock: "Skyblock'a Işınlan", besleyici: 'Besleyici Kontrol',
1440
  ciftci: 'Çiftçi Sat', kazici: 'Kazıcı Kontrol', checkfarmer: 'Çiftçi Stok Kontrol',
1441
  antibotmove: 'Anti Bot Yürüyüşü',
1442
+ sendmsg: 'Chate Mesaj Gönder', sendmoney: 'Para Gönder',
1443
+ order: 'Order Satış'
1444
  };
1445
 
1446
  function safeRowId(url) {
 
1462
 
1463
  let nick = '';
1464
  let message = '';
1465
+ let orderItem = '';
1466
 
1467
  if (action === 'sendmoney') {
1468
  nick = (document.getElementById('bulk-nick-input').value || '').trim();
 
1487
  if (!confirm(`Filtrelenen ${targets.length} bota chat üzerinden "${message}" mesajı gönderilecek. Onaylıyor musun?`)) {
1488
  return;
1489
  }
1490
+ } else if (action === 'order') {
1491
+ orderItem = document.getElementById('bulk-order-item-select').value;
1492
+ nick = (document.getElementById('bulk-order-nick-input').value || '').trim();
1493
+ if (!nick) {
1494
+ list.innerHTML = '<div class="text-red-400">Hedef nick girilmeden order satış talimatı çalıştırılamaz.</div>';
1495
+ return;
1496
+ }
1497
+ const itemLabel = (ORDER_ITEMS.find(it => it.key === orderItem) || {}).label || orderItem;
1498
+ if (!confirm(`Filtrelenen ${targets.length} bot, "${itemLabel}" itemini order olarak "${nick}" adlı hesaba satacak. Onaylıyor musun?`)) {
1499
+ return;
1500
+ }
1501
  } else if (!confirm(`Filtrelenen ${targets.length} bota "${BULK_ACTION_LABELS[action] || action}" talimatı gönderilecek. Onaylıyor musun?`)) {
1502
  return;
1503
  }
 
1524
  let qs = `?url=${encodeURIComponent(bot.url)}`;
1525
  if (action === 'sendmoney') qs += `&nick=${encodeURIComponent(nick)}`;
1526
  if (action === 'sendmsg') qs += `&message=${encodeURIComponent(message)}`;
1527
+ if (action === 'order') qs += `&nick=${encodeURIComponent(nick)}&item=${encodeURIComponent(orderItem)}`;
1528
 
1529
  const res = await fetch(`${path}${qs}`);
1530
  const result = await res.json();
 
1547
  setInterval(fetchData, 10000);
1548
  </script>
1549
  </body>
1550
+ </html>