Spaces:
Running
Running
File size: 19,352 Bytes
ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e 9f09215 ce9a12e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Keylogger with Network Access</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #4a6fa5;
--secondary-color: #166088;
--accent-color: #4fc3f7;
--dark-color: #1a1a2e;
--light-color: #f8f9fa;
--danger-color: #e63946;
--success-color: #2a9d8f;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #f0f2f5;
color: var(--dark-color);
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background-color: var(--primary-color);
color: white;
padding: 15px 0;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: bold;
}
.logo a {
color: white;
text-decoration: none;
}
.built-with {
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.8);
}
.built-with a {
color: white;
text-decoration: none;
}
.tabs {
display: flex;
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
}
.tab {
padding: 10px 20px;
cursor: pointer;
background-color: #f1f1f1;
border: 1px solid #ddd;
border-bottom: none;
margin-right: 5px;
border-radius: 5px 5px 0 0;
transition: all 0.3s;
}
.tab.active {
background-color: white;
border-bottom: 1px solid white;
margin-bottom: -1px;
font-weight: bold;
color: var(--primary-color);
}
.tab-content {
display: none;
padding: 20px;
background-color: white;
border-radius: 0 0 5px 5px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.tab-content.active {
display: block;
}
.card {
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
padding: 20px;
margin-bottom: 20px;
}
h2 {
color: var(--primary-color);
margin-bottom: 15px;
}
.form-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: 500;
}
input, select, textarea {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
}
button {
background-color: var(--primary-color);
color: white;
border: none;
padding: 10px 15px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s;
}
button:hover {
background-color: var(--secondary-color);
}
button.danger {
background-color: var(--danger-color);
}
button.danger:hover {
background-color: #c1121f;
}
button.success {
background-color: var(--success-color);
}
button.success:hover {
background-color: #1d7874;
}
.status {
padding: 10px;
border-radius: 4px;
margin-top: 10px;
display: none;
}
.status.success {
background-color: rgba(42, 157, 143, 0.2);
color: var(--success-color);
display: block;
}
.status.error {
background-color: rgba(230, 57, 70, 0.2);
color: var(--danger-color);
display: block;
}
.status.warning {
background-color: rgba(233, 196, 106, 0.2);
color: #d4a017;
display: block;
}
.logs-container {
max-height: 400px;
overflow-y: auto;
border: 1px solid #ddd;
padding: 10px;
border-radius: 4px;
background-color: #f9f9f9;
font-family: 'Courier New', Courier, monospace;
white-space: pre-wrap;
}
.server-info {
background-color: #e9f5ff;
padding: 15px;
border-radius: 4px;
margin-bottom: 20px;
}
.server-info p {
margin-bottom: 5px;
}
.server-info strong {
color: var(--secondary-color);
}
.flex-row {
display: flex;
gap: 15px;
}
.flex-row > * {
flex: 1;
}
@media (max-width: 768px) {
.flex-row {
flex-direction: column;
}
}
.keyboard-icon {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 10px;
}
.instructions {
background-color: #f8f9fa;
padding: 15px;
border-left: 4px solid var(--accent-color);
margin-bottom: 20px;
}
.instructions h3 {
margin-bottom: 10px;
color: var(--secondary-color);
}
.instructions ol {
padding-left: 20px;
}
.instructions li {
margin-bottom: 8px;
}
</style>
</head>
<body>
<header>
<div class="container header-content">
<div class="logo">
<a href="#">Keylogger with Network Access</a>
</div>
<div class="built-with">
Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a>
</div>
</div>
</header>
<div class="container">
<div class="tabs">
<div class="tab active" data-tab="keylogger">Keylogger</div>
<div class="tab" data-tab="server">Network Access</div>
<div class="tab" data-tab="logs">View Logs</div>
</div>
<div id="keylogger" class="tab-content active">
<div class="card">
<div class="keyboard-icon">
<i class="fas fa-keyboard"></i>
</div>
<h2>Keylogger Configuration</h2>
<div class="instructions">
<h3>How to use:</h3>
<ol>
<li>Configure the keylogger settings below</li>
<li>Click "Start Keylogger" to begin recording keystrokes</li>
<li>Keystrokes will be saved to a text file on your computer</li>
<li>Use the "Network Access" tab to access logs from other computers</li>
</ol>
</div>
<div class="form-group">
<label for="logFilePath">Log File Path:</label>
<input type="text" id="logFilePath" value="C:\\keylogs\\keystrokes.txt" placeholder="Enter path to save log file">
</div>
<div class="form-group">
<label for="logInterval">Save Interval (seconds):</label>
<input type="number" id="logInterval" value="10" min="1" max="3600">
</div>
<div class="form-group">
<label for="captureWindowTitles">Capture Window Titles:</label>
<select id="captureWindowTitles">
<option value="true">Yes</option>
<option value="false">No</option>
</select>
</div>
<div class="flex-row">
<button id="startKeylogger" class="success">
<i class="fas fa-play"></i> Start Keylogger
</button>
<button id="stopKeylogger" class="danger">
<i class="fas fa-stop"></i> Stop Keylogger
</button>
</div>
<div id="keyloggerStatus" class="status"></div>
</div>
</div>
<div id="server" class="tab-content">
<div class="card">
<h2>Network Access Configuration</h2>
<div class="instructions">
<h3>How to access logs from another computer:</h3>
<ol>
<li>Start the local server using the button below</li>
<li>Note the IP address and port displayed</li>
<li>From another computer on the same network, open a web browser</li>
<li>Navigate to http://[your-ip]:[port]/logs</li>
<li>You'll see the recorded keystrokes</li>
</ol>
</div>
<div class="server-info">
<p><strong>Your local IP address:</strong> <span id="localIp">Detecting...</span></p>
<p><strong>Server status:</strong> <span id="serverStatus">Not running</span></p>
<p><strong>Access URL:</strong> <span id="accessUrl">http://[ip]:8080/logs</span></p>
</div>
<div class="form-group">
<label for="serverPort">Server Port:</label>
<input type="number" id="serverPort" value="8080" min="1024" max="65535">
</div>
<div class="form-group">
<label for="serverPassword">Access Password (optional):</label>
<input type="password" id="serverPassword" placeholder="Leave empty for no password">
</div>
<div class="flex-row">
<button id="startServer" class="success">
<i class="fas fa-server"></i> Start Server
</button>
<button id="stopServer" class="danger">
<i class="fas fa-power-off"></i> Stop Server
</button>
</div>
<div id="serverStatusMessage" class="status"></div>
</div>
</div>
<div id="logs" class="tab-content">
<div class="card">
<h2>Keystroke Logs</h2>
<div class="form-group">
<label for="logFileToView">Select Log File:</label>
<input type="text" id="logFileToView" value="C:\\keylogs\\keystrokes.txt" placeholder="Enter path to log file">
</div>
<button id="loadLogs" class="success">
<i class="fas fa-sync-alt"></i> Load Logs
</button>
<div id="logsStatus" class="status"></div>
<div class="logs-container" id="logContent">
Logs will appear here...
</div>
<div style="margin-top: 15px;">
<button id="clearLogs" class="danger">
<i class="fas fa-trash-alt"></i> Clear Log File
</button>
</div>
</div>
</div>
</div>
<script>
// Tab switching functionality
document.querySelectorAll('.tab').forEach(tab => {
tab.addEventListener('click', () => {
// Remove active class from all tabs and content
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
document.querySelectorAll('.tab-content').forEach(c => c.classList.remove('active'));
// Add active class to clicked tab and corresponding content
tab.classList.add('active');
const tabId = tab.getAttribute('data-tab');
document.getElementById(tabId).classList.add('active');
});
});
// Simulate keylogger functionality (note: actual keylogging would require additional software)
let isKeyloggerRunning = false;
let isServerRunning = false;
// Detect local IP (simulated)
document.addEventListener('DOMContentLoaded', () => {
// This is a simulation - in a real app you would detect the actual IP
const ips = ['192.168.1.100', '192.168.0.15', '10.0.0.5'];
const randomIp = ips[Math.floor(Math.random() * ips.length)];
document.getElementById('localIp').textContent = randomIp;
updateAccessUrl(randomIp, document.getElementById('serverPort').value);
});
// Update access URL when port changes
document.getElementById('serverPort').addEventListener('change', function() {
const ip = document.getElementById('localIp').textContent;
updateAccessUrl(ip, this.value);
});
function updateAccessUrl(ip, port) {
document.getElementById('accessUrl').textContent = `http://${ip}:${port}/logs`;
}
// Keylogger controls
document.getElementById('startKeylogger').addEventListener('click', function() {
const logFilePath = document.getElementById('logFilePath').value;
const logInterval = document.getElementById('logInterval').value;
const captureWindowTitles = document.getElementById('captureWindowTitles').value === 'true';
if (!logFilePath) {
showStatus('keyloggerStatus', 'Please enter a valid log file path', 'error');
return;
}
// In a real application, this would start an actual keylogger
isKeyloggerRunning = true;
showStatus('keyloggerStatus', `Keylogger started. Keystrokes will be saved to: ${logFilePath}`, 'success');
// Simulate logging
if (isKeyloggerRunning) {
setTimeout(() => {
if (isKeyloggerRunning) {
showStatus('keyloggerStatus', `Keylogger is running. Last saved at ${new Date().toLocaleTimeString()}`, 'success');
}
}, logInterval * 1000);
}
});
document.getElementById('stopKeylogger').addEventListener('click', function() {
isKeyloggerRunning = false;
showStatus('keyloggerStatus', 'Keylogger stopped', 'warning');
});
// Server controls
document.getElementById('startServer').addEventListener('click', function() {
const port = document.getElementById('serverPort').value;
const password = document.getElementById('serverPassword').value;
if (!port || port < 1024 || port > 65535) {
showStatus('serverStatusMessage', 'Please enter a valid port between 1024 and 65535', 'error');
return;
}
// In a real application, this would start an actual HTTP server
isServerRunning = true;
document.getElementById('serverStatus').textContent = 'Running';
showStatus('serverStatusMessage', `Server started on port ${port}. Logs accessible from other devices.`, 'success');
});
document.getElementById('stopServer').addEventListener('click', function() {
isServerRunning = false;
document.getElementById('serverStatus').textContent = 'Not running';
showStatus('serverStatusMessage', 'Server stopped', 'warning');
});
// Log viewing
document.getElementById('loadLogs').addEventListener('click', function() {
const logFile = document.getElementById('logFileToView').value;
if (!logFile) {
showStatus('logsStatus', 'Please enter a valid log file path', 'error');
return;
}
// In a real application, this would read the actual log file
const sampleLogs = `[${new Date().toLocaleString()}] Keylogger started
[${new Date().toLocaleString()}] Window: Chrome - Google
[${new Date().toLocaleString()}] Typed: hello world
[${new Date().toLocaleString()}] Window: Notepad
[${new Date().toLocaleString()}] Typed: this is a test
[${new Date().toLocaleString()}] Special key: [ENTER]
[${new Date().toLocaleString()}] Window: File Explorer
[${new Date().toLocaleString()}] Special key: [CTRL+C]`;
document.getElementById('logContent').textContent = sampleLogs;
showStatus('logsStatus', `Logs loaded from ${logFile}`, 'success');
});
document.getElementById('clearLogs').addEventListener('click', function() {
if (confirm('Are you sure you want to clear the log file? This cannot be undone.')) {
document.getElementById('logContent').textContent = '';
showStatus('logsStatus', 'Log file cleared', 'warning');
}
});
// Helper function to show status messages
function showStatus(elementId, message, type) {
const element = document.getElementById(elementId);
element.textContent = message;
element.className = 'status ' + type;
// Auto-hide after 5 seconds
setTimeout(() => {
element.textContent = '';
element.className = 'status';
}, 5000);
}
// Simulate key presses (for demo purposes)
document.addEventListener('keydown', function(e) {
if (isKeyloggerRunning) {
// In a real application, this would log the actual keystrokes
console.log(`Key pressed: ${e.key}`);
}
});
</script>
</body>
</html> |