mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2025-01-19 00:26:27 +01:00
reintroduce resume&pauseProcess, rc4Obtainer made faster, packet.toExpression() update/bugfix
This commit is contained in:
parent
469e1ace61
commit
4e152dc77f
@ -544,7 +544,7 @@ public class HPacket {
|
|||||||
continue out;
|
continue out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i+5 < packetInBytes.length && !mask[i+5]) continue;
|
if (!mask[i-1] || (i+5 < packetInBytes.length && !mask[i+5])) continue;
|
||||||
|
|
||||||
if ((readByte(i) == 0 || readByte(i) == 1) && (readInteger(i+1) > 1 || readInteger(i+1) < 0)) {
|
if ((readByte(i) == 0 || readByte(i) == 1) && (readInteger(i+1) > 1 || readInteger(i+1) < 0)) {
|
||||||
//decide the first byte to be the a boolean
|
//decide the first byte to be the a boolean
|
||||||
@ -784,6 +784,8 @@ public class HPacket {
|
|||||||
packet = new HPacket("[0][0][0]ã[4]Ù[0][0][0][12][0][0][0][1][0][18]Vetste Evenementen[0][0][0][0][2][0][16]Feesten & Muziek[1][0][0][0][3][0][10]Rollenspel[1][0][0][0][4][0][9]Help Desk[1][0][0][0][5][0][6]Ruilen[1][0][0][0][6][0][5]Games[1][0][0][0][7][0][7]Bouwers[1][0][0][0][8][0][21]Debatten & Discussies[1][0][0][0][9][0][9]Friending[1][0][0][0][10][0][10]Habbo Werk[1][0][0][0][11][0][9]Evenement[1][0][0][0][12][0][17]Groepsevenementen[0]");
|
packet = new HPacket("[0][0][0]ã[4]Ù[0][0][0][12][0][0][0][1][0][18]Vetste Evenementen[0][0][0][0][2][0][16]Feesten & Muziek[1][0][0][0][3][0][10]Rollenspel[1][0][0][0][4][0][9]Help Desk[1][0][0][0][5][0][6]Ruilen[1][0][0][0][6][0][5]Games[1][0][0][0][7][0][7]Bouwers[1][0][0][0][8][0][21]Debatten & Discussies[1][0][0][0][9][0][9]Friending[1][0][0][0][10][0][10]Habbo Werk[1][0][0][0][11][0][9]Evenement[1][0][0][0][12][0][17]Groepsevenementen[0]");
|
||||||
System.out.println(packet.toExpression());
|
System.out.println(packet.toExpression());
|
||||||
|
|
||||||
|
packet = new HPacket("[0][0][0][14][12]ã[0][0][0][4][0][0][0][0][1][26]#»");
|
||||||
|
System.out.println(packet.toExpression());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,6 +158,32 @@ public class HabboClient {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("Duplicates")
|
||||||
|
public void pauseProcess() {
|
||||||
|
String[] args = new String[] {"kill", "-STOP", PID+""};
|
||||||
|
Process proc;
|
||||||
|
try {
|
||||||
|
proc = new ProcessBuilder(args).start();
|
||||||
|
proc.waitFor();
|
||||||
|
proc.destroy();
|
||||||
|
} catch (IOException | InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("Duplicates")
|
||||||
|
public void resumeProcess() {
|
||||||
|
String[] args = new String[] {"kill", "-CONT", PID+""};
|
||||||
|
Process proc;
|
||||||
|
try {
|
||||||
|
proc = new ProcessBuilder(args).start();
|
||||||
|
proc.waitFor();
|
||||||
|
proc.destroy();
|
||||||
|
} catch (IOException | InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static boolean stringIsNumeric(String str) {
|
static boolean stringIsNumeric(String str) {
|
||||||
for (char c : str.toCharArray()) {
|
for (char c : str.toCharArray()) {
|
||||||
|
@ -15,7 +15,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
public class Rc4Obtainer {
|
public class Rc4Obtainer {
|
||||||
|
|
||||||
public static final boolean DEBUG = false;
|
public static final boolean DEBUG = true;
|
||||||
|
|
||||||
HabboClient client = null;
|
HabboClient client = null;
|
||||||
OutgoingHandler outgoingHandler = null;
|
OutgoingHandler outgoingHandler = null;
|
||||||
@ -77,8 +77,11 @@ public class Rc4Obtainer {
|
|||||||
// STEP ONE: filtering to obtain one area containing the rc4 data field
|
// STEP ONE: filtering to obtain one area containing the rc4 data field
|
||||||
int foundbuffersize = 0;
|
int foundbuffersize = 0;
|
||||||
while (foundbuffersize == 0) {
|
while (foundbuffersize == 0) {
|
||||||
|
|
||||||
|
client.pauseProcess();
|
||||||
diff = client.createMemorySnippetList();
|
diff = client.createMemorySnippetList();
|
||||||
client.fetchMemory(diff);
|
client.fetchMemory(diff);
|
||||||
|
client.resumeProcess();
|
||||||
this.addedBytes = 0;
|
this.addedBytes = 0;
|
||||||
|
|
||||||
Random rand = new Random();
|
Random rand = new Random();
|
||||||
@ -87,8 +90,8 @@ public class Rc4Obtainer {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
while (getTotalBytesLengthOfDiff(diff) > 2000) {
|
while (getTotalBytesLengthOfDiff(diff) > 2000) {
|
||||||
int am = 0;
|
int am = 0;
|
||||||
if (i % 2 == 1) {
|
if (i == 0 || i > 1) {
|
||||||
am = rand.nextInt(30) + 1;
|
am = rand.nextInt(25) + 5;
|
||||||
for (int j = 0; j < am; j++) {
|
for (int j = 0; j < am; j++) {
|
||||||
incomingHandler.sendToStream(new HPacket(pingHeader).toBytes());
|
incomingHandler.sendToStream(new HPacket(pingHeader).toBytes());
|
||||||
outgoingHandler.fakePongAlert();
|
outgoingHandler.fakePongAlert();
|
||||||
@ -97,7 +100,9 @@ public class Rc4Obtainer {
|
|||||||
}
|
}
|
||||||
sleep(50);
|
sleep(50);
|
||||||
int rem = addedBytes;
|
int rem = addedBytes;
|
||||||
|
if (i == 0) client.pauseProcess();
|
||||||
diff = searchForPossibleRC4Tables(diff);
|
diff = searchForPossibleRC4Tables(diff);
|
||||||
|
if (i == 0) client.resumeProcess();
|
||||||
if (DEBUG) System.out.println("size: " + getTotalBytesLengthOfDiff(diff) + " with changed bytes: " + rem + " should be: " + am * 6);
|
if (DEBUG) System.out.println("size: " + getTotalBytesLengthOfDiff(diff) + " with changed bytes: " + rem + " should be: " + am * 6);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -216,7 +221,7 @@ public class Rc4Obtainer {
|
|||||||
|
|
||||||
private List<MemorySnippet> searchForPossibleRC4Tables(List<MemorySnippet> snippets) {
|
private List<MemorySnippet> searchForPossibleRC4Tables(List<MemorySnippet> snippets) {
|
||||||
List<MemorySnippet> result;
|
List<MemorySnippet> result;
|
||||||
result = client.differentiate2(snippets, ((addedBytes * 2) / 3), addedBytes * 2, 1028);
|
result = client.differentiate2(snippets, addedBytes, addedBytes * 2, 1028);
|
||||||
addedBytes = 0;
|
addedBytes = 0;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user