private void handleAuthLogonChallenge(RealmPacket packet) { packet.readByte(); // read unknown packet.readByte(); // read error srp.B = new BigInteger(packet.readBytes(32)); int SRP_g_len = packet.readByte(); // SRP_g length srp.g = new BigInteger(packet.readBytes(SRP_g_len)); // SRP_g int SRP_N_len = packet.readByte(); // SRP_N length srp.N = new BigInteger(packet.readBytes(SRP_N_len)); // SRP_N srp.s = packet.readBytes(32); // SRP salt packet.readString(16); // CRC, not checked packet.readByte(); // security flag // Calculate the SRP values srp.calculateSRP_A(); srp.calculateSRP_x(); srp.calculateSRP_v(); srp.calculateSRP_u(); srp.calculateSRP_S(); srp.calculateSRP_K(); srp.calculateSRP_M1(); srp.calculateSRP_M2(); }
private void handleRealmList(RealmPacket packet) { SRealmList realmList = SRealmList.getInstance(); packet.readUint16(); // size packet.readUint32(); // unk1 int nbrealms = packet.readUint16(); // nb realms for (int i = 0; i < nbrealms; i++) { Realm r = new Realm(); r.Icon = packet.readByte(); // icon r.IsLock = packet.readByte(); // lock r.Color = packet.readByte(); // color r.Name = packet.readCString(); // name r.Address = packet.readCString(); // address r.Population = packet.readFloat(); // population r.NbCharacters = packet.readByte(); // nb characters r.Timezone = packet.readByte(); // timezone packet.readByte(); // unk realmList.add(r); } packet.readByte(); // unk2 packet.readByte(); // unk3 }
private void handleAuthLogonProof(RealmPacket packet) { // *TODO* Do the proper checks packet.readByte(); // error byte[] M2 = packet.readBytes(20); // M2 packet.readUint32(); // unk1 packet.readUint32(); // unk2 packet.readUint16(); // unk3 }