Core: Updated to 11.0.7
Port From (https://github.com/TrinityCore/TrinityCore/commit/4f7079f471401d5cf7885351baabc027813f60f5)
This commit is contained in:
@@ -53,7 +53,7 @@ namespace Game.Networking.Packets
|
||||
_worldPacket.WriteUInt8(DosZeroBits);
|
||||
}
|
||||
|
||||
public byte[] Challenge = new byte[16];
|
||||
public byte[] Challenge = new byte[32];
|
||||
public byte[] DosChallenge = new byte[32]; // Encryption seeds
|
||||
public byte DosZeroBits;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ namespace Game.Networking.Packets
|
||||
public uint RegionID;
|
||||
public uint BattlegroupID;
|
||||
public uint RealmID;
|
||||
public Array<byte> LocalChallenge = new(16);
|
||||
public Array<byte> LocalChallenge = new(32);
|
||||
public byte[] Digest = new byte[24];
|
||||
public ulong DosResponse;
|
||||
public string RealmJoinTicket;
|
||||
@@ -288,7 +288,9 @@ namespace Game.Networking.Packets
|
||||
hash.Process((uint)Payload.Where.Type);
|
||||
hash.Finish(BitConverter.GetBytes(Payload.Port));
|
||||
|
||||
Payload.Signature = RsaCrypt.RSA.SignHash(hash.Digest, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1).Reverse().ToArray();
|
||||
var signHash = RsaCrypt.RSA.SignHash(hash.Digest, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
|
||||
signHash.Reverse();
|
||||
Payload.Signature = signHash;
|
||||
|
||||
_worldPacket.WriteBytes(Payload.Signature, (uint)Payload.Signature.Length);
|
||||
_worldPacket.WriteBytes(whereBuffer);
|
||||
@@ -341,7 +343,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public ulong DosResponse;
|
||||
public ulong Key;
|
||||
public byte[] LocalChallenge = new byte[16];
|
||||
public byte[] LocalChallenge = new byte[32];
|
||||
public byte[] Digest = new byte[24];
|
||||
}
|
||||
|
||||
@@ -372,7 +374,8 @@ namespace Game.Networking.Packets
|
||||
bool Enabled;
|
||||
static byte[] expandedPrivateKey;
|
||||
|
||||
static byte[] EnableEncryptionSeed = { 0x90, 0x9C, 0xD0, 0x50, 0x5A, 0x2C, 0x14, 0xDD, 0x5C, 0x2C, 0xC0, 0x64, 0x14, 0xF3, 0xFE, 0xC9 };
|
||||
static byte[] EnableEncryptionSeed = { 0x66, 0xBE, 0x29, 0x79, 0xEF, 0xF2, 0xD5, 0xB5, 0x61, 0x53, 0xF6, 0x5F, 0x45, 0xAE, 0x81, 0xCB,
|
||||
0x32, 0xEC, 0x94, 0xEC, 0x75, 0xB3, 0x5F, 0x44, 0x6A, 0x63, 0x43, 0x67, 0x17, 0x20, 0x44, 0x34 };
|
||||
static byte[] EnableEncryptionContext = { 0xA7, 0x1F, 0xB6, 0x9B, 0xC9, 0x7C, 0xDD, 0x96, 0xE9, 0xBB, 0xB8, 0x21, 0x39, 0x8D, 0x5A, 0xD4 };
|
||||
|
||||
static byte[] EnterEncryptedModePrivateKey =
|
||||
@@ -396,7 +399,7 @@ namespace Game.Networking.Packets
|
||||
|
||||
public override void Write()
|
||||
{
|
||||
HmacSha256 toSign = new(EncryptionKey);
|
||||
HmacSha512 toSign = new(EncryptionKey);
|
||||
toSign.Process(BitConverter.GetBytes(Enabled), 1);
|
||||
toSign.Finish(EnableEncryptionSeed, 16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user