Corrections and Improvements Made

1. Fixed Dashboard
Issues Resolved:

 Unexpected token 'class' - File corrupted by a formatter → Cleanly rewritten
 startBot is not defined - Broken template literals → Code rewritten to ES5-compatible
 Tracking Prevention blocked access - External CDNs blocked → SVG icons inline (except Chart.js)
 favicon.ico 404 - No favicon → Added an inline emoji favicon
Modified Files:

app.js - Rewritten without problematic template literals
index.html - SVG icons inline, favicon inline
2. Enhanced Anti-Detection
Browser.ts - Expanded Chromium arguments:

--disable-automation - Hides automation flag
--force-webrtc-ip-handling-policy=disable_non_proxied_udp - Blocks WebRTC IP leaks
--disable-webrtc-hw-encoding/decoding - Disables WebRTC hardware encoding
--disable-gpu-sandbox, --disable-accelerated-2d-canvas - Reduces GPU fingerprinting
--disable-client-side-phishing-detection - Disables anti-phishing detection
--disable-features=TranslateUI,site-per-process,IsolateOrigins - Hides bot-like features
--no-zygote, --single-process - Single-process mode (harder to detect)
--enable-features=NetworkService,NetworkServiceInProcess - Integrated network
11 layers of JavaScript anti-detection (existing, verified):

navigator.webdriver Removed
window.chrome.runtime spoofed
Canvas fingerprint randomized
WebGL renderer hidden
API permissions normalized
Realistic plugins injected
WebRTC IP leak prevention
Battery API spoofed
Hardware concurrency normalized
Audio fingerprint protected
Connection info spoofed
3. Dashboard - Features
 Real-time WebSocket for logs
 Chart.js graphs (Points History, Activity Breakdown)
 Start/Stop/Restart/Reset State controls
 Account list with status
 Light/dark theme with persistence
 Log export to text file
 Toast notifications
 Modal system
This commit is contained in:
2025-12-16 21:41:09 +01:00
parent 744e3c9c4a
commit 704c271b91
3 changed files with 491 additions and 552 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -5,9 +5,29 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Microsoft Rewards Bot Dashboard</title>
<link rel="icon" type="image/svg+xml"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E🎯%3C/text%3E%3C/svg%3E">
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
<style>
/* Inline SVG icon styles */
.icon {
width: 1em;
height: 1em;
fill: currentColor;
vertical-align: -0.125em;
}
.icon-lg {
width: 1.25em;
height: 1.25em;
}
.icon-sm {
width: 0.625em;
height: 0.625em;
}
</style>
</head>
<body>
@@ -20,10 +40,14 @@
</div>
<div class="header-right">
<button class="theme-toggle" onclick="toggleTheme()" title="Toggle theme">
<i class="fas fa-moon"></i>
<svg class="icon" viewBox="0 0 24 24">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
</svg>
</button>
<div id="statusBadge" class="status-badge status-stopped">
<i class="fas fa-circle"></i>
<svg class="icon icon-sm" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
</svg>
<span>STOPPED</span>
</div>
</div>
@@ -32,42 +56,77 @@
<!-- Stats Grid -->
<div class="stats-grid">
<div class="stat-card">
<div class="stat-icon"><i class="fas fa-users"></i></div>
<div class="stat-icon">
<svg class="icon icon-lg" viewBox="0 0 24 24">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
<circle cx="9" cy="7" r="4" />
<path d="M23 21v-2a4 4 0 0 0-3-3.87" />
<path d="M16 3.13a4 4 0 0 1 0 7.75" />
</svg>
</div>
<div class="stat-content">
<div class="stat-label">Total Accounts</div>
<div class="stat-value" id="totalAccounts">0</div>
</div>
</div>
<div class="stat-card stat-points">
<div class="stat-icon"><i class="fas fa-coins"></i></div>
<div class="stat-icon">
<svg class="icon icon-lg" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
<path d="M12 6v6l4 2" />
</svg>
</div>
<div class="stat-content">
<div class="stat-label">Total Points</div>
<div class="stat-value" id="totalPoints">0</div>
</div>
</div>
<div class="stat-card stat-success">
<div class="stat-icon"><i class="fas fa-check-circle"></i></div>
<div class="stat-icon">
<svg class="icon icon-lg" viewBox="0 0 24 24">
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" />
<polyline points="22 4 12 14.01 9 11.01" />
</svg>
</div>
<div class="stat-content">
<div class="stat-label">Completed Today</div>
<div class="stat-value" id="completed">0</div>
</div>
</div>
<div class="stat-card stat-error">
<div class="stat-icon"><i class="fas fa-exclamation-triangle"></i></div>
<div class="stat-icon">
<svg class="icon icon-lg" viewBox="0 0 24 24">
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" />
<line x1="12" y1="9" x2="12" y2="13" />
<line x1="12" y1="17" x2="12.01" y2="17" />
</svg>
</div>
<div class="stat-content">
<div class="stat-label">Errors</div>
<div class="stat-value" id="errors">0</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon"><i class="fas fa-clock"></i></div>
<div class="stat-icon">
<svg class="icon icon-lg" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
<polyline points="12 6 12 12 16 14" />
</svg>
</div>
<div class="stat-content">
<div class="stat-label">Uptime</div>
<div class="stat-value" id="uptime">00:00:00</div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon"><i class="fas fa-memory"></i></div>
<div class="stat-icon">
<svg class="icon icon-lg" viewBox="0 0 24 24">
<rect x="2" y="2" width="20" height="8" rx="2" ry="2" />
<rect x="2" y="14" width="20" height="8" rx="2" ry="2" />
<line x1="6" y1="6" x2="6.01" y2="6" />
<line x1="6" y1="18" x2="6.01" y2="18" />
</svg>
</div>
<div class="stat-content">
<div class="stat-label">Memory</div>
<div class="stat-value" id="memory">0 MB</div>
@@ -82,28 +141,51 @@
<!-- Control Panel -->
<div class="card">
<div class="card-header">
<h2 class="card-title"><i class="fas fa-gamepad"></i> Control Panel</h2>
<h2 class="card-title">
<svg class="icon" viewBox="0 0 24 24">
<rect x="2" y="10" width="20" height="12" rx="2" />
<circle cx="8" cy="16" r="2" />
<circle cx="16" cy="16" r="2" />
</svg>
Control Panel
</h2>
<div class="card-actions">
<button class="btn btn-sm btn-secondary" onclick="refreshData()" title="Refresh">
<i class="fas fa-sync-alt"></i>
<svg class="icon" viewBox="0 0 24 24">
<polyline points="23 4 23 10 17 10" />
<polyline points="1 20 1 14 7 14" />
<path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15" />
</svg>
</button>
</div>
</div>
<div class="control-grid">
<button class="control-btn control-start" onclick="startBot()" id="btnStart">
<i class="fas fa-play"></i>
<svg class="icon icon-lg" viewBox="0 0 24 24">
<polygon points="5 3 19 12 5 21 5 3" />
</svg>
<span>Start Bot</span>
</button>
<button class="control-btn control-stop" onclick="stopBot()" id="btnStop" disabled>
<i class="fas fa-stop"></i>
<svg class="icon icon-lg" viewBox="0 0 24 24">
<rect x="6" y="4" width="4" height="16" />
<rect x="14" y="4" width="4" height="16" />
</svg>
<span>Stop Bot</span>
</button>
<button class="control-btn control-restart" onclick="restartBot()">
<i class="fas fa-redo"></i>
<svg class="icon icon-lg" viewBox="0 0 24 24">
<polyline points="23 4 23 10 17 10" />
<path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10" />
</svg>
<span>Restart</span>
</button>
<button class="control-btn control-reset" onclick="resetJobState()">
<i class="fas fa-eraser"></i>
<svg class="icon icon-lg" viewBox="0 0 24 24">
<path d="M21 4H8l-7 8 7 8h13a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2z" />
<line x1="18" y1="9" x2="12" y2="15" />
<line x1="12" y1="9" x2="18" y2="15" />
</svg>
<span>Reset State</span>
</button>
</div>
@@ -112,32 +194,61 @@
<!-- Accounts Card -->
<div class="card">
<div class="card-header">
<h2 class="card-title"><i class="fas fa-users"></i> Accounts</h2>
<h2 class="card-title">
<svg class="icon" viewBox="0 0 24 24">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" />
<circle cx="9" cy="7" r="4" />
<path d="M23 21v-2a4 4 0 0 0-3-3.87" />
<path d="M16 3.13a4 4 0 0 1 0 7.75" />
</svg>
Accounts
</h2>
<span class="badge" id="accountsBadge">0</span>
</div>
<div id="accountsList" class="accounts-list"></div>
<div id="accountsList" class="accounts-list">
<div class="log-empty">Loading accounts...</div>
</div>
</div>
<!-- Quick Actions -->
<div class="card">
<div class="card-header">
<h2 class="card-title"><i class="fas fa-bolt"></i> Quick Actions</h2>
<h2 class="card-title">
<svg class="icon" viewBox="0 0 24 24">
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2" />
</svg>
Quick Actions
</h2>
</div>
<div class="quick-actions">
<button class="action-btn" onclick="runSingleAccount()">
<i class="fas fa-user"></i>
<svg class="icon" viewBox="0 0 24 24">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" />
<circle cx="12" cy="7" r="4" />
</svg>
<span>Run Single</span>
</button>
<button class="action-btn" onclick="exportLogs()">
<i class="fas fa-download"></i>
<svg class="icon" viewBox="0 0 24 24">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
<polyline points="7 10 12 15 17 10" />
<line x1="12" y1="15" x2="12" y2="3" />
</svg>
<span>Export Logs</span>
</button>
<button class="action-btn" onclick="openConfig()">
<i class="fas fa-cog"></i>
<svg class="icon" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="3" />
<path
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />
</svg>
<span>Config</span>
</button>
<button class="action-btn" onclick="viewHistory()">
<i class="fas fa-history"></i>
<svg class="icon" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
<polyline points="12 6 12 12 16 14" />
</svg>
<span>History</span>
</button>
</div>
@@ -149,7 +260,14 @@
<!-- Charts Card -->
<div class="card">
<div class="card-header">
<h2 class="card-title"><i class="fas fa-chart-line"></i> Points History</h2>
<h2 class="card-title">
<svg class="icon" viewBox="0 0 24 24">
<line x1="18" y1="20" x2="18" y2="10" />
<line x1="12" y1="20" x2="12" y2="4" />
<line x1="6" y1="20" x2="6" y2="14" />
</svg>
Points History
</h2>
<div class="chart-period">
<button class="period-btn active" data-period="7d" onclick="setChartPeriod('7d', this)">7D</button>
<button class="period-btn" data-period="30d" onclick="setChartPeriod('30d', this)">30D</button>
@@ -163,7 +281,12 @@
<!-- Activity Chart -->
<div class="card">
<div class="card-header">
<h2 class="card-title"><i class="fas fa-tasks"></i> Activity Breakdown</h2>
<h2 class="card-title">
<svg class="icon" viewBox="0 0 24 24">
<path d="M22 12h-4l-3 9L9 3l-3 9H2" />
</svg>
Activity Breakdown
</h2>
</div>
<div class="chart-container chart-small">
<canvas id="activityChart"></canvas>
@@ -172,10 +295,16 @@
</div>
</div>
<!-- Logs Card (Full Width) -->
<!-- Logs Card -->
<div class="card">
<div class="card-header">
<h2 class="card-title"><i class="fas fa-terminal"></i> Live Logs</h2>
<h2 class="card-title">
<svg class="icon" viewBox="0 0 24 24">
<polyline points="4 17 10 11 4 5" />
<line x1="12" y1="19" x2="20" y2="19" />
</svg>
Live Logs
</h2>
<div class="card-actions">
<select id="logFilter" class="log-filter" onchange="filterLogs()">
<option value="all">All Levels</option>
@@ -184,14 +313,22 @@
<option value="log">Info</option>
</select>
<button class="btn btn-sm btn-secondary" onclick="toggleAutoScroll()" id="btnAutoScroll" title="Auto-scroll">
<i class="fas fa-arrow-down"></i>
<svg class="icon" viewBox="0 0 24 24">
<line x1="12" y1="5" x2="12" y2="19" />
<polyline points="19 12 12 19 5 12" />
</svg>
</button>
<button class="btn btn-sm btn-danger" onclick="clearLogs()" title="Clear logs">
<i class="fas fa-trash"></i>
<svg class="icon" viewBox="0 0 24 24">
<polyline points="3 6 5 6 21 6" />
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
</svg>
</button>
</div>
</div>
<div class="logs-container" id="logsContainer"></div>
<div class="logs-container" id="logsContainer">
<div class="log-empty">Waiting for logs...</div>
</div>
</div>
<!-- Footer -->
@@ -199,11 +336,18 @@
<span>Microsoft Rewards Bot Dashboard</span>
<span class="separator"></span>
<a href="https://github.com/LightZirconite/Microsoft-Rewards-Bot" target="_blank">
<i class="fab fa-github"></i> GitHub
<svg class="icon" viewBox="0 0 24 24">
<path
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22" />
</svg>
GitHub
</a>
<span class="separator"></span>
<span id="connectionStatus" class="connection-status disconnected">
<i class="fas fa-circle"></i> Connecting...
<svg class="icon icon-sm" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="10" />
</svg>
Connecting...
</span>
</div>
</div>

View File

@@ -42,6 +42,7 @@ class Browser {
const isLinux = process.platform === 'linux'
// CRITICAL: Anti-detection Chromium arguments
// These arguments minimize bot detection fingerprints
const baseArgs = [
'--no-sandbox',
'--mute-audio',
@@ -49,25 +50,52 @@ class Browser {
'--ignore-certificate-errors',
'--ignore-certificate-errors-spki-list',
'--ignore-ssl-errors',
// ANTI-DETECTION: Disable blink features that expose automation
// ANTI-DETECTION: Core automation hiding
'--disable-blink-features=AutomationControlled',
// ANTI-DETECTION: Disable automation extensions
'--disable-automation',
'--disable-extensions',
// ANTI-DETECTION: Start maximized (humans rarely start in specific window sizes)
// ANTI-DETECTION: Window behavior
'--start-maximized',
// ANTI-DETECTION: Disable save password bubble
'--disable-save-password-bubble',
// ANTI-DETECTION: Disable background timer throttling
'--disable-background-timer-throttling',
'--window-position=0,0',
// ANTI-DETECTION: Disable telemetry and tracking features
'--disable-client-side-phishing-detection',
'--disable-component-update',
'--disable-default-apps',
'--disable-domain-reliability',
'--disable-features=TranslateUI',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',
'--disable-popup-blocking',
'--disable-prompt-on-repost',
'--disable-sync',
// ANTI-DETECTION: WebRTC hardening
'--disable-webrtc-hw-encoding',
'--disable-webrtc-hw-decoding',
'--force-webrtc-ip-handling-policy=disable_non_proxied_udp',
// ANTI-DETECTION: Disable GPU features that leak info
'--disable-gpu-sandbox',
'--disable-accelerated-2d-canvas',
'--disable-gpu-compositing',
// ANTI-DETECTION: Disable features that identify headless mode
'--disable-backgrounding-occluded-windows',
'--disable-renderer-backgrounding',
// ANTI-DETECTION: Disable infobars
'--disable-background-timer-throttling',
'--disable-save-password-bubble',
'--disable-infobars',
// PERFORMANCE: Disable unnecessary features
// ANTI-DETECTION: Navigator properties
'--disable-features=site-per-process',
'--disable-features=IsolateOrigins',
// ANTI-DETECTION: Timing attack prevention
'--disable-features=ReduceUserAgent',
'--disable-features=ScriptStreaming',
// PERFORMANCE: Stability
'--disable-breakpad',
'--disable-component-update',
'--no-first-run',
'--no-default-browser-check'
'--no-default-browser-check',
'--no-zygote',
'--single-process',
// ANTI-DETECTION: Make WebDriver undetectable
'--enable-features=NetworkService,NetworkServiceInProcess'
]
// Linux stability fixes