BotWeb / page /tools.html
FikXzModzDeveloper
deploy awal
c20600f
Raw
History Blame Contribute Delete
25.3 kB
<!DOCTYPE html>
<html lang="id" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Tools - Botz Control Panel</title>
<link rel="icon" type="image/jpeg" href="https://cdn.yupra.my.id/yp/4r4oy0ze.jpg">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
primary: '#6366f1',
secondary: '#ec4899',
darkbg: '#0f172a',
cardbg: '#1e293b',
inputbg: '#334155',
sidebar: '#111827'
},
fontFamily: {
sans: ['Inter', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace']
}
}
}
}
</script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 20px; }
.glass { background: rgba(30, 41, 59, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.05); }
</style>
</head>
<body class="bg-[#020617] text-slate-300 font-sans h-screen flex overflow-hidden selection:bg-primary selection:text-white">
<div id="toast-container" class="fixed top-6 right-6 z-[100] flex flex-col gap-3 pointer-events-none"></div>
<aside class="hidden md:flex flex-col w-64 bg-sidebar border-r border-white/5 h-full relative z-20">
<div class="p-6 flex items-center gap-3">
<div class="w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-indigo-700 flex items-center justify-center text-white shadow-lg shadow-primary/20">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>
</div>
<h1 class="text-lg font-bold text-white tracking-tight">Panel Botz</h1>
</div>
<nav class="flex-1 px-4 space-y-2 py-4">
<a href="/" class="nav-item w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-slate-400 hover:bg-white/5 hover:text-white transition-all border border-transparent">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"/></svg>
Dashboard
</a>
<a href="/broadcast" class="nav-item w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-slate-400 hover:bg-white/5 hover:text-white transition-all border border-transparent">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"/></svg>
Broadcast
</a>
<a href="/tools" class="nav-item active w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-slate-400 hover:bg-white/5 hover:text-white transition-all border border-transparent">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
Tools
</a>
<a href="/settings" class="nav-item w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-medium text-slate-400 hover:bg-white/5 hover:text-white transition-all border border-transparent">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>
Settings
</a>
</nav>
<div class="p-4 border-t border-white/5">
<div class="glass p-3 rounded-xl flex items-center gap-3">
<div id="status-dot" class="w-2.5 h-2.5 rounded-full bg-red-500 animate-pulse"></div>
<div>
<p id="status-text" class="text-[10px] font-bold uppercase tracking-widest text-red-500">DISCONNECTED</p>
<p id="bot-name-display" class="text-xs text-slate-400 truncate w-32">Connecting...</p>
</div>
</div>
</div>
</aside>
<main class="flex-1 flex flex-col h-full relative overflow-hidden bg-[#020617]">
<header class="glass sticky top-0 z-30 px-6 py-4 flex md:hidden items-center justify-between border-b border-white/5">
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-lg bg-gradient-to-br from-primary to-indigo-700 flex items-center justify-center text-white shadow-lg shadow-primary/20">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"/></svg>
</div>
<h1 class="text-lg font-bold text-white tracking-tight">Panel Botz</h1>
</div>
<div class="flex items-center gap-2">
<div id="status-dot-m" class="w-2 h-2 rounded-full bg-red-500 animate-pulse"></div>
</div>
</header>
<div class="flex-1 overflow-y-auto p-4 md:p-8 pb-24 md:pb-8 custom-scroll relative">
<div class="max-w-7xl mx-auto space-y-6">
<div>
<h2 class="text-3xl md:text-4xl font-bold text-white mb-2">Tools</h2>
<p class="text-slate-400 text-base">Alat bantu utilitas WhatsApp</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="glass p-6 md:p-7 rounded-2xl shadow-xl space-y-5">
<h2 class="text-white font-bold flex items-center gap-3 text-lg uppercase tracking-wide">
<span class="w-2 h-7 bg-blue-500 rounded-full"></span> Stalk WhatsApp
</h2>
<form id="form-stalk" class="space-y-4">
<input type="text" id="stalk-num" placeholder="628xxxx" class="w-full bg-inputbg/50 px-4 py-3 rounded-xl border border-slate-700 focus:border-blue-500 focus:bg-inputbg outline-none transition-all text-white placeholder-slate-500">
<button type="submit" class="w-full bg-blue-600 hover:bg-blue-500 text-white font-semibold py-3 rounded-xl transition-all shadow-lg shadow-blue-900/20 active:scale-[0.98]">Check Profile</button>
</form>
<div id="stalk-result" class="hidden bg-slate-900/60 rounded-xl p-5 border border-slate-700/50">
<div class="flex items-center gap-4 mb-4">
<img id="stalk-img" src="" class="w-16 h-16 rounded-full object-cover border-2 border-slate-600">
<div class="overflow-hidden">
<p id="stalk-jid" class="text-base text-white font-mono font-bold truncate">...</p>
<span id="stalk-type" class="text-xs bg-slate-800 text-slate-400 px-2 py-0.5 rounded border border-slate-700">PERSONAL</span>
</div>
</div>
<div class="space-y-3 text-sm">
<div class="bg-white/5 p-3 rounded border border-white/5">
<p class="text-xs text-slate-500 uppercase font-bold mb-1">Status</p>
<p id="stalk-bio" class="text-slate-300 italic line-clamp-2">...</p>
</div>
<div id="biz-info" class="hidden bg-blue-500/10 p-3 rounded border border-blue-500/20 space-y-1">
<p id="biz-cat" class="text-slate-300">Category: -</p>
<p id="biz-email" class="text-slate-300">Email: -</p>
</div>
</div>
</div>
</div>
<div class="glass p-6 md:p-7 rounded-2xl shadow-xl space-y-5">
<h2 class="text-white font-bold flex items-center gap-3 text-lg uppercase tracking-wide">
<span class="w-2 h-7 bg-emerald-500 rounded-full"></span> Cek ID Channel
</h2>
<form id="form-cekid" class="space-y-4">
<input type="text" id="id-url" placeholder="https://whatsapp.com/channel/..." class="w-full bg-inputbg/50 px-4 py-3 rounded-xl border border-slate-700 focus:border-emerald-500 focus:bg-inputbg outline-none transition-all text-white placeholder-slate-500">
<button type="submit" class="w-full bg-emerald-600 hover:bg-emerald-500 text-white font-semibold py-3 rounded-xl transition-all shadow-lg shadow-emerald-900/20 active:scale-[0.98]">Get Metadata</button>
</form>
<div id="id-result" class="hidden bg-slate-900/60 rounded-xl p-5 border border-slate-700/50 space-y-4">
<div class="flex items-center gap-4">
<img id="ch-img" src="" class="w-14 h-14 rounded-full object-cover border border-slate-600" onerror="this.style.display='none'">
<div>
<p id="ch-name" class="text-base font-bold text-white">Name</p>
<p id="ch-subs" class="text-sm text-emerald-400">0 Subs</p>
</div>
</div>
<div class="bg-black/20 p-3 rounded border border-white/5">
<p class="text-xs text-slate-500 font-bold mb-1">ID</p>
<p id="ch-id" class="text-sm font-mono text-slate-300 break-all select-all">...</p>
</div>
<div class="bg-black/20 p-3 rounded border border-white/5">
<p class="text-xs text-slate-500 font-bold mb-1">Description</p>
<p id="ch-desc" class="text-sm text-slate-300 line-clamp-3">...</p>
</div>
</div>
</div>
<div class="glass p-6 md:p-7 rounded-2xl shadow-xl space-y-5">
<h2 class="text-white font-bold flex items-center gap-3 text-lg uppercase tracking-wide">
<span class="w-2 h-7 bg-red-600 rounded-full"></span> Play to Channel
</h2>
<form id="form-playch" class="space-y-4">
<input type="text" id="play-query" placeholder="Judul Lagu..." class="w-full bg-inputbg/50 px-4 py-3 rounded-xl border border-slate-700 focus:border-red-600 focus:bg-inputbg outline-none transition-all text-white placeholder-slate-500">
<button type="submit" id="btn-playch" class="w-full bg-red-600 hover:bg-red-500 text-white font-semibold py-3 rounded-xl transition-all shadow-lg shadow-red-900/20 active:scale-[0.98]">Kirim ke Channel</button>
</form>
</div>
<div class="glass p-6 md:p-7 rounded-2xl shadow-xl space-y-5">
<h2 class="text-white font-bold flex items-center gap-3 text-lg uppercase tracking-wide">
<span class="w-2 h-7 bg-rose-600 rounded-full"></span> Spam Pairing
</h2>
<form id="form-spam" class="space-y-4">
<div class="grid grid-cols-2 gap-3">
<input type="text" id="spam-number" placeholder="628xxxxx" class="w-full bg-inputbg/50 px-4 py-3 rounded-xl border border-slate-700 focus:border-rose-500 focus:bg-inputbg outline-none transition-all text-white placeholder-slate-500">
<input type="number" id="spam-amount" placeholder="Jumlah" class="w-full bg-inputbg/50 px-4 py-3 rounded-xl border border-slate-700 focus:border-rose-500 focus:bg-inputbg outline-none transition-all text-white placeholder-slate-500">
</div>
<button type="submit" id="btn-spam" class="w-full bg-rose-600 hover:bg-rose-500 text-white font-semibold py-3 rounded-xl transition-all shadow-lg shadow-rose-900/20 active:scale-[0.98]">GAS NGENGGG</button>
</form>
</div>
</div>
</div>
</div>
</main>
<div class="md:hidden fixed bottom-0 inset-x-0 bg-sidebar border-t border-white/5 z-50 flex justify-around items-center p-2 pb-5">
<a href="/" class="nav-item flex flex-col items-center gap-1 p-2 rounded-xl text-slate-400">
<svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"/></svg>
<span class="text-[11px] font-medium">Home</span>
</a>
<a href="/broadcast" class="nav-item flex flex-col items-center gap-1 p-2 rounded-xl text-slate-400">
<svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5.882V19.24a1.76 1.76 0 01-3.417.592l-2.147-6.15M18 13a3 3 0 100-6M5.436 13.683A4.001 4.001 0 017 6h1.832c4.1 0 7.625-1.234 9.168-3v14c-1.543-1.766-5.067-3-9.168-3H7a3.988 3.988 0 01-1.564-.317z"/></svg>
<span class="text-[11px] font-medium">Broad</span>
</a>
<a href="/tools" class="nav-item flex flex-col items-center gap-1 p-2 rounded-xl text-slate-400">
<svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/></svg>
<span class="text-[11px] font-medium">Tools</span>
</a>
<a href="/settings" class="nav-item flex flex-col items-center gap-1 p-2 rounded-xl text-slate-400">
<svg class="w-7 h-7" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/></svg>
<span class="text-[11px] font-medium">Set</span>
</a>
</div>
<script>
function showToast(msg, type = 'success') {
const container = document.getElementById('toast-container');
const div = document.createElement('div');
const bg = type === 'success' ? 'bg-green-500/10 border-green-500/30 text-green-200' : 'bg-red-500/10 border-red-500/30 text-red-200';
div.className = `glass px-4 py-3 rounded-xl border backdrop-blur-md shadow-2xl flex items-center gap-3 transform translate-x-full transition-all duration-300 pointer-events-auto min-w-[280px] ${bg}`;
div.innerHTML = `<span class="font-medium text-sm">${msg}</span>`;
container.appendChild(div);
requestAnimationFrame(() => div.classList.remove('translate-x-full'));
setTimeout(() => {
div.classList.add('translate-x-full', 'opacity-0');
setTimeout(() => div.remove(), 300);
}, 3000);
}
document.getElementById('form-stalk').addEventListener('submit', async (e) => {
e.preventDefault();
const num = document.getElementById('stalk-num').value;
if(!num) return showToast('Enter number', 'error');
const resCard = document.getElementById('stalk-result');
const bizDiv = document.getElementById('biz-info');
try {
showToast('Searching...', 'success');
const req = await fetch(`/stalkwa?number=${num}`);
const res = await req.json();
if(res.status) {
resCard.classList.remove('hidden');
const d = res.data;
document.getElementById('stalk-img').src = d.photo;
document.getElementById('stalk-jid').innerText = d.jid;
document.getElementById('stalk-bio').innerText = d.bio;
if (d.business_info && d.business_info.is_business) {
document.getElementById('stalk-type').innerText = "BUSINESS";
document.getElementById('stalk-type').className = "text-xs bg-blue-900/50 text-blue-300 px-2 py-0.5 rounded border border-blue-500/30";
bizDiv.classList.remove('hidden');
document.getElementById('biz-cat').innerText = `Category: ${d.business_info.category || '-'}`;
document.getElementById('biz-email').innerText = `Email: ${d.business_info.email || '-'}`;
} else {
document.getElementById('stalk-type').innerText = "PERSONAL";
document.getElementById('stalk-type').className = "text-xs bg-slate-800 text-slate-400 px-2 py-0.5 rounded border border-slate-700";
bizDiv.classList.add('hidden');
}
} else {
showToast(res.message, 'error');
}
} catch(e) { showToast('Error', 'error'); }
});
document.getElementById('form-cekid').addEventListener('submit', async (e) => {
e.preventDefault();
const url = document.getElementById('id-url').value;
if(!url) return showToast('Enter URL', 'error');
const resDiv = document.getElementById('id-result');
try {
showToast('Fetching...', 'success');
const req = await fetch(`/cekidch?url=${encodeURIComponent(url)}`);
const res = await req.json();
if(res.status) {
resDiv.classList.remove('hidden');
const d = res.data;
document.getElementById('ch-name').innerText = d.name;
document.getElementById('ch-subs').innerText = d.Pengikut + ' Subscribers';
document.getElementById('ch-desc').innerText = d.Deskripsi || 'No description';
document.getElementById('ch-id').innerText = d.id;
if(d.Photo) document.getElementById('ch-img').src = d.Photo;
} else {
showToast(res.message, 'error');
}
} catch(e) { showToast('Error', 'error'); }
});
document.getElementById('form-playch').addEventListener('submit', async (e) => {
e.preventDefault();
const q = document.getElementById('play-query').value;
if(!q) return showToast('Masukkan judul lagu', 'error');
const btn = document.getElementById('btn-playch');
const originalTxt = btn.innerText;
btn.innerText = 'SEARCHING...'; btn.disabled = true; btn.classList.add('opacity-70');
try {
const req = await fetch(`/playch?query=${encodeURIComponent(q)}`);
const res = await req.json();
if(res.status) {
showToast(res.message);
document.getElementById('play-query').value = '';
} else {
showToast(res.message || 'Error', 'error');
}
} catch(e) { showToast('Connection failed', 'error'); }
btn.innerText = originalTxt; btn.disabled = false; btn.classList.remove('opacity-70');
});
document.getElementById('form-spam').addEventListener('submit', async (e) => {
e.preventDefault();
const num = document.getElementById('spam-number').value;
const amt = document.getElementById('spam-amount').value;
if(!num) return showToast('Enter Number!', 'error');
const btn = document.getElementById('btn-spam');
const originalTxt = btn.innerText;
btn.innerText = 'PROSES...'; btn.disabled = true; btn.classList.add('opacity-70');
try {
showToast('Spamming started...', 'success');
const req = await fetch('/spampairing', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ number: num, amount: amt || 50 })
});
const res = await req.json();
if(res.status) {
showToast(res.message);
} else {
showToast(res.message || 'Error occurred', 'error');
}
} catch(e) { showToast('Connection failed', 'error'); }
btn.innerText = originalTxt; btn.disabled = false; btn.classList.remove('opacity-70');
});
async function fetchStats() {
try {
const res = await fetch('/stats');
if (res.redirected) {
window.location.href = res.url;
return;
}
const data = await res.json();
const stText = document.getElementById('status-text');
const stDot = document.getElementById('status-dot');
const stDotM = document.getElementById('status-dot-m');
if(data.wa.connected) {
stText.innerText = 'ONLINE'; stText.className = 'text-[10px] font-bold uppercase tracking-widest text-primary';
stDot.className = 'w-2.5 h-2.5 rounded-full bg-primary shadow-[0_0_12px_#6366f1]';
stDotM.className = 'w-2 h-2 rounded-full bg-primary shadow-[0_0_12px_#6366f1]';
if(data.wa.user) document.getElementById('bot-name-display').innerText = data.wa.user.name || data.wa.user.id;
} else {
stText.innerText = 'DISCONNECTED'; stText.className = 'text-[10px] font-bold uppercase tracking-widest text-red-500';
stDot.className = 'w-2.5 h-2.5 rounded-full bg-red-500 animate-pulse';
stDotM.className = 'w-2 h-2 rounded-full bg-red-500 animate-pulse';
}
} catch (e) {}
}
setInterval(fetchStats, 2000);
fetchStats();
</script>
</body>
</html>