aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-10-04 00:48:04 +0200
committerShauren <shauren.trinity@gmail.com>2014-10-04 19:13:54 +0200
commitcc95d7ebbe573e5c9e7eddf924ac67d2838a5685 (patch)
tree48d323d0b542b84008b80bb21d33f4361cdce13a /contrib
parent973df92043a53f309b54eb667f3e6c70d3e86bf3 (diff)
Core/Authserver: Updated battle.net structures to 6.0.2.18973
Diffstat (limited to 'contrib')
-rw-r--r--contrib/Connection Patcher/Connection Patcher.csproj1
-rw-r--r--contrib/Connection Patcher/Offsets/Windows.cs40
-rw-r--r--contrib/Connection Patcher/Patches/Mac.cs21
-rw-r--r--contrib/Connection Patcher/Patches/Windows.cs22
-rw-r--r--contrib/Connection Patcher/Patterns/Mac.cs10
-rw-r--r--contrib/Connection Patcher/Patterns/Windows.cs12
-rw-r--r--contrib/Connection Patcher/Program.cs113
7 files changed, 78 insertions, 141 deletions
diff --git a/contrib/Connection Patcher/Connection Patcher.csproj b/contrib/Connection Patcher/Connection Patcher.csproj
index 8ad5a631aed..7ee4bf6f972 100644
--- a/contrib/Connection Patcher/Connection Patcher.csproj
+++ b/contrib/Connection Patcher/Connection Patcher.csproj
@@ -46,7 +46,6 @@
<ItemGroup>
<Compile Include="Constants\BinaryTypes.cs" />
<Compile Include="Helper.cs" />
- <Compile Include="Offsets\Windows.cs" />
<Compile Include="Patcher.cs" />
<Compile Include="Patches\Mac.cs" />
<Compile Include="Patches\Windows.cs" />
diff --git a/contrib/Connection Patcher/Offsets/Windows.cs b/contrib/Connection Patcher/Offsets/Windows.cs
deleted file mode 100644
index 4f2f32708cc..00000000000
--- a/contrib/Connection Patcher/Offsets/Windows.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-namespace Connection_Patcher.Offsets
-{
- static class Windows
- {
- public static class x86
- {
- public static readonly long BNet = 0xD3259;
- public static readonly long Send = 0x889CA;
- public static readonly long Recv = 0x86EEE;
- public static readonly long Signature = 0x20B79;
- public static readonly long RealmList = 0x228D6C;
- }
-
- public static class x64
- {
- public static readonly long BNet = 0;
- public static readonly long Send = 0xAAB6B;
- public static readonly long Recv = 0xA9FA3;
- public static readonly long Signature = 0;
- public static readonly long RealmList = 0x2BB33C;
- }
- }
-}
diff --git a/contrib/Connection Patcher/Patches/Mac.cs b/contrib/Connection Patcher/Patches/Mac.cs
index 583d1398354..aab9e57c240 100644
--- a/contrib/Connection Patcher/Patches/Mac.cs
+++ b/contrib/Connection Patcher/Patches/Mac.cs
@@ -20,25 +20,12 @@ namespace Connection_Patcher.Patches
{
class Mac
{
- public static class x86
- {
- public static byte[] BNet = { };
- public static byte[] Send = { };
- public static byte[] Recv = { };
- public static byte[] Password = { 0x0F, 0x85 };
- public static byte[] Signature = { };
- }
-
public static class x64
{
- //public static byte[] BNet = { 0xB8, 0xD5, 0xF8, 0x7F, 0x82, 0x89, 0x47, 0x0C, 0x5D, 0xC3, 0x90, 0x90, 0x90 };
- public static byte[] BNet = { };
- //public static byte[] Send = { 0x90, 0x31, 0xDB };
- public static byte[] Send = { };
- public static byte[] Recv = { };
- public static byte[] Password = { 0x0F, 0x85 };
- //public static byte[] Signature = { 0x45, 0x31, 0xED, 0x4D, 0x89, 0xFC, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xEB };
- public static byte[] Signature = { };
+ public static byte[] BNet = { 0xB8, 0xD5, 0xF8, 0x7F, 0x82, 0x89, 0x47, 0x0C, 0x5D, 0xC3, 0x90, 0x90, 0x90 };
+ public static byte[] Connect = { };
+ public static byte[] Password = { 0x0F, 0x85 };
+ public static byte[] Signature = { 0x45, 0x31, 0xED, 0x4D, 0x89, 0xFC, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xEB };
}
}
}
diff --git a/contrib/Connection Patcher/Patches/Windows.cs b/contrib/Connection Patcher/Patches/Windows.cs
index feb10507084..c76f71312fb 100644
--- a/contrib/Connection Patcher/Patches/Windows.cs
+++ b/contrib/Connection Patcher/Patches/Windows.cs
@@ -22,25 +22,19 @@ namespace Connection_Patcher.Patches
{
public static class x86
{
- public static byte[] BNet = { 0x89, 0x48, 0x08, 0xC7, 0x40, 0x0C, 0xD5, 0xF8, 0x7F, 0x82, 0x90 };
- public static byte[] Send = { 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90, 0xEB };
- public static byte[] Recv = { 0xB8, 0x00, 0x00, 0x00, 0x00 };
- public static byte[] Password = { 0x75 };
- public static byte[] Signature = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xE9 };
- public static byte[] RealmList = { 0x08 };
- public static byte[] RealmListBn = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+ public static byte[] BNet = { 0xC7, 0x40, 0x0C, 0xD5, 0xF8, 0x7F, 0x82 };
+ public static byte[] Connect = { 0xEB };
+ public static byte[] Password = { 0x75 };
+ public static byte[] Signature = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xEB };
}
public static class x64
{
- //public static byte[] BNet = { 0xB8, 0xD5, 0xF8, 0x7F, 0x82, 0x89, 0x41, 0x0C, 0x48, 0x8B, 0xC1, 0xC3 };
- public static byte[] BNet = { };
- public static byte[] Send = { 0x45, 0x33, 0xED, 0x90, 0x90, 0x90 };
- public static byte[] Recv = { 0xB8, 0x00, 0x00, 0x00, 0x00, 0x90 };
+ public static byte[] BNet = { 0xB8, 0xD5, 0xF8, 0x7F, 0x82, 0x89, 0x41, 0x0C, 0x48, 0x8B, 0xC1, 0xC3 };
+ public static byte[] Portal = new byte[18];
+ public static byte[] Connect = { 0xEB };
public static byte[] Password = { 0x75 };
- public static byte[] RealmList = { 0x4C, 0x8B, 0xEA };
- //public static byte[] Signature = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xE9 };
- public static byte[] Signature = { };
+ public static byte[] Signature = { 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0xE9 };
}
}
}
diff --git a/contrib/Connection Patcher/Patterns/Mac.cs b/contrib/Connection Patcher/Patterns/Mac.cs
index d518aa3c78f..fa89a667105 100644
--- a/contrib/Connection Patcher/Patterns/Mac.cs
+++ b/contrib/Connection Patcher/Patterns/Mac.cs
@@ -20,14 +20,12 @@ namespace Connection_Patcher.Patterns
{
class Mac
{
- public static class x86
- {
- public static byte[] Password = { 0x0F, 0x84, 0xE3, 0x00, 0x00, 0x00, 0x8B, 0x03, 0x8B, 0x40, 0x04 };
- }
-
public static class x64
{
- public static byte[] Password = { 0x0F, 0x84, 0x00, 0xFF, 0xFF, 0xFF, 0x49, 0x8B, 0x45, 0x00, 0xB9, 0x40 };
+ public static byte[] BNet = { 0x8B, 0x06, 0x89, 0x47, 0x0C, 0x5D, 0xC3 };
+ public static byte[] Connect = { };
+ public static byte[] Password = { 0x0F, 0x84, 0x00, 0xFF, 0xFF, 0xFF, 0x49, 0x8B, 0x45, 0x00, 0xB9, 0x40 };
+ public static byte[] Signature = { 0xE8, 0x00, 0x00, 0x00, 0x00, 0x45, 0x31, 0xED, 0x4D, 0x89, 0xFC, 0x84, 0xC0, 0x75 };
}
}
}
diff --git a/contrib/Connection Patcher/Patterns/Windows.cs b/contrib/Connection Patcher/Patterns/Windows.cs
index f8bde67dddb..fef0c47d465 100644
--- a/contrib/Connection Patcher/Patterns/Windows.cs
+++ b/contrib/Connection Patcher/Patterns/Windows.cs
@@ -22,13 +22,19 @@ namespace Connection_Patcher.Patterns
{
public static class x86
{
- public static byte[] Password = { 0x74, 0x89, 0x8B, 0x16, 0x8B, 0x42, 0x04 };
- public static byte[] RealmListBn = { 0x2E, 0x6C, 0x6F, 0x67, 0x6F, 0x6E, 0x2E, 0x62, 0x61, 0x74, 0x74, 0x6C, 0x65, 0x2E, 0x6E, 0x65, 0x74 };
+ public static byte[] BNet = { 0x8B, 0x75, 0x08, 0x8D, 0x78, 0x0C };
+ public static byte[] Connect = { 0x74, 0x33, 0x6A, 0x04, 0xFF, 0x75, 0xF8 };
+ public static byte[] Password = { 0x74, 0x89, 0x8B, 0x16, 0x8B, 0x42, 0x04 };
+ public static byte[] Signature = { 0xE8, 0x00, 0x00, 0x00, 0x00, 0x84, 0xC0, 0x75, 0x5F, 0x33, 0xC0 };
}
public static class x64
{
- public static byte[] Password = { 0x74, 0x84, 0x48, 0x8B, 0x03 };
+ public static byte[] BNet = { 0x8B, 0x02, 0x89, 0x41, 0x0C, 0x48, 0x8B, 0xC1, 0xC3 };
+ public static byte[] Portal = { 0x2E, 0x6C, 0x6F, 0x67, 0x6F, 0x6E, 0x2E, 0x62, 0x61, 0x74, 0x74, 0x6C, 0x65, 0x2E, 0x6E, 0x65, 0x74, 0x00 };
+ public static byte[] Connect = { 0x74, 0x2C, 0x48, 0x8D, 0x4C, 0x24, 0x78 };
+ public static byte[] Password = { 0x74, 0x84, 0x48, 0x8B, 0x03 };
+ public static byte[] Signature = { 0xE8, 0x00, 0x00, 0x00, 0x00, 0x84, 0xC0, 0x0F, 0x85, 0x88, 0x00, 0x00, 0x00, 0x45, 0x33, 0xC0 };
}
}
}
diff --git a/contrib/Connection Patcher/Program.cs b/contrib/Connection Patcher/Program.cs
index 956741b625b..579f47a09f8 100644
--- a/contrib/Connection Patcher/Program.cs
+++ b/contrib/Connection Patcher/Program.cs
@@ -42,23 +42,18 @@ namespace Connection_Patcher
var modulePath = "";
var moduleFile = "";
- // Let's use Win32 as default module
- var patchSend = Patches.Windows.x86.Send;
- var offsetSend = Offsets.Windows.x86.Send;
- var patchRecv = Patches.Windows.x86.Recv;
- var offsetRecv = Offsets.Windows.x86.Recv;
- var patchBNet = Patches.Windows.x86.BNet;
- var offsetBNet = Offsets.Windows.x86.BNet;
- var patchSignature = Patches.Windows.x86.Signature;
- var offsetSignature = Offsets.Windows.x86.Signature;
- var fileName = args[0].Replace(".exe", "_Patched.exe");
- var battleNetFileName = args[0].Replace("Wow.exe", "Battle.net.dll");
- var modulePatch = Patches.Windows.x86.Password;
- var modulePattern = Patterns.Windows.x86.Password;
- var realmListPatch = Patches.Windows.x86.RealmList;
- var realmListoffset = Offsets.Windows.x86.RealmList;
- var realmListBnPatch = Patches.Windows.x86.RealmListBn;
- var realmListBnPattern = Patterns.Windows.x86.RealmListBn;
+ // Let's use Win64 as default module
+ var modulePatch = Patches.Windows.x64.Password;
+ var modulePattern = Patterns.Windows.x64.Password;
+ var patchBNet = Patches.Windows.x64.BNet;
+ var patternBNet = Patterns.Windows.x64.BNet;
+ var patchPortal = Patches.Windows.x64.Portal;
+ var patternPortal = Patterns.Windows.x64.Portal;
+ var patchConnect = Patches.Windows.x64.Connect;
+ var patternConnect = Patterns.Windows.x64.Connect;
+ var patchSignature = Patches.Windows.x64.Signature;
+ var patternSignature = Patterns.Windows.x64.Signature;
+ var fileName = "";
Console.ForegroundColor = ConsoleColor.White;
Console.Write("Creating patched binaries for ");
@@ -69,54 +64,51 @@ namespace Connection_Patcher
{
case BinaryTypes.Pe32:
Console.WriteLine("Win32 client...");
- modulePath = commonAppData + "/Blizzard Entertainment/Battle.net/Cache/";
- moduleFile = "8f52906a2c85b416a595702251570f96d3522f39237603115f2f1ab24962043c.auth";
+ patchBNet = Patches.Windows.x86.BNet;
+ patternBNet = Patterns.Windows.x86.BNet;
+ patchConnect = Patches.Windows.x86.Connect;
+ patternConnect = Patterns.Windows.x86.Connect;
+ patchSignature = Patches.Windows.x86.Signature;
+ patternSignature = Patterns.Windows.x86.Signature;
+ fileName = patcher.Binary.Replace(".exe", "") + "_Patched.exe";
+
+ modulePath = commonAppData + "/Blizzard Entertainment/Battle.net/Cache/";
+ moduleFile = "8f52906a2c85b416a595702251570f96d3522f39237603115f2f1ab24962043c.auth";
+ modulePatch = Patches.Windows.x86.Password;
+ modulePattern = Patterns.Windows.x86.Password;
+ break;
+ case BinaryTypes.Pe64:
+ Console.WriteLine("Win64 client...");
+ fileName = patcher.Binary.Replace(".exe", "") + "_Patched.exe";
+
+ modulePath = commonAppData + "/Blizzard Entertainment/Battle.net/Cache/";
+ moduleFile = "0a3afee2cade3a0e8b458c4b4660104cac7fc50e2ca9bef0d708942e77f15c1d.auth";
+ break;
+ case BinaryTypes.Mach32:
+ throw new NotSupportedException("Type: " + patcher.Type + " not supported!");
+ case BinaryTypes.Mach64:
+ Console.WriteLine("Mac client...");
+ patchBNet = Patches.Mac.x64.BNet;
+ patternBNet = Patterns.Mac.x64.BNet;
+ patchConnect = Patterns.Windows.x64.Connect;
+ patternConnect = Patterns.Windows.x64.Connect;
+ patchSignature = Patches.Mac.x64.Signature;
+ patternSignature = Patterns.Mac.x64.Signature;
+ fileName = patcher.Binary + " Patched";
+
+ modulePath = "/Users/Shared/Blizzard/Battle.net/Cache/";
+ moduleFile = "97eeb2e28e9e56ed6a22d09f44e2ff43c93315e006bbad43bafc0defaa6f50ae.auth";
+ modulePatch = Patches.Mac.x64.Password;
+ modulePattern = Patterns.Mac.x64.Password;
break;
- //case BinaryTypes.Pe64:
- // Console.WriteLine("Win64 client...");
- // fileName = patcher.Binary.Replace(".exe", "") + "_Patched.exe";
-
- // modulePath = commonAppData + "/Blizzard Entertainment/Battle.net/Cache/";
- // moduleFile = "0a3afee2cade3a0e8b458c4b4660104cac7fc50e2ca9bef0d708942e77f15c1d.auth";
- // break;
- //case BinaryTypes.Mach32:
- // break;
- //case BinaryTypes.Mach64:
- // Console.WriteLine("Mc64 client...");
- // patchBNet = Patches.Mac.x64.BNet;
- // patternBNet = Patterns.Mac.x64.BNet;
- // patchSend = Patches.Mac.x64.Send;
- // patternSend = Patterns.Mac.x64.Send;
- // patchSignature = Patches.Mac.x64.Signature;
- // patternSignature = Patterns.Mac.x64.Signature;
- // fileName = patcher.Binary + " Patched";
-
- // modulePath = "/Users/Shared/Blizzard/Battle.net/Cache/";
- // moduleFile = "97eeb2e28e9e56ed6a22d09f44e2ff43c93315e006bbad43bafc0defaa6f50ae.auth";
- // modulePatch = Patches.Mac.x64.Password;
- // modulePattern = Patterns.Mac.x64.Password;
- // break;
default:
throw new NotSupportedException("Type: " + patcher.Type + " not supported!");
}
- if (!File.Exists(battleNetFileName + "_backup"))
- {
- File.Copy(battleNetFileName, battleNetFileName + "_backup");
- File.SetAttributes(battleNetFileName + "_backup", File.GetAttributes(battleNetFileName + "_backup") | FileAttributes.ReadOnly);
- }
-
- using (var bnpatcher = new Patcher(battleNetFileName))
- {
- bnpatcher.Patch(patchBNet, null, offsetBNet);
- bnpatcher.Patch(patchSignature, null, offsetSignature);
- bnpatcher.Patch(realmListBnPatch, realmListBnPattern);
- bnpatcher.Finish();
- }
-
- patcher.Patch(patchSend, null, offsetSend);
- patcher.Patch(patchRecv, null, offsetRecv);
- patcher.Patch(realmListPatch, null, realmListoffset);
+ patcher.Patch(patchBNet, patternBNet);
+ patcher.Patch(patchPortal, patternPortal);
+ patcher.Patch(patchConnect, patternConnect);
+ patcher.Patch(patchSignature, patternSignature);
patcher.Binary = fileName;
@@ -139,6 +131,7 @@ namespace Connection_Patcher
Console.ForegroundColor = ConsoleColor.Gray;
Thread.Sleep(5000);
+
Environment.Exit(0);
}