Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Text;
- namespace BlackOps.Game.AuthPackets
- {
- public class Authentication : Interfaces.IPacket
- {
- public string Username;
- public string Password;
- public string Server;
- public string MacAddress;
- public Authentication()
- {
- }
- 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 == 1636)
- {
- Username = Program.Encoding.GetString(buffer, 4, 16);
- Username = Username.Replace("\0", "");
- Password = Program.Encoding.GetString(buffer, 72, 16);
- Password = Password.Replace("\0", "");
- Server = Program.Encoding.GetString(buffer, 2, 16);
- Server = Server.Replace("\0", "");
- MacAddress = Program.Encoding.GetString(buffer, 152, 16);
- MacAddress = MacAddress.Replace("\0", "");
- }
- }
- }
- }
- public byte[] ToArray()
- {
- throw new NotImplementedException();
- }
- public void Send(State.GameState client)
- {
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement