mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2025-01-19 00:26:27 +01:00
merge and provide production in windowshabboclient
This commit is contained in:
parent
2f6707a0f7
commit
3818076d9e
@ -1,6 +1,8 @@
|
|||||||
package main.protocol.memory.habboclient.windows;
|
package main.protocol.memory.habboclient.windows;
|
||||||
|
|
||||||
import main.protocol.HConnection;
|
import main.protocol.HConnection;
|
||||||
|
import main.protocol.HMessage;
|
||||||
|
import main.protocol.TrafficListener;
|
||||||
import main.protocol.memory.habboclient.HabboClient;
|
import main.protocol.memory.habboclient.HabboClient;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -17,6 +19,20 @@ import java.util.*;
|
|||||||
public class WindowsHabboClient extends HabboClient {
|
public class WindowsHabboClient extends HabboClient {
|
||||||
public WindowsHabboClient(HConnection connection) {
|
public WindowsHabboClient(HConnection connection) {
|
||||||
super(connection);
|
super(connection);
|
||||||
|
|
||||||
|
connection.addTrafficListener(0, message -> {
|
||||||
|
if (message.getDestination() == HMessage.Side.TOSERVER && message.getPacket().headerId() == PRODUCTIONID) {
|
||||||
|
production = message.getPacket().readString();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final int PRODUCTIONID = 4000;
|
||||||
|
private String production = "";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<byte[]> getRC4cached() {
|
||||||
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ArrayList<String> readPossibleBytes() throws IOException, URISyntaxException {
|
private ArrayList<String> readPossibleBytes() throws IOException, URISyntaxException {
|
||||||
@ -36,11 +52,6 @@ public class WindowsHabboClient extends HabboClient {
|
|||||||
return possibleData;
|
return possibleData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<byte[]> getRC4cached() {
|
|
||||||
return new ArrayList<>();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<byte[]> getRC4possibilities() {
|
public List<byte[]> getRC4possibilities() {
|
||||||
List<byte[]> result = new ArrayList<>();
|
List<byte[]> result = new ArrayList<>();
|
||||||
@ -55,7 +66,7 @@ public class WindowsHabboClient extends HabboClient {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] hexStringToByteArray(String s) {
|
public static byte[] hexStringToByteArray(String s) {
|
||||||
int len = s.length();
|
int len = s.length();
|
||||||
byte[] data = new byte[len / 2];
|
byte[] data = new byte[len / 2];
|
||||||
|
Loading…
Reference in New Issue
Block a user