mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Changed isEncrypted to isCompressed in basepacket. After speaking with another dev, game packets are not encrypted... just compressed. Figured out that byte 3 of basepacket is the connection type when handshaking with the map server.
This commit is contained in:
parent
a640e08fe1
commit
5d11a0b356
@ -67,7 +67,7 @@ namespace FFXIVClassic_Lobby_Server
|
|||||||
if (client.owner != 0 && mPlayers.ContainsKey(client.owner))
|
if (client.owner != 0 && mPlayers.ContainsKey(client.owner))
|
||||||
player = mPlayers[client.owner];
|
player = mPlayers[client.owner];
|
||||||
|
|
||||||
if (packet.header.isEncrypted == 0x01)
|
if (packet.header.isCompressed == 0x01)
|
||||||
BasePacket.decryptPacket(client.blowfish, ref packet);
|
BasePacket.decryptPacket(client.blowfish, ref packet);
|
||||||
|
|
||||||
// packet.debugPrintPacket();
|
// packet.debugPrintPacket();
|
||||||
|
@ -14,7 +14,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||||||
public struct BasePacketHeader
|
public struct BasePacketHeader
|
||||||
{
|
{
|
||||||
public byte isAuthenticated;
|
public byte isAuthenticated;
|
||||||
public byte isEncrypted;
|
public byte isCompressed;
|
||||||
public ushort reserved;
|
public ushort reserved;
|
||||||
public ushort packetSize;
|
public ushort packetSize;
|
||||||
public ushort numSubpackets;
|
public ushort numSubpackets;
|
||||||
@ -194,14 +194,14 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region Utility Functions
|
#region Utility Functions
|
||||||
public static BasePacket createPacket(List<SubPacket> subpackets, bool isAuthed, bool isEncrypted)
|
public static BasePacket createPacket(List<SubPacket> subpackets, bool isAuthed, bool isCompressed)
|
||||||
{
|
{
|
||||||
//Create Header
|
//Create Header
|
||||||
BasePacketHeader header = new BasePacketHeader();
|
BasePacketHeader header = new BasePacketHeader();
|
||||||
byte[] data = null;
|
byte[] data = null;
|
||||||
|
|
||||||
header.isAuthenticated = isAuthed?(byte)1:(byte)0;
|
header.isAuthenticated = isAuthed?(byte)1:(byte)0;
|
||||||
header.isEncrypted = isEncrypted?(byte)1:(byte)0;
|
header.isCompressed = isCompressed?(byte)1:(byte)0;
|
||||||
header.numSubpackets = (ushort)subpackets.Count;
|
header.numSubpackets = (ushort)subpackets.Count;
|
||||||
header.packetSize = BASEPACKET_SIZE;
|
header.packetSize = BASEPACKET_SIZE;
|
||||||
header.timestamp = Utils.MilisUnixTimeStampUTC();
|
header.timestamp = Utils.MilisUnixTimeStampUTC();
|
||||||
@ -227,14 +227,14 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BasePacket createPacket(SubPacket subpacket, bool isAuthed, bool isEncrypted)
|
public static BasePacket createPacket(SubPacket subpacket, bool isAuthed, bool isCompressed)
|
||||||
{
|
{
|
||||||
//Create Header
|
//Create Header
|
||||||
BasePacketHeader header = new BasePacketHeader();
|
BasePacketHeader header = new BasePacketHeader();
|
||||||
byte[] data = null;
|
byte[] data = null;
|
||||||
|
|
||||||
header.isAuthenticated = isAuthed ? (byte)1 : (byte)0;
|
header.isAuthenticated = isAuthed ? (byte)1 : (byte)0;
|
||||||
header.isEncrypted = isEncrypted ? (byte)1 : (byte)0;
|
header.isCompressed = isCompressed ? (byte)1 : (byte)0;
|
||||||
header.numSubpackets = (ushort)1;
|
header.numSubpackets = (ushort)1;
|
||||||
header.packetSize = BASEPACKET_SIZE;
|
header.packetSize = BASEPACKET_SIZE;
|
||||||
header.timestamp = Utils.MilisUnixTimeStampUTC();
|
header.timestamp = Utils.MilisUnixTimeStampUTC();
|
||||||
@ -254,7 +254,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BasePacket createPacket(byte[] data, bool isAuthed, bool isEncrypted)
|
public static BasePacket createPacket(byte[] data, bool isAuthed, bool isCompressed)
|
||||||
{
|
{
|
||||||
|
|
||||||
Debug.Assert(data != null);
|
Debug.Assert(data != null);
|
||||||
@ -263,7 +263,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||||||
BasePacketHeader header = new BasePacketHeader();
|
BasePacketHeader header = new BasePacketHeader();
|
||||||
|
|
||||||
header.isAuthenticated = isAuthed ? (byte)1 : (byte)0;
|
header.isAuthenticated = isAuthed ? (byte)1 : (byte)0;
|
||||||
header.isEncrypted = isEncrypted ? (byte)1 : (byte)0;
|
header.isCompressed = isCompressed ? (byte)1 : (byte)0;
|
||||||
header.numSubpackets = (ushort)1;
|
header.numSubpackets = (ushort)1;
|
||||||
header.packetSize = BASEPACKET_SIZE;
|
header.packetSize = BASEPACKET_SIZE;
|
||||||
header.timestamp = Utils.MilisUnixTimeStampUTC();
|
header.timestamp = Utils.MilisUnixTimeStampUTC();
|
||||||
@ -332,7 +332,7 @@ namespace FFXIVClassic_Lobby_Server.packets
|
|||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
Console.BackgroundColor = ConsoleColor.DarkYellow;
|
Console.BackgroundColor = ConsoleColor.DarkYellow;
|
||||||
Console.WriteLine("IsAuthed: {0}, IsEncrypted: {1}, Size: 0x{2:X}, Num Subpackets: {3}", header.isAuthenticated, header.isEncrypted, header.packetSize, header.numSubpackets);
|
Console.WriteLine("IsAuthed: {0}, IsEncrypted: {1}, Size: 0x{2:X}, Num Subpackets: {3}", header.isAuthenticated, header.isCompressed, header.packetSize, header.numSubpackets);
|
||||||
Console.WriteLine("{0}", Utils.ByteArrayToHex(getHeaderBytes()));
|
Console.WriteLine("{0}", Utils.ByteArrayToHex(getHeaderBytes()));
|
||||||
foreach (SubPacket sub in getSubpackets())
|
foreach (SubPacket sub in getSubpackets())
|
||||||
sub.debugPrintSubPacket();
|
sub.debugPrintSubPacket();
|
||||||
|
Loading…
Reference in New Issue
Block a user