Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.45 KB | None | 0 0
  1. import java.lang.reflect.Field;
  2.  
  3. import java.lang.reflect.InvocationTargetException;
  4. import java.lang.reflect.Method;
  5. import java.util.Scanner;
  6.  
  7. import com.client.Client;
  8. import com.client.Identity;
  9. import com.client.Stream;
  10.  
  11. public class Program {
  12.  
  13. // private static aG stream;
  14.  
  15. public static void main(String[] args) throws NoSuchFieldException, SecurityException, IllegalArgumentException,
  16. IllegalAccessException, InvocationTargetException, NoSuchMethodException, InterruptedException {
  17.  
  18. Thread t = new Thread(() -> {
  19. Client.main(null);
  20. });
  21. t.start();
  22.  
  23. while (Client.getInstance() == null) {
  24. Thread.sleep(100);
  25. }
  26.  
  27. Scanner myObj = new Scanner(System.in); // Create a Scanner object
  28. Client client = Client.getInstance();
  29.  
  30. while (true) {
  31. try {
  32. System.out.println("Enter Command:");
  33. String[] commandData = myObj.nextLine().split(" ");
  34. startCommand(commandData, client);
  35. } catch (Exception e) {
  36. e.printStackTrace();
  37. }
  38. }
  39. }
  40.  
  41. public static long encodeName(String s) {
  42. long l = 0L;
  43. for (int i = 0; i < s.length() && i < 12; i++) {
  44. char c = s.charAt(i);
  45. l *= 37L;
  46. if (c >= 'A' && c <= 'Z') {
  47. l += 1 + c - 65;
  48. } else if (c >= 'a' && c <= 'z') {
  49. l += 1 + c - 97;
  50. } else if (c >= '0' && c <= '9') {
  51. l += 27 + c - 48;
  52. }
  53. }
  54. while (l % 37L == 0L && l != 0L) {
  55. l /= 37L;
  56. }
  57. return l;
  58. }
  59.  
  60. private static void startCommand(String[] commandData, Client c) throws NoSuchFieldException, SecurityException,
  61. IllegalArgumentException, IllegalAccessException, InterruptedException {
  62.  
  63. Stream stream = c.stream;
  64. switch (commandData[0]) {
  65. case "setCC":
  66. for (int i = 0; i < 100; i++) {
  67. c.login("Suica"+i, "fsafsdf", true);
  68. c.dropClient();
  69. Thread.sleep(100);
  70. }
  71. return;
  72.  
  73. case "spawn":
  74. System.out.println(Client.myPlayer.x);
  75. Field field = Client.class.getDeclaredField("baseX");
  76. field.setAccessible(true);
  77. Field field2 = Client.class.getDeclaredField("baseY");
  78. field2.setAccessible(true);
  79. int baseX = (int) field.get(null);
  80. int baseY = (int) field2.get(null);
  81.  
  82. int x = baseX + (Client.myPlayer.x - 6 >> 7);
  83. int y = baseY + (Client.myPlayer.y - 6 >> 7);
  84. c.addObject(Integer.parseInt(commandData[1]), x, y, 0, 10, 0);
  85. /*
  86. * for (int i = -50; i < 80; i++) { stream.S(57); stream.af(i); stream.af(i);
  87. * stream.ae(i); stream.af(i); } System.out.println("THIS");
  88. */
  89. return;
  90.  
  91. case "error":
  92. /*
  93. * stream.S(60); stream.T("f".length()); stream.m("f");
  94. * System.out.println("THIS2");
  95. */
  96. return;
  97.  
  98. case "neg":
  99. /*
  100. * String inputString = "www.google.com"; stream.S(5); stream.T(-20);
  101. * stream.m(inputString.substring(1)); System.out.println("NEGGED");
  102. */
  103. return;
  104.  
  105. case "sendPm":
  106.  
  107. for (int i = 0; i < 200; i++) {
  108. stream.createFrame(126);
  109. stream.writeWordBigEndian(0);
  110. int k = stream.currentOffset;
  111. stream.writeQWord(encodeName("Jasons"));
  112. TextInput.method526("I AM SUIC", stream);
  113. stream.writeBytes(stream.currentOffset - k);
  114. TextInput.processText("I AM SUIC");
  115. }
  116.  
  117. // for (int i = 0; i < 5; i++) {
  118. // for (bb player : c.V) {
  119. // if (player == null) {
  120. // continue;
  121. // }
  122. // Field field = bb.class.getDeclaredField("ar");
  123. // String name = (String) field.get(player);
  124. // System.out.println("Send PM to " + name);
  125. // Client.C.a(126);
  126. // Client.C.b(0);
  127. // int i2 = c.E.b;
  128. // Client.C.a(encodeName(name));
  129. // cq.a("Hello World", c.E);
  130. // c.E.h(c.E.b - i2);
  131. // }
  132. // }
  133. return;
  134.  
  135. case "itemonnpc":
  136. for (int i = 0; i < 20; i++) {
  137. /*
  138. * Client.C.a(185); Client.C.f(2471);
  139. */
  140. }
  141. return;
  142.  
  143. case "setMac":
  144. Field mac = Client.class.getDeclaredField("macAddress");
  145. mac.setAccessible(true);
  146. mac.set(c, "Lmao");
  147. System.out.println(mac.get(c).toString());
  148. Identity.identityKey = "12";
  149. System.out.println("THIS2");
  150. return;
  151. case "masstrade":
  152.  
  153. while (true) {
  154. Field players = Client.class.getDeclaredField("playerIndices");
  155. players.setAccessible(true);
  156. int[] playerIds = (int[]) players.get(c);
  157. for (int i = 0; i < playerIds.length; i++) {
  158. if (playerIds[i] != 0) {
  159. try {
  160.  
  161. stream.createFrame(39);
  162. stream.method431(playerIds[i]);
  163. } catch (Exception e) {
  164. e.printStackTrace();
  165. }
  166. }
  167. }
  168. Thread.sleep(1000);
  169. }
  170.  
  171. }
  172. }
  173.  
  174. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement