Description: Even momosherilly was liek, How to get the encrypted join chat stream method. 1 minute ago. I found out its just converting a long to string.
Difficulty: 1/10
Assumed Knowledge: Basic Java
Tested Server: Espeon the Rebirth 508
Files/Classes Modified: Own class
Procedure
Step 1:
Client structure:
Code:
if (l != 0L) {
Class21.aPacketStream_466.createFrame(98, 42);
if (i != -256)
method1650(-102, 125, 108);
Class21.aPacketStream_466.writeLong(true, l);
Class97.anInt1715++;
}
Server structure:
Code:
readQWord() <- which we convert to a string.
Handle packet structure:
Code:
package org.encouragin.espeon.packethandler;
import org.encouragin.espeon.util.Misc;
import org.encouragin.espeon.model.player.Client;
import org.encouragin.espeon.net.packets.Handler;
public class ClanChat implements Handler {
public void handlePacket(Client client, int packetId, int packetSize) {
try {
if (client != null) {
if (client.getPacket() != null) {
switch (packetId) {
case 42:
String name = Misc.longToString(
client.getPacket().readQWord()
);
System.out.println("Name discovered: " + name);
break;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
For people who do not have the converting method of long to string.
Code:
public static String longToString(long l) {
if (l <= 0L || l >= 0x5b5b57f8a98a5dd1L) {
return "invalid_name";
}
if (l % 37L == 0L) {
return "invalid_name";
}
int i = 0;
char ac[] = new char[12];
while (l != 0L) {
long l1 = l;
l /= 37L;
ac[11 - i++] = validChars[(int)(l1 - l * 37L)];
}
return new String(ac, 12 - i, i);
}
Credits:
Encouragin
Jagex