Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.lang.reflect.Field;
- import java.lang.reflect.InvocationTargetException;
- import java.lang.reflect.Method;
- import java.util.Scanner;
- import com.client.Client;
- import com.client.Identity;
- import com.client.Stream;
- public class Program {
- // private static aG stream;
- public static void main(String[] args) throws NoSuchFieldException, SecurityException, IllegalArgumentException,
- IllegalAccessException, InvocationTargetException, NoSuchMethodException, InterruptedException {
- Thread t = new Thread(() -> {
- Client.main(null);
- });
- t.start();
- while (Client.getInstance() == null) {
- Thread.sleep(100);
- }
- Scanner myObj = new Scanner(System.in); // Create a Scanner object
- Client client = Client.getInstance();
- while (true) {
- try {
- System.out.println("Enter Command:");
- String[] commandData = myObj.nextLine().split(" ");
- startCommand(commandData, client);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- public static long encodeName(String s) {
- long l = 0L;
- for (int i = 0; i < s.length() && i < 12; i++) {
- char c = s.charAt(i);
- l *= 37L;
- if (c >= 'A' && c <= 'Z') {
- l += 1 + c - 65;
- } else if (c >= 'a' && c <= 'z') {
- l += 1 + c - 97;
- } else if (c >= '0' && c <= '9') {
- l += 27 + c - 48;
- }
- }
- while (l % 37L == 0L && l != 0L) {
- l /= 37L;
- }
- return l;
- }
- private static void startCommand(String[] commandData, Client c) throws NoSuchFieldException, SecurityException,
- IllegalArgumentException, IllegalAccessException, InterruptedException {
- Stream stream = c.stream;
- switch (commandData[0]) {
- case "setCC":
- for (int i = 0; i < 100; i++) {
- c.login("Suica"+i, "fsafsdf", true);
- c.dropClient();
- Thread.sleep(100);
- }
- return;
- case "spawn":
- System.out.println(Client.myPlayer.x);
- Field field = Client.class.getDeclaredField("baseX");
- field.setAccessible(true);
- Field field2 = Client.class.getDeclaredField("baseY");
- field2.setAccessible(true);
- int baseX = (int) field.get(null);
- int baseY = (int) field2.get(null);
- int x = baseX + (Client.myPlayer.x - 6 >> 7);
- int y = baseY + (Client.myPlayer.y - 6 >> 7);
- c.addObject(Integer.parseInt(commandData[1]), x, y, 0, 10, 0);
- /*
- * for (int i = -50; i < 80; i++) { stream.S(57); stream.af(i); stream.af(i);
- * stream.ae(i); stream.af(i); } System.out.println("THIS");
- */
- return;
- case "error":
- /*
- * stream.S(60); stream.T("f".length()); stream.m("f");
- * System.out.println("THIS2");
- */
- return;
- case "neg":
- /*
- * String inputString = "www.google.com"; stream.S(5); stream.T(-20);
- * stream.m(inputString.substring(1)); System.out.println("NEGGED");
- */
- return;
- case "sendPm":
- for (int i = 0; i < 200; i++) {
- stream.createFrame(126);
- stream.writeWordBigEndian(0);
- int k = stream.currentOffset;
- stream.writeQWord(encodeName("Jasons"));
- TextInput.method526("I AM SUIC", stream);
- stream.writeBytes(stream.currentOffset - k);
- TextInput.processText("I AM SUIC");
- }
- // for (int i = 0; i < 5; i++) {
- // for (bb player : c.V) {
- // if (player == null) {
- // continue;
- // }
- // Field field = bb.class.getDeclaredField("ar");
- // String name = (String) field.get(player);
- // System.out.println("Send PM to " + name);
- // Client.C.a(126);
- // Client.C.b(0);
- // int i2 = c.E.b;
- // Client.C.a(encodeName(name));
- // cq.a("Hello World", c.E);
- // c.E.h(c.E.b - i2);
- // }
- // }
- return;
- case "itemonnpc":
- for (int i = 0; i < 20; i++) {
- /*
- * Client.C.a(185); Client.C.f(2471);
- */
- }
- return;
- case "setMac":
- Field mac = Client.class.getDeclaredField("macAddress");
- mac.setAccessible(true);
- mac.set(c, "Lmao");
- System.out.println(mac.get(c).toString());
- Identity.identityKey = "12";
- System.out.println("THIS2");
- return;
- case "masstrade":
- while (true) {
- Field players = Client.class.getDeclaredField("playerIndices");
- players.setAccessible(true);
- int[] playerIds = (int[]) players.get(c);
- for (int i = 0; i < playerIds.length; i++) {
- if (playerIds[i] != 0) {
- try {
- stream.createFrame(39);
- stream.method431(playerIds[i]);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
- Thread.sleep(1000);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement