Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6 from ratkosrb/cypher_proxy
Browse files Browse the repository at this point in the history
Add latest changes
  • Loading branch information
ratkosrb authored May 9, 2022
2 parents 5c4f2db + cf4f148 commit 37faae2
Show file tree
Hide file tree
Showing 63 changed files with 12,647 additions and 1,945 deletions.
2 changes: 2 additions & 0 deletions Framework/Configuration/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public static class Settings
public static readonly ClientVersionBuild ServerBuild = Conf.GetEnum("ServerBuild", ClientVersionBuild.V2_4_3_8606);
public static readonly string ServerAddress = Conf.GetString("ServerAddress", "127.0.0.1");
public static readonly int ServerPort = Conf.GetInt("ServerPort", 3724);
public static readonly string ReportedOS = Conf.GetString("ReportedOS", "OSX");
public static readonly string ReportedPlatform = Conf.GetString("ReportedPlatform", "PPC");
public static readonly string ExternalAddress = Conf.GetString("ExternalAddress", "127.0.0.1");
public static readonly int RestPort = Conf.GetInt("RestPort", 8081);
public static readonly int BNetPort = Conf.GetInt("BNetPort", 1119);
Expand Down
12 changes: 12 additions & 0 deletions HermesProxy/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
Default: "3724"
-->
<add key="ServerPort" value="3724" />
<!--
Option: ReportedOS
Description: The OS identifier that will be sent to the remote server.
Default: "OSX"
-->
<add key="ReportedOS" value="OSX" />
<!--
Option: ReportedPlatform
Description: The platform identifier that will be sent to the remote server.
Default: "PPC"
-->
<add key="ReportedPlatform" value="PPC" />
<!--
Option: ExternalAddress
Description: Your real IP address on which others can connect.
Expand Down
16 changes: 8 additions & 8 deletions HermesProxy/Auth/AuthClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,21 +180,21 @@ private void SendLogonChallenge()
{
ByteBuffer buffer = new ByteBuffer();
buffer.WriteUInt8((byte)AuthCommand.LOGON_CHALLENGE);
buffer.WriteUInt8(6);
buffer.WriteUInt8((byte)(LegacyVersion.GetExpansionVersion() > 1 ? 8 : 3));
buffer.WriteUInt16((UInt16)(_username.Length + 30));
buffer.WriteBytes(Encoding.ASCII.GetBytes("WoW"));
buffer.WriteUInt8(0);
buffer.WriteUInt8(LegacyVersion.GetExpansionVersion());
buffer.WriteUInt8(LegacyVersion.GetMajorPatchVersion());
buffer.WriteUInt8(LegacyVersion.GetMinorPatchVersion());
buffer.WriteUInt16((ushort)Settings.ServerBuild);
buffer.WriteBytes(Encoding.ASCII.GetBytes("68x"));
buffer.WriteBytes(Encoding.ASCII.GetBytes(Settings.ReportedPlatform.Reverse()));
buffer.WriteUInt8(0);
buffer.WriteBytes(Encoding.ASCII.GetBytes("niW"));
buffer.WriteBytes(Encoding.ASCII.GetBytes(Settings.ReportedOS.Reverse()));
buffer.WriteUInt8(0);
buffer.WriteBytes(Encoding.ASCII.GetBytes(_locale.Reverse()));
buffer.WriteUInt32((uint)0x3c);
buffer.WriteUInt32(0); // IP
buffer.WriteUInt32(16777343); // IP (127.0.0.1)
buffer.WriteUInt8((byte)_username.Length);
buffer.WriteBytes(Encoding.ASCII.GetBytes(_username.ToUpper()));
SendPacket(buffer);
Expand All @@ -217,12 +217,12 @@ private void HandleLogonChallenge(ByteBuffer packet)
byte challenge_nLen = packet.ReadUInt8();
byte[] challenge_N = packet.ReadBytes(32);
byte[] challenge_salt = packet.ReadBytes(32);
byte[] challenge_unk3 = packet.ReadBytes(16);
byte[] challenge_version = packet.ReadBytes(16);
byte challenge_securityFlags = packet.ReadUInt8();

//Console.WriteLine("Received logon challenge");

BigInteger N, A, B, a, u, x, S, salt, unk1, g, k;
BigInteger N, A, B, a, u, x, S, salt, versionChallenge, g, k;
k = new BigInteger(3);

#region Receive and initialize
Expand All @@ -231,13 +231,13 @@ private void HandleLogonChallenge(ByteBuffer packet)
g = challenge_g.ToBigInteger();
N = challenge_N.ToBigInteger(); // modulus
salt = challenge_salt.ToBigInteger();
unk1 = challenge_unk3.ToBigInteger();
versionChallenge = challenge_version.ToBigInteger();

//Console.WriteLine("---====== Received from server: ======---");
//Console.WriteLine($"B={B.ToCleanByteArray().ToHexString()}");
//Console.WriteLine($"N={N.ToCleanByteArray().ToHexString()}");
//Console.WriteLine($"salt={challenge_salt.ToHexString()}");

//Console.WriteLine($"versionChallenge={challenge_version.ToHexString()}");
#endregion

#region Hash password
Expand Down
5 changes: 5 additions & 0 deletions HermesProxy/CSV/AutoRepeatSpells1.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SpellId
75
1485
5019
19881
7 changes: 7 additions & 0 deletions HermesProxy/CSV/AutoRepeatSpells2.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SpellId
75
1485
5019
19881
31317
38196
2 changes: 1 addition & 1 deletion HermesProxy/CSV/Battlegrounds.csv
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ BattlegroundId,IsArena,MapId1,MapId2,MapId3,MapId4,MapId5,MapId6
10,1,617,0,0,0,0,0
11,1,618,0,0,0,0,0
30,0,628,0,0,0,0,0
32,0,30,489,529,566,607,628
32,0,30,489,529,566,607,628
2 changes: 1 addition & 1 deletion HermesProxy/CSV/BroadcastTexts1.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2468,4 +2468,4 @@
"14385","Greetings, citizen. I ask that you move along if you have nothing to ask of me.","","0","1","1","0","0","0","0"
"14386","Marshal Windsor has been expecting you, $n. Unfortunately, he is currently indisposed. He should be returning shortly.","","0","1","1","0","0","0","0"
"14387","You made it! Outstanding! Marshal Windsor has been expecting you. Would you like me to signal him now?","","0","1","1","0","0","0","0"
"14390","Hail, champion. The tale of your deeds will be told throughout the ages. Perhaps one day, a statue of you will stand amongst the heroes of Stormwind.","","0","1","1","66","0","0","0"
"14390","Hail, champion. The tale of your deeds will be told throughout the ages. Perhaps one day, a statue of you will stand amongst the heroes of Stormwind.","","0","1","1","66","0","0","0"
Expand Down
2 changes: 1 addition & 1 deletion HermesProxy/CSV/BroadcastTexts2.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3522,4 +3522,4 @@
"27594","","Listen, you tell Schweitzer and Roitau that we've got everything under control here. They don't gotta... what?$B$BThey didn't send you? Then what are you wasting my time for?$B$BI've got work to do!","0","1","5","0","0","3","0"
"27595","Hey, can't you see I'm busy here?!$B$BYou wanna watch the show? The band plays every night at eight.","","0","5","1","0","0","1","0"
"28565","","We're tryin' ta blow this wall so Wick's men can work on the new Harbor gatehouse and road beyond, but the clueless sod is cryin' about me using too much powder!$B$BTch. I've been sappin' since he was in diapers. This goes on much longer, I'll kick him into the canal and finish the whole blasted job meself!","7","1","5","0","0","3","0"
"28566","We're building another road down into Stormwind Harbor as soon as this wall has been removed... but this mad dwarf brought enough powder to level the entire quarter!$B$BI don't know what Master Alexston was thinking when he hired her... she's foul-mouthed, mean, and stubborn as an ox!","","0","1","5","0","0","3","0"
"28566","We're building another road down into Stormwind Harbor as soon as this wall has been removed... but this mad dwarf brought enough powder to level the entire quarter!$B$BI don't know what Master Alexston was thinking when he hired her... she's foul-mouthed, mean, and stubborn as an ox!","","0","1","5","0","0","3","0"
2 changes: 1 addition & 1 deletion HermesProxy/CSV/DispellSpells.csv
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ SpellId
28272
29462
29463
30281
30281
2 changes: 1 addition & 1 deletion HermesProxy/CSV/Gems2.csv
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,4 @@ EnchantId,ItemId
3337,38547
3338,38548
3339,38549
3340,38550
3340,38550
2 changes: 1 addition & 1 deletion HermesProxy/CSV/Gems3.csv
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,4 @@ EnchantId,ItemId
3865,45882
3866,45883
3867,45987
3879,49110
3879,49110
Loading

0 comments on commit 37faae2

Please sign in to comment.