diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-10-08 11:15:53 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-10-08 11:15:53 +0200 |
commit | 6d07f55c0077c1a41956bbfb10e0fcbc9a3c913c (patch) | |
tree | 9fe1a8a122f0a7bf46d0f7c505aceec89e7e0f42 | |
parent | 513b2768dc1508ca4953bd1a211c732b241a9097 (diff) |
Tools/Patcher: Changed -launcherlogin patch for mac
-rw-r--r-- | src/tools/connection_patcher/Patches/Common.hpp | 15 | ||||
-rw-r--r-- | src/tools/connection_patcher/Patches/Mac.hpp | 9 | ||||
-rw-r--r-- | src/tools/connection_patcher/Patches/Windows.hpp | 16 | ||||
-rw-r--r-- | src/tools/connection_patcher/Patterns/Common.hpp | 15 | ||||
-rw-r--r-- | src/tools/connection_patcher/Patterns/Mac.hpp | 9 | ||||
-rw-r--r-- | src/tools/connection_patcher/Patterns/Windows.hpp | 16 | ||||
-rw-r--r-- | src/tools/connection_patcher/Program.cpp | 2 |
7 files changed, 49 insertions, 33 deletions
diff --git a/src/tools/connection_patcher/Patches/Common.hpp b/src/tools/connection_patcher/Patches/Common.hpp index 5bf6464249a..3a8bb50eb84 100644 --- a/src/tools/connection_patcher/Patches/Common.hpp +++ b/src/tools/connection_patcher/Patches/Common.hpp @@ -27,8 +27,8 @@ namespace Connection_Patcher { struct Common { - static const std::vector<unsigned char> Portal() { return { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; } - static const std::vector<unsigned char> Modulus() + static std::vector<unsigned char> Portal() { return { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; } + static std::vector<unsigned char> Modulus() { return { @@ -50,9 +50,9 @@ namespace Connection_Patcher 0xF0, 0xB8, 0x32, 0xCB, 0x5B, 0x66, 0xCE, 0x51, 0x54, 0xB4, 0xC3, 0xD3, 0xD4, 0xDC, 0xB3, 0xEE }; } - static const std::string VersionsFile() { return "trinity6.github.io/%s/%s/build/versi"; }; - static const std::vector<unsigned char> CertFileName() { return{ 't', 'c', '_', 'b', 'u', 'n', 'd', 'l', 'e', '.', 't', 'x', 't', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; } - static const std::string CertificateBundle() + static std::string VersionsFile() { return "trinity6.github.io/%s/%s/build/versi"; }; + static std::vector<unsigned char> CertFileName() { return{ 't', 'c', '_', 'b', 'u', 'n', 'd', 'l', 'e', '.', 't', 'x', 't', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; } + static std::string CertificateBundle() { return R"({ @@ -68,11 +68,6 @@ R"({ ] }NGISerting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature_inserting_dummy_signature)"; } - static std::vector<unsigned char> LauncherLoginParametersLocation() - { - char const path[] = R"(Software\TrinityCore Developers\Battle.net\Launch Options\)"; - return std::vector<unsigned char>(std::begin(path), std::end(path)); - } }; } } diff --git a/src/tools/connection_patcher/Patches/Mac.hpp b/src/tools/connection_patcher/Patches/Mac.hpp index a9311019abd..16fadd51f47 100644 --- a/src/tools/connection_patcher/Patches/Mac.hpp +++ b/src/tools/connection_patcher/Patches/Mac.hpp @@ -29,8 +29,13 @@ namespace Connection_Patcher { struct x64 { - static const std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x48, 0x8D, 0x55, 0xDC, 0x31, 0xDB, 0xB1, 0x01 }; } - static const std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x45, 0x84, 0xFF, 0xB0, 0x01, 0xEB, 0x03, 0x44, 0x89 }; } + static std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x48, 0x8D, 0x55, 0xDC, 0x31, 0xDB, 0xB1, 0x01 }; } + static std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x45, 0x84, 0xFF, 0xB0, 0x01, 0xEB, 0x03, 0x44, 0x89 }; } + static std::vector<unsigned char> LauncherLoginParametersLocation() + { + char const path[] = "org.trnity"; // not a typo, length must match original + return std::vector<unsigned char>(std::begin(path), std::end(path)); + } }; }; } diff --git a/src/tools/connection_patcher/Patches/Windows.hpp b/src/tools/connection_patcher/Patches/Windows.hpp index 0ddd254585a..1e873e5521c 100644 --- a/src/tools/connection_patcher/Patches/Windows.hpp +++ b/src/tools/connection_patcher/Patches/Windows.hpp @@ -27,16 +27,24 @@ namespace Connection_Patcher { namespace Windows { + static std::vector<unsigned char> LauncherLoginParametersLocation() + { + char const path[] = R"(Software\TrinityCore Developers\Battle.net\Launch Options\)"; + return std::vector<unsigned char>(std::begin(path), std::end(path)); + } + struct x86 { - static const std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x6A, 0x01 }; } - static const std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x59, 0x59, 0x84, 0xC0, 0xEB }; } + static std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x6A, 0x01 }; } + static std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x59, 0x59, 0x84, 0xC0, 0xEB }; } + static std::vector<unsigned char> LauncherLoginParametersLocation() { return ::Connection_Patcher::Patches::Windows::LauncherLoginParametersLocation(); } }; struct x64 { - static const std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x41, 0xB1, 0x01 }; } - static const std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0xEB }; } + static std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x41, 0xB1, 0x01 }; } + static std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0xEB }; } + static std::vector<unsigned char> LauncherLoginParametersLocation() { return ::Connection_Patcher::Patches::Windows::LauncherLoginParametersLocation(); } }; }; } diff --git a/src/tools/connection_patcher/Patterns/Common.hpp b/src/tools/connection_patcher/Patterns/Common.hpp index 6144a01f642..c46a8f9fc5f 100644 --- a/src/tools/connection_patcher/Patterns/Common.hpp +++ b/src/tools/connection_patcher/Patterns/Common.hpp @@ -27,16 +27,11 @@ namespace Connection_Patcher { struct Common { - static const std::vector<unsigned char> Portal() { return { '.', 'a', 'c', 't', 'u', 'a' , 'l', '.', 'b', 'a', 't', 't', 'l', 'e', '.', 'n', 'e', 't', 0x00 }; } - static const std::vector<unsigned char> Modulus() { return { 0x91, 0xD5, 0x9B, 0xB7, 0xD4, 0xE1, 0x83, 0xA5 }; } - static const std::vector<unsigned char> BinaryVersion() { return{ 0x3C, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3E }; } - static const std::vector<unsigned char> VersionsFile() { return { '%', 's', '.', 'p', 'a', 't', 'c', 'h', '.', 'b', 'a', 't', 't', 'l', 'e', '.', 'n', 'e', 't', ':', '1', '1', '1', '9', '/', '%', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's' }; } - static const std::vector<unsigned char> CertFileName() { return { 'c', 'a', '_', 'b', 'u', 'n', 'd', 'l', 'e', '.', 't', 'x', 't', '.', 's', 'i', 'g', 'n', 'e', 'd', 0x00 }; } - static const std::vector<unsigned char> LauncherLoginParametersLocation() - { - char const path[] = R"(Software\Blizzard Entertainment\Battle.net\Launch Options\)"; - return std::vector<unsigned char>(std::begin(path), std::end(path)); - } + static std::vector<unsigned char> Portal() { return { '.', 'a', 'c', 't', 'u', 'a' , 'l', '.', 'b', 'a', 't', 't', 'l', 'e', '.', 'n', 'e', 't', 0x00 }; } + static std::vector<unsigned char> Modulus() { return { 0x91, 0xD5, 0x9B, 0xB7, 0xD4, 0xE1, 0x83, 0xA5 }; } + static std::vector<unsigned char> BinaryVersion() { return{ 0x3C, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3E }; } + static std::vector<unsigned char> VersionsFile() { return { '%', 's', '.', 'p', 'a', 't', 'c', 'h', '.', 'b', 'a', 't', 't', 'l', 'e', '.', 'n', 'e', 't', ':', '1', '1', '1', '9', '/', '%', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's' }; } + static std::vector<unsigned char> CertFileName() { return { 'c', 'a', '_', 'b', 'u', 'n', 'd', 'l', 'e', '.', 't', 'x', 't', '.', 's', 'i', 'g', 'n', 'e', 'd', 0x00 }; } }; } } diff --git a/src/tools/connection_patcher/Patterns/Mac.hpp b/src/tools/connection_patcher/Patterns/Mac.hpp index 1b853089f97..e2d2eaa74f7 100644 --- a/src/tools/connection_patcher/Patterns/Mac.hpp +++ b/src/tools/connection_patcher/Patterns/Mac.hpp @@ -29,8 +29,13 @@ namespace Connection_Patcher { struct x64 { - static const std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x48, 0x8D, 0x55, 0xDC, 0x31, 0xDB, 0x31, 0xC9 }; } - static const std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x45, 0x84, 0xFF, 0xB0, 0x01, 0x75, 0x03, 0x44, 0x89 }; } + static std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x48, 0x8D, 0x55, 0xDC, 0x31, 0xDB, 0x31, 0xC9 }; } + static std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x45, 0x84, 0xFF, 0xB0, 0x01, 0x75, 0x03, 0x44, 0x89 }; } + static std::vector<unsigned char> LauncherLoginParametersLocation() + { + char const path[] = "net.battle"; + return std::vector<unsigned char>(std::begin(path), std::end(path)); + } }; }; } diff --git a/src/tools/connection_patcher/Patterns/Windows.hpp b/src/tools/connection_patcher/Patterns/Windows.hpp index 148914e134c..d97f92b2a88 100644 --- a/src/tools/connection_patcher/Patterns/Windows.hpp +++ b/src/tools/connection_patcher/Patterns/Windows.hpp @@ -27,16 +27,24 @@ namespace Connection_Patcher { namespace Windows { + static std::vector<unsigned char> LauncherLoginParametersLocation() + { + char const path[] = R"(Software\Blizzard Entertainment\Battle.net\Launch Options\)"; + return std::vector<unsigned char>(std::begin(path), std::end(path)); + } + struct x86 { - static const std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x6A, 0x00, 0x50, 0x8D, 0x45, 0xF8, 0x50, 0x68 }; } - static const std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x59, 0x59, 0x84, 0xC0, 0x75, 0x08, 0x46, 0x83, 0xFE, 0x02 }; } + static std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x6A, 0x00, 0x50, 0x8D, 0x45, 0xF8, 0x50, 0x68 }; } + static std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x59, 0x59, 0x84, 0xC0, 0x75, 0x08, 0x46, 0x83, 0xFE, 0x02 }; } + static std::vector<unsigned char> LauncherLoginParametersLocation() { return ::Connection_Patcher::Patterns::Windows::LauncherLoginParametersLocation(); } }; struct x64 { - static const std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x45, 0x33, 0xC9, 0x48, 0x89, 0x9C, 0x24, 0x90, 0x02 }; } - static const std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x75, 0x0B, 0x48, 0xFF, 0xC7, 0x48, 0x83, 0xFF, 0x02 }; } + static std::vector<unsigned char> CertBundleCASCLocalFile() { return{ 0x45, 0x33, 0xC9, 0x48, 0x89, 0x9C, 0x24, 0x90, 0x02 }; } + static std::vector<unsigned char> CertBundleSignatureCheck() { return{ 0x75, 0x0B, 0x48, 0xFF, 0xC7, 0x48, 0x83, 0xFF, 0x02 }; } + static std::vector<unsigned char> LauncherLoginParametersLocation() { return ::Connection_Patcher::Patterns::Windows::LauncherLoginParametersLocation(); } }; }; } diff --git a/src/tools/connection_patcher/Program.cpp b/src/tools/connection_patcher/Program.cpp index a5c22cdfc24..7f5342be22e 100644 --- a/src/tools/connection_patcher/Program.cpp +++ b/src/tools/connection_patcher/Program.cpp @@ -81,7 +81,7 @@ namespace Connection_Patcher std::cout << "patching launcher login parameters location\n"; // change registry/CFPreferences path - patcher->Patch(Patches::Common::LauncherLoginParametersLocation(), Patterns::Common::LauncherLoginParametersLocation()); + patcher->Patch(PATCH::LauncherLoginParametersLocation(), PATTERN::LauncherLoginParametersLocation()); patcher->Finish(output); |