Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ☺ Created by Eslam Reda
- // ☺ Copyright © 2010 - 2016 TQ Digital
- // ☺ Emulator - Project
- using System;
- using System.IO;
- using System.Text;
- namespace COServer.Network.AuthPackets
- {
- public unsafe class Authentication : Interfaces.IPacket
- {
- public string Password, Username, Server, MacAddress;
- public Authentication()
- {
- }
- public byte[] ToArray()
- {
- throw new NotImplementedException();
- }
- public void Deserialize(byte[] buffer)
- {
- if (buffer.Length == 312)
- {
- ushort length = BitConverter.ToUInt16(buffer, 0);
- if (length == 312)
- {
- ushort type = BitConverter.ToUInt16(buffer, 2);
- byte[] temp = new byte[16];
- if (type == 1542)
- {
- MemoryStream MS = new MemoryStream(buffer);
- BinaryReader BR = new BinaryReader(MS);
- BR.ReadUInt16();
- BR.ReadUInt16();
- BR.ReadUInt32();
- Username = Encoding.Default.GetString(BR.ReadBytes(64)).Replace("\0", "");
- byte[] PasswordArray = BR.ReadBytes(64);
- //Cryptography.LoginCryptData.DoLogin(PasswordArray, 32);
- Password = Encoding.Default.GetString(PasswordArray).Replace("\0", "");
- Server = Encoding.Default.GetString(BR.ReadBytes(16)).Replace("\0", "");
- MacAddress = Encoding.Default.GetString(BR.ReadBytes(12)).Replace("\0", "");
- BR.Close();
- MS.Close();
- }
- }
- }
- }
- public void Send(Client.GameState client)
- {
- throw new NotImplementedException();
- }
- }
- }
- المفتاح
- GameCryptographyKey = "C238xs65pjy7HU9Q",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement