Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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();
- Username = Program.Encoding.GetString(BR.ReadBytes(32));
- Username = Username.Replace("\0", "");
- BR.ReadBytes(36);
- byte[] PasswordArray = BR.ReadBytes(32);
- Password = Program.Encoding.GetString(PasswordArray);
- Password = Password.Replace("\0", "");
- BR.ReadBytes(32);
- Server = Program.Encoding.GetString(BR.ReadBytes(16));
- Server = Server.Replace("\0", "");
- Mac = Program.Encoding.GetString(BR.ReadBytes(12));
- BR.Close();
- MS.Close();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement