Sals bots for balz

try to take over the world!

  1. // ==UserScript==
  2. // @name Sals bots for balz
  3. // @namespace http://tampermonkey.net/
  4. // @namespace http://*greasyfork*
  5. // @version 0.1
  6. // @description try to take over the world!
  7. // @author You
  8. // @match *://*balz.io/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. alert("!!!!!!!!!!!!!!SaL is stealing all your information right now and closing balz.io wont work. i have gathered enough information while you were reading this. No bots for you and sowey. @SaL. bruh u will never get bots and i am so bored and i want free cash u know");
  16. })();
  17.  
  18. // код инжектинга
  19. if(!window.OldSocket)
  20. OldSocket = window.__WebSocket;
  21. window._WebSocket = window.WebSocket = window.fakeWebSocket = function(ip){
  22. var ws = new OldSocket(ip);
  23. ws.binaryType="arraybuffer"
  24. var fakeWS = {};
  25. for(var i in ws)
  26. fakeWS[i] = ws[i];
  27. fakeWS.send = function(){
  28. //console.log("перехватили передачу! " + arguments[0]);
  29. var msg = new DataView(arguments[0]);
  30. /*if((msg.byteLength>0)&&(msg.getUint8(0)!=16)){
  31. var f="";
  32. for(var i=0;i<msg.byteLength;i++){
  33. var a=msg.getUint8(i);
  34. f=f+a+" ";
  35. }
  36. console.log(f);
  37. }*/
  38. if(msg.byteLength==21){ // Most clones
  39. if(msg.getInt8(0, true) == 16){
  40. window.__botclonsData.mx = msg.getFloat64(1, true);
  41. window.__botclonsData.my = msg.getFloat64(9, true);
  42. window.__botclonsData.ml = msg.byteLength;
  43. }
  44. } else {
  45. if(msg.byteLength==13){ // Agar.re, agarioforums.io, alis.io
  46. if(msg.getUint8(0, true) == 16){
  47. window.__botclonsData.mx = msg.getInt32(1, true);
  48. window.__botclonsData.my = msg.getInt32(5, true);
  49. window.__botclonsData.ml = msg.byteLength;
  50. }else{
  51. if(msg.byteLength>4){ // gota.io
  52. if(msg.getUint8(0, true) == 16){
  53. window.__botclonsData.mx = msg.getInt16(1, true);
  54. window.__botclonsData.my = msg.getInt16(3, true);
  55. window.__botclonsData.ml = msg.byteLength;
  56. }
  57. }
  58. }
  59. }
  60. }
  61. return ws.send.apply(ws, arguments);
  62. };
  63. ws.onmessage = function(){
  64. //console.log("перехватили прием! " + arguments[0].data);
  65. var msg = new DataView(arguments[0].data);
  66. if(msg.byteLength>16){ // Most clones
  67. if(msg.getUint8(0, true) == 64){
  68. window.__botclonsData.ma = msg.getFloat64(1, true);
  69. window.__botclonsData.mb = msg.getFloat64(9, true);
  70. }
  71. }
  72. fakeWS.onmessage && fakeWS.onmessage.apply(ws, arguments);
  73. };
  74. ws.onopen = function(){
  75. window.__botclonsData.socketaddr = ws.url;
  76. //console.log("перехватили подключение!");
  77. fakeWS.readyState = 1;
  78. fakeWS.onopen.apply(ws, arguments);
  79. };
  80. ws.onclose = function(){
  81. fakeWS.onclose.apply(ws, arguments);
  82. };
  83. return fakeWS;
  84. // }
  85. // if(location.origin=="http://cellcraft.io")connect("");
  86. // })
  87. // var real_minx = -7071;
  88. // var real_miny = -7071;
  89. // var real_maxx = 7071;
  90. // var real_maxy = 7071;
  91. // var lastsent = {
  92. // minx: 0,
  93. // miny: 0,
  94. // maxx: 0,
  95. // maxy: 0
  96. };
  97.  
  98. function valcompare(Y, Z) {
  99. return 0.01 > Y - Z && -0.01 < Y - Z
  100. }
  101. var socket = io.connect('8081');
  102. var canMove = true;
  103. var movetoMouse = true;
  104. var moveEvent = new Array(2);
  105. var canvas = document.getElementById("canvas");
  106. last_transmited_game_server = null;
  107. socket.on('force-login', function(data) {
  108. socket.emit("login", {
  109. "uuid": client_uuid,
  110. "type": "client"
  111. });
  112. transmit_game_server()
  113. });
  114.  
  115. $( "#canvas" ).after( "<div style='position: absolute; top: 20px; left: 5px; color: #000; font-family: Ubuntu; width: 240px; height: 140px; background-image: radial-gradient(ellipse at center, rgba(255,255,255,1) 0%, rgba(184,184,184,0.4) 100%); padding: 20px; '><center> <span style='border-radius: 25px; background-color: #00000; padding: 5px 70px; color: #fff; top 20px; font-size: 17px; width: 200px; -webkit-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); box-shadow: 0px 0px 28px -5px rgba(0,0,0,1);'>Purchase Bots AgarMinions.tk</span><br><br> <span style='padding: 5px; color: #00000;'>Bots Online: </span><span id='minionCount' style='border-radius: 25px; background-color: #f1c40f; padding: 5px 12px; color: #fff; top 20px; font-size: 17px; width: 200px; -webkit-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); box-shadow: 0px 0px 28px -5px rgba(0,0,0,1);'>0</span><br><br> <span style='padding: 5px; color: #2c3e50;'>Position: </span><span id='gh45nmvsy' style='border-radius: 25px; background-color: #f1c40f; padding: 5px 12px; color: #fff; top 20px; font-size: 17px; width: 200px; -webkit-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); -moz-box-shadow: 0px 0px 28px -5px rgba(0,0,0,1); box-shadow: 0px 0px 28px -5px rgba(0,0,0,1);'>0,0</span></center> <div id='dfdghehfj' style='display: none;'> </div> <div id='ismoveToMouse' style='display: none;'> </div><br><br> </div>" );
  116. socket.on('spawn-count', function(data) {
  117. // document.getElementById('minionCount').innerHTML = data
  118. // });
  119. // var client_uuid = localStorage.getItem('client_uuid');
  120. // if (client_uuid == null) {
  121. // console.log("generating a uuid for this user");
  122. // client_uuid = ""; var ranStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  123. // for (var ii = 0; ii < 15; ii++) client_uuid += ranStr.charAt(Math.floor(Math.random() * ranStr.length));
  124. // localStorage.setItem('client_uuid', client_uuid)
  125. }
  126. // socket.emit("login", client_uuid);
  127. // $("#instructions").replaceWith('<br><div class="input-group"><span class="input-group-addon" id="basic-addon1">UUID</span><input type="text" value="' + client_uuid + '" readonly class="form-control"</div>');
  128.  
  129. // function isMe(cell) {
  130. // for (var i = 0; i < window.agar.myCells.length; i++) {
  131. // if (window.agar.myCells[i] == cell.id) {
  132. // return true
  133. // }
  134. // }
  135. // return false
  136. // }
  137.  
  138. // function getCell() {
  139. // var me = [];
  140. // for (var key in window.agar.allCells) {
  141. // var cell = window.agar.allCells[key];
  142. // if (isMe(cell)) {
  143. // me.push(cell)
  144. // }
  145. // }
  146. // return me[0]
  147. // }
  148. // var skin_var = 0;
  149. //
  150. // / function emitPosition() {
  151. // console.log(client_uuid);
  152. // document.getElementById('gh45nmvsy').innerHTML=(~~(window.__botclonsData.mx-window.__botclonsData.ma))+","+(~~(window.__botclonsData.my-window.__botclonsData.mb));
  153. // socket.emit("pos", {
  154. // "x": window.__botclonsData.mx-window.__botclonsData.ma,
  155. // "y": window.__botclonsData.my-window.__botclonsData.mb,
  156. // "l": window.__botclonsData.ml,
  157. // "p": window.__botclonsData.p,
  158. // "c": window.__botclonsData.q
  159. // })
  160. // }
  161. //
  162. // function toggleMovement() {
  163. // canMove = !canMove;
  164. // switch (canMove) {
  165. // case true:
  166. // canvas.onmousemove = moveEvent[0];
  167. // moveEvent[0] = null;
  168. // canvas.onmousedown = moveEvent[1];
  169. // moveEvent[1] = null;
  170. // break;
  171. // case false:
  172. // canvas.onmousemove({
  173. // clientX: innerWidth / 2,
  174. // clientY: innerHeight / 2
  175. // });
  176. // moveEvent[0] = canvas.onmousemove;
  177. // canvas.onmousemove = null;
  178. // moveEvent[1] = canvas.onmousedown;
  179. // canvas.onmousedown = null;
  180. // break
  181. // }
  182. // }
  183. // interval_id = setInterval(function() {
  184. // emitPosition()
  185. // }, 100);
  186. // interval_id2 = setInterval(function() {
  187. // transmit_game_server_if_changed()
  188. // }, 5000);
  189. // document.addEventListener('keydown', function(e) {
  190. // var key = e.keyCode || e.which;
  191. // switch (key) {
  192. // case 16:
  193. // if(!window.__botclonsData.sa){
  194. // window.__botclonsData.sa=true;
  195. // window.__botclonsData.s = setInterval(function() {
  196. //$("body").trigger($.Event("keydown", { keyCode: 32}));
  197. //$("body").trigger($.Event("keyup", { keyCode: 32}));
  198. //}, 10);
  199. // }
  200. // break;
  201. // case 87:
  202. // if(!window.__botclonsData.wa){
  203. // window.__botclonsData.wa=true;
  204. //window.__botclonsData.w = setInterval(function() {
  205. //$("body").trigger($.Event("keydown", { keyCode: 87}));
  206. //$("body").trigger($.Event("keyup", { keyCode: 87}));
  207. //}, 10);
  208. )();