Capture Console Logs

Captures console logs in a bloxd.io server and stores them in local storage. You can use this to find player ID numbers, idk what you can use them for possibly tracking server activity.

当前为 2025-05-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Capture Console Logs
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Captures console logs in a bloxd.io server and stores them in local storage. You can use this to find player ID numbers, idk what you can use them for possibly tracking server activity.
  6. // @author Nomu
  7. // @match https://bloxd.io/*
  8. // @grant none
  9. // @icon https://www.iconsdb.com/icons/preview/black/console-xxl.png
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Create an array to hold logs
  17. const logs = JSON.parse(localStorage.getItem('capturedLogs')) || [];
  18.  
  19. // Override console.log to capture log messages
  20. const originalConsoleLog = console.log;
  21.  
  22. console.log = function(...args) {
  23. // Create a timestamp
  24. const timestamp = new Date().toISOString();
  25.  
  26. // Construct the log entry
  27. const logEntry = {
  28. timestamp: timestamp,
  29. message: args.join(' ')
  30. };
  31.  
  32. // Push to logs array
  33. logs.push(logEntry);
  34.  
  35. // Save to local storage
  36. localStorage.setItem('capturedLogs', JSON.stringify(logs));
  37.  
  38. // Call the original console.log to maintain functionality
  39. originalConsoleLog.apply(console, args);
  40. };
  41.  
  42. // Function to download logs as a file
  43. const downloadLogs = () => {
  44. const blob = new Blob([JSON.stringify(logs, null, 2)], { type: 'application/json' });
  45. const url = URL.createObjectURL(blob);
  46. const a = document.createElement('a');
  47. a.href = url;
  48. a.download = 'capturedLogs.json';
  49. a.click();
  50. URL.revokeObjectURL(url);
  51. };
  52.  
  53. // Add a button to download logs (you can style it as needed)
  54. const button = document.createElement('button');
  55. button.textContent = 'Download Logs';
  56. button.style.position = 'fixed';
  57. button.style.top = '10px';
  58. button.style.right = '10px';
  59. button.style.zIndex = '1000';
  60. button.onclick = downloadLogs;
  61. document.body.appendChild(button);
  62.  
  63. })();