SHARE
TWEET

Untitled

a guest Jun 19th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void ReceiveHandshake(Packet packet, Client client)
  2.         {
  3.             Packet mPacket = new Packet();
  4.             string mClientMD5Token = packet.ReadStringL();
  5.             string mClientVersion = packet.ReadStringL();
  6.             if (mClientMD5Token == Encryption.CryptoManager.HashMD5(Config.Instance.MD5Token))
  7.             {
  8.                 mPacket.WriteByte((byte)Enums.EHandshakeState.ValidToken);
  9.             }
  10.             else
  11.                 mPacket.WriteByte((byte)Enums.EHandshakeState.InvalidToken);
  12.                
  13.             if(mClientVersion != Encryption.CryptoManager.HashMD5(Config.Instance.ClientVersion)
  14.             {
  15.                 mPacket.WriteByte((byte)Enums.EHandshakeState.OutdatedVersion);
  16.             }
  17.             client.SendPacket(mPacket);
RAW Paste Data
Top