Fixed world login, Can now fully log into 7.3.2 (Must use Arctium WoW Client Launcher)

This commit is contained in:
hondacrx
2017-11-22 13:15:44 -05:00
parent 65fbebb12f
commit 4c6fb27054
3 changed files with 8 additions and 8 deletions
+2 -5
View File
@@ -279,13 +279,10 @@ public class RealmManager : Singleton<RealmManager>
byte[] compressed = Json.Deflate("JSONRealmListServerIPAddresses", serverAddresses);
byte[] serverSecret = new byte[0].GenerateRandomKey(32);
Sha256 sha256 = new Sha256();
sha256.Process(clientSecret.ToArray(), clientSecret.Count);
sha256.Finish(serverSecret, 32);
byte[] keyData = clientSecret.ToArray().Combine(serverSecret);
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_BNET_GAME_ACCOUNT_LOGIN_INFO);
stmt.AddValue(0, sha256.Digest.ToHexString());
stmt.AddValue(0, keyData.ToHexString());
stmt.AddValue(1, clientAddress.ToString());
stmt.AddValue(2, locale);
stmt.AddValue(3, os);
@@ -503,9 +503,11 @@ namespace Game.DataStorage
{
case 1: // 2 bytes
_commandData[i].Add(id, reader.ReadBytes(2));
reader.BaseStream.Position += 2;
break;
case 2: // 1 bytes
_commandData[i].Add(id, reader.ReadBytes(1));
reader.BaseStream.Position += 3;
break;
case 3: // 4 bytes
case 4:
+4 -3
View File
@@ -383,9 +383,6 @@ namespace Game.Network
// For hook purposes, we get Remoteaddress at this point.
string address = GetRemoteIpAddress().ToString();
Sha256 digestKeyHash = new Sha256();
digestKeyHash.Process(account.game.SessionKey, account.game.SessionKey.Length);
uint[] clientSeed = ClientTypeSeed_Win;
if (account.game.OS == "Wn64")
clientSeed = ClientTypeSeed_Wn64;
@@ -395,6 +392,10 @@ namespace Game.Network
byte[] byteArray = new byte[clientSeed.Length * 4];
Buffer.BlockCopy(clientSeed, 0, byteArray, 0, clientSeed.Length * 4);
Sha256 digestKeyHash = new Sha256();
digestKeyHash.Process(account.game.SessionKey, account.game.SessionKey.Length);
digestKeyHash.Finish(byteArray, byteArray.Length);
HmacSha256 hmac = new HmacSha256(digestKeyHash.Digest);
hmac.Process(authSession.LocalChallenge, authSession.LocalChallenge.Count);
hmac.Process(_serverChallenge, 16);