| |
|
|
| document.addEventListener('DOMContentLoaded', function() { |
| console.log('%cπ Zero-Day Hunter Dashboard Initialized', 'color: #00ff00; font-size: 16px; font-weight: bold;'); |
| console.log('%cStrictly Pentesting | Bug Bounties Only | Zero-Days Are The Way', 'color: #cccccc;'); |
| console.log('%cPages: Dashboard | Zero-Day Lab | Report Manager | Tool Suite', 'color: #666666;'); |
| |
| |
| initDashboard(); |
| initHuntingTools(); |
| initActivitySimulator(); |
| initManifesto(); |
| initPageSpecificFeatures(); |
| }); |
|
|
| function initPageSpecificFeatures() { |
| |
| const currentPage = window.location.pathname.split('/').pop(); |
| |
| switch(currentPage) { |
| case 'index.html': |
| case '': |
| |
| break; |
| case 'zerodays.html': |
| |
| break; |
| case 'reports.html': |
| |
| break; |
| case 'tools.html': |
| |
| break; |
| } |
| } |
|
|
| function initDashboard() { |
| |
| updateStats(); |
| |
| |
| const targets = document.querySelectorAll('.border-gray-800'); |
| targets.forEach(target => { |
| target.addEventListener('click', function() { |
| this.classList.add('border-hacker-green'); |
| setTimeout(() => { |
| this.classList.remove('border-hacker-green'); |
| }, 500); |
| }); |
| }); |
| |
| |
| const toolIcons = document.querySelectorAll('.bg-gray-900\\/50'); |
| toolIcons.forEach(tool => { |
| tool.addEventListener('mouseenter', function() { |
| const toolName = this.querySelector('h3').textContent; |
| showTooltip(toolName); |
| }); |
| |
| tool.addEventListener('mouseleave', function() { |
| hideTooltip(); |
| }); |
| }); |
| } |
|
|
| function updateStats() { |
| |
| setInterval(() => { |
| const stats = document.querySelectorAll('.text-3xl'); |
| stats.forEach(stat => { |
| const current = parseInt(stat.textContent); |
| if (current < 100) { |
| const change = Math.random() > 0.7 ? 1 : 0; |
| if (change && Math.random() > 0.5) { |
| stat.textContent = current + change; |
| stat.classList.add('animate-pulse'); |
| setTimeout(() => { |
| stat.classList.remove('animate-pulse'); |
| }, 1000); |
| } |
| } |
| }); |
| }, 5000); |
| } |
|
|
| function initHuntingTools() { |
| |
| const toolButtons = document.querySelectorAll('.hover\\:border-hacker-green, .hover\\:border-bug-red, .hover\\:border-zero-day-blue'); |
| |
| toolButtons.forEach(button => { |
| button.addEventListener('click', function(e) { |
| e.stopPropagation(); |
| const toolName = this.querySelector('h3')?.textContent || 'Tool'; |
| const toolDesc = this.querySelector('.text-xs')?.textContent || ''; |
| |
| showToolModal(toolName, toolDesc); |
| }); |
| }); |
| |
| |
| const actionButtons = document.querySelectorAll('.group'); |
| actionButtons.forEach(button => { |
| button.addEventListener('click', function() { |
| const action = this.querySelector('.font-medium').textContent; |
| simulateAction(action); |
| }); |
| }); |
| } |
|
|
| function simulateAction(action) { |
| const messages = { |
| 'Submit Report': 'π€ Preparing report for submission to HackerOne...', |
| 'Analyze PoC': 'π Analyzing proof-of-concept code...', |
| 'Check Bounties': 'π° Fetching latest bounty opportunities...' |
| }; |
| |
| const message = messages[action] || `Executing: ${action}`; |
| |
| |
| showNotification(message); |
| |
| |
| addActivityLog(action); |
| } |
|
|
| function showTooltip(text) { |
| |
| const existing = document.querySelector('.custom-tooltip'); |
| if (existing) existing.remove(); |
| |
| |
| const tooltip = document.createElement('div'); |
| tooltip.className = 'custom-tooltip fixed z-50 bg-gray-900 text-white px-3 py-2 rounded-lg text-sm border border-gray-700 shadow-lg'; |
| tooltip.textContent = `Tool: ${text}`; |
| tooltip.style.top = `${event.clientY + 10}px`; |
| tooltip.style.left = `${event.clientX + 10}px`; |
| |
| document.body.appendChild(tooltip); |
| |
| |
| document.addEventListener('mousemove', function moveTooltip(e) { |
| tooltip.style.top = `${e.clientY + 10}px`; |
| tooltip.style.left = `${e.clientX + 10}px`; |
| }); |
| |
| |
| tooltip._moveHandler = moveTooltip; |
| } |
|
|
| function hideTooltip() { |
| const tooltip = document.querySelector('.custom-tooltip'); |
| if (tooltip) { |
| document.removeEventListener('mousemove', tooltip._moveHandler); |
| tooltip.remove(); |
| } |
| } |
|
|
| function showToolModal(toolName, description) { |
| |
| const modal = document.createElement('div'); |
| modal.className = 'fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm'; |
| modal.innerHTML = ` |
| <div class="bg-dark-panel border border-gray-800 rounded-2xl p-6 max-w-md w-full mx-4"> |
| <div class="flex justify-between items-center mb-4"> |
| <h3 class="text-xl font-bold text-white font-mono">${toolName}</h3> |
| <button class="text-gray-400 hover:text-white text-2xl" onclick="this.closest('.fixed').remove()">×</button> |
| </div> |
| <p class="text-gray-300 mb-6">${description}</p> |
| <div class="space-y-3"> |
| <button class="w-full p-3 bg-hacker-green text-black rounded-lg font-medium hover:bg-hacker-green/90 transition"> |
| Launch Tool |
| </button> |
| <button class="w-full p-3 border border-gray-700 rounded-lg hover:border-gray-500 transition" onclick="this.closest('.fixed').remove()"> |
| Cancel |
| </button> |
| </div> |
| </div> |
| `; |
| |
| document.body.appendChild(modal); |
| |
| |
| modal.addEventListener('keydown', function(e) { |
| if (e.key === 'Escape') modal.remove(); |
| }); |
| |
| |
| modal.querySelector('.bg-hacker-green').addEventListener('click', function() { |
| showNotification(`π Launching ${toolName}...`); |
| modal.remove(); |
| |
| |
| setTimeout(() => { |
| showNotification(`β
${toolName} loaded successfully`); |
| }, 1500); |
| }); |
| } |
|
|
| function initActivitySimulator() { |
| |
| setInterval(() => { |
| const activities = [ |
| 'Subdomain scanning in progress', |
| 'Analyzing JavaScript files', |
| 'Testing authentication endpoints', |
| 'Fuzzing API parameters', |
| 'Checking for CORS misconfigurations', |
| 'Testing for SSRF vulnerabilities', |
| 'Analyzing JWT tokens', |
| 'Testing GraphQL introspection' |
| ]; |
| |
| const randomActivity = activities[Math.floor(Math.random() * activities.length)]; |
| |
| |
| if (Math.random() > 0.7) { |
| addActivityLog(randomActivity); |
| } |
| }, 10000); |
| } |
|
|
| function addActivityLog(action) { |
| const activityLog = document.querySelector('tbody'); |
| if (!activityLog) return; |
| |
| const now = new Date(); |
| const timeString = now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); |
| |
| const statuses = ['VULNERABLE', 'PENDING', 'RESEARCH', 'ANALYZING']; |
| const statusColors = ['bug-red', 'bounty-gold', 'zero-day-blue', 'gray-500']; |
| const randomStatus = Math.floor(Math.random() * statuses.length); |
| |
| const row = document.createElement('tr'); |
| row.className = 'border-b border-gray-800/50'; |
| row.innerHTML = ` |
| <td class="py-3 text-gray-500">${timeString}</td> |
| <td class="py-3">${action}</td> |
| <td class="py-3 text-hacker-green">target-${Math.floor(Math.random() * 100)}.com</td> |
| <td class="py-3"> |
| <span class="px-2 py-1 bg-${statusColors[randomStatus]}/20 text-${statusColors[randomStatus]} rounded text-xs"> |
| ${statuses[randomStatus]} |
| </span> |
| </td> |
| `; |
| |
| |
| activityLog.insertBefore(row, activityLog.firstChild); |
| |
| |
| if (activityLog.children.length > 10) { |
| activityLog.removeChild(activityLog.lastChild); |
| } |
| |
| |
| row.classList.add('bg-gray-900/30'); |
| setTimeout(() => { |
| row.classList.remove('bg-gray-900/30'); |
| }, 1000); |
| } |
|
|
| function showNotification(message) { |
| |
| const existing = document.querySelector('.custom-notification'); |
| if (existing) existing.remove(); |
| |
| |
| const notification = document.createElement('div'); |
| notification.className = 'custom-notification fixed top-4 right-4 z-50 bg-dark-panel border border-gray-800 rounded-xl p-4 shadow-lg transform translate-x-full animate-slide-in'; |
| notification.innerHTML = ` |
| <div class="flex items-center space-x-3"> |
| <div class="w-8 h-8 rounded-full bg-hacker-green/20 flex items-center justify-center"> |
| <span>β‘</span> |
| </div> |
| <div> |
| <p class="text-white text-sm">${message}</p> |
| </div> |
| </div> |
| `; |
| |
| document.body.appendChild(notification); |
| |
| |
| setTimeout(() => { |
| notification.classList.remove('translate-x-full'); |
| notification.classList.add('translate-x-0'); |
| }, 10); |
| |
| |
| setTimeout(() => { |
| notification.classList.remove('translate-x-0'); |
| notification.classList.add('translate-x-full'); |
| setTimeout(() => { |
| notification.remove(); |
| }, 300); |
| }, 3000); |
| } |
|
|
| function initManifesto() { |
| |
| const manifesto = document.querySelector('.bg-gradient-to-br'); |
| if (manifesto) { |
| manifesto.addEventListener('click', function() { |
| const lines = this.querySelectorAll('p'); |
| lines.forEach((line, index) => { |
| setTimeout(() => { |
| line.classList.add('text-hacker-green'); |
| setTimeout(() => { |
| line.classList.remove('text-hacker-green'); |
| }, 1000); |
| }, index * 200); |
| }); |
| }); |
| } |
| } |
|
|
| |
| const style = document.createElement('style'); |
| style.textContent = ` |
| @keyframes slide-in { |
| from { |
| transform: translateX(100%); |
| } |
| to { |
| transform: translateX(0); |
| } |
| } |
| |
| .animate-slide-in { |
| animation: slide-in 0.3s ease-out forwards; |
| } |
| |
| .custom-notification { |
| transition: transform 0.3s ease-out; |
| } |
| `; |
| document.head.appendChild(style); |
|
|
| |
| window.ZeroDayHunter = { |
| showNotification, |
| addActivityLog, |
| simulateAction, |
| navigateToPage |
| }; |
|
|
| |
| function navigateToPage(page) { |
| showNotification(`π Navigating to ${page}...`); |
| setTimeout(() => { |
| window.location.href = page; |
| }, 500); |
| } |
|
|
| |
| document.addEventListener('keydown', function(e) { |
| |
| if (e.ctrlKey && e.shiftKey && e.key === 'H') { |
| showNotification('π Keyboard Shortcuts: Ctrl+Shift+1 (Dashboard) | Ctrl+Shift+2 (Zero-Days) | Ctrl+Shift+3 (Reports) | Ctrl+Shift+4 (Tools)'); |
| } |
| |
| |
| if (e.ctrlKey && e.shiftKey && e.key === '1') { |
| e.preventDefault(); |
| navigateToPage('index.html'); |
| } |
| |
| |
| if (e.ctrlKey && e.shiftKey && e.key === '2') { |
| e.preventDefault(); |
| navigateToPage('zerodays.html'); |
| } |
| |
| |
| if (e.ctrlKey && e.shiftKey && e.key === '3') { |
| e.preventDefault(); |
| navigateToPage('reports.html'); |
| } |
| |
| |
| if (e.ctrlKey && e.shiftKey && e.key === '4') { |
| e.preventDefault(); |
| navigateToPage('tools.html'); |
| } |
| |
| |
| if (e.ctrlKey && e.shiftKey && e.key === 'R') { |
| e.preventDefault(); |
| updateStats(); |
| showNotification('π Refreshing hunting statistics...'); |
| } |
| }); |