private void onKeyPacket(Bytebuffer packet) { packet.ReadByte(); this.cryptKey = packet.ReadBytes(16); this.cryptKey[8] = (byte)0xc8; this.cryptKey[9] = (byte)0x27; this.cryptKey[10] = (byte)0x93; this.cryptKey[11] = (byte)0x01; this.cryptKey[12] = (byte)0xa1; this.cryptKey[13] = (byte)0x6c; this.cryptKey[14] = (byte)0x31; this.cryptKey[15] = (byte)0x97; serverCrypt.setKey(this.cryptKey); clientCrypt.setKey(this.cryptKey); // ddcd packet.ReadInt(); packet.ReadInt(); packet.ReadByte(); this.obfusicateKey = packet.ReadInt(); serverCrypt.generateOpcodeTable(this.obfusicateKey); clientCrypt.generateOpcodeTable(this.obfusicateKey); }
private void onCharSelected(Bytebuffer packet) { packet.ReadString(); // name packet.ReadInt(); // CharId packet.ReadString(); // Title packet.ReadBytes(196); // 196 bytes this.obfusicateKey = packet.ReadInt(); serverCrypt.generateOpcodeTable(this.obfusicateKey); clientCrypt.generateOpcodeTable(this.obfusicateKey); }
private void handleInit(Bytebuffer packet) { int sessionId = packet.ReadInt(); int protocolVer = packet.ReadInt(); byte[] publicKey = packet.ReadBytes(0x80); // 4x read D (GameGuard); for (int i = 0; i < 4; i++) { packet.ReadInt(); } byte[] blowfishKey = packet.ReadBytes(0x10); // set new key in LoginCrypt serverCrypt.setKey(blowfishKey); clientCrypt.setKey(blowfishKey); }