public override void Dispatch(InPacket inPacket) { using (OutPacket outPacket = new OutPacket(inPacket)) { if (ServerSession.Instance != null) { ServerSession.Instance.Send(outPacket.ToArray()); } } }
public override void Dispatch(InPacket inPacket) { using (OutPacket outPacket = new OutPacket(inPacket)) { if (ServerSession.Instance != null) { ServerSession.Instance.Send(outPacket.ToArray()); } } }
public byte[] GetHashPacket() { using (OutPacket outPacket = new OutPacket(0x0999)) { foreach (string path in Directory.GetFiles(this.Config.MapleStoryPath)) { string extension = Path.GetExtension(path); string name = Path.GetFileNameWithoutExtension(path); if (extension.ToLower().Contains("wz")) { outPacket.WriteString(name); outPacket.WriteString(HashUtilities.GetMD5HashFromFile(path)); } } return outPacket.ToArray(); } }
public void Handshake(ServerInfo serverInfo) { _encryptIV = new byte[4]; rnd.NextBytes(_encryptIV); _decryptIV = new byte[4]; rnd.NextBytes(_decryptIV); using (OutPacket outPacket = new OutPacket()) { outPacket.WriteUShort(serverInfo.Version); outPacket.WriteString(serverInfo.Subversion); outPacket.WriteBytes(_decryptIV); outPacket.WriteBytes(_encryptIV); outPacket.WriteByte((byte)serverInfo.Localisation); outPacket.WriteByte(); // NOTE: Unknown, added in v.160.1. this.Send(outPacket.ToArray()); } Session.AssignUserKey(this.ServerInfo); }
public void Handshake(ServerInfo serverInfo) { _encryptIV = new byte[4]; rnd.NextBytes(_encryptIV); _decryptIV = new byte[4]; rnd.NextBytes(_decryptIV); using (OutPacket outPacket = new OutPacket()) { outPacket.WriteUShort(serverInfo.Version); outPacket.WriteString(serverInfo.Subversion); outPacket.WriteBytes(_decryptIV); outPacket.WriteBytes(_encryptIV); outPacket.WriteByte((byte)serverInfo.Localisation); outPacket.WriteByte(); // NOTE: Unknown, added in v.160.1. this.Send(outPacket.ToArray()); } Session.AssignUserKey(this.ServerInfo); }