diff --git a/binaries/IPHLPAPI.dll b/binaries/IPHLPAPI.dll index 2eb4041..52e950c 100644 Binary files a/binaries/IPHLPAPI.dll and b/binaries/IPHLPAPI.dll differ diff --git a/binaries/plexmediaserver_crack.so b/binaries/plexmediaserver_crack.so index 087b2c2..6be1cd5 100644 Binary files a/binaries/plexmediaserver_crack.so and b/binaries/plexmediaserver_crack.so differ diff --git a/linux/hook.cpp b/linux/hook.cpp index f2a7437..a23648f 100644 --- a/linux/hook.cpp +++ b/linux/hook.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include "Zydis.h" @@ -56,6 +57,7 @@ std::unordered_map g_features = { "ce8f644e-87ce-4ba5-b165-fadd69778019", "disable_sharing_friendships" }, { "6225c337-cd26-4ff0-b864-6c6dd84c9e0d", "disco-reported-issues" }, { "d865f64a-ca06-472d-ae01-7a444aba6251", "disco-director-cast-crew-updates" }, + { "e9cc7ec1-be5a-4727-af7b-0f107af1a07c", "disco-epg-airings-on-detail-pages" }, { "2131d3dc-56c8-45d0-acec-c4683fd9a027", "discover-genre-browsing" }, { "cb0e4c75-b1cb-43e9-97ea-6b9bc66c717b", "discover-managed-related-vod" }, { "807d9881-a846-40c3-8d54-84fc490b7ba9", "discover-managed-user-test" }, @@ -120,6 +122,7 @@ std::unordered_map g_features = { "2ea0e464-ea4f-4be2-97c1-ce6ed4b377dd", "photos-metadata-edition" }, { "850f3d1e-3f38-44c1-9c0c-e3c9127b8b5a", "photosV6-edit" }, { "3a2b0cb6-1519-4431-98e2-823c248c70eb", "photosV6-tv-albums" }, + { "068f4adf-43e5-4cc6-b5a1-1243e1be4c53", "playback-speed" }, { "02da2909-ddfd-46be-9e42-65008a79fc05", "played_badges" }, { "9aea4ca5-2095-4619-9339-88c1e662fde6", "pms_health" }, { "222020fb-1504-492d-af33-a0b80a49558a", "premium-dashboard" }, @@ -160,6 +163,7 @@ std::unordered_map g_features = { "9b5a4bea-3bbe-45d2-b226-00a6ef4d8e65", "tvod" }, { "5d80b92d-4ecf-4b0b-935f-5efc907bb2c1", "tvod_playback" }, { "362c5ba7-41e8-400d-8354-18d53868e2d3", "tvod-rentals" }, + { "e25d0e25-109e-4d6d-9a54-db0931af31c3", "tvod-wtw" }, { "06d14b9e-2af8-4c2b-a4a1-ea9d5c515824", "two-factor-authentication" }, { "20824f5c-6dd9-4655-9970-e7701a73c02a", "two-factor-authentication-clients" }, { "d14556be-ae6d-4407-89d0-b83953f4789a", "type-first" }, @@ -173,6 +177,7 @@ std::unordered_map g_features = { "1b870b8e-f1a7-497c-80b2-857d45f3123f", "vod-schema" }, { "65faa2d0-f57e-4c63-a6b6-f1baa48951b1", "watch-together-20200520" }, { "f83450e2-759a-4de4-8b31-e4a163896d43", "watch-together-invite" }, + { "236de47b-a757-4ed7-9003-507b296057b5", "watched-badges-v3" }, { "f0c452ce-11e7-465f-be04-5fb0bf4bec48", "watchlist" }, { "edd6039a-137c-4ace-b5d5-4e111ce9690b", "watchlist-source" }, { "f0f40559-a43a-4b8f-85ef-bdb1de1a912a", "watchlist-rss" }, @@ -212,8 +217,10 @@ std::unordered_map g_features = { "a6f3f9b3-c10c-4b94-ad59-755e30ac6c90", "detect-commercials" }, }; +std::bitset<704>* g_feature_flags; auto _is_feature_available = reinterpret_cast(0); auto _map_find = reinterpret_cast(0); +auto _bitset_init = reinterpret_cast(0); std::optional> get_dottext_info() { @@ -373,6 +380,14 @@ uint64_t* hook_map_find(uintptr_t* rcx, const char** str) return _map_find(rcx, str); } +uint64_t hook_bitset_init(uintptr_t rcx) +{ + auto ret = _bitset_init(rcx); + g_feature_flags->set(); + + return ret; +} + void hook() { auto info = get_dottext_info(); @@ -385,6 +400,24 @@ void hook() const auto start = std::get<0>(info.value()); const auto end = std::get<1>(info.value()); + // Features are now enabled in boost::atomic as of 2024/08/13 PMS BETA + if(const auto bitset = sig_scan(start, end, "48 8D 0D ? ? ? ? 48 8B 94 05 90 FE FF FF"); bitset) + { + const uintptr_t addr = bitset.value() + 7 + *reinterpret_cast(bitset.value() + 3); + g_feature_flags = reinterpret_cast*>(addr + sizeof(uintptr_t)); + + if(const auto bitset_init = sig_scan(start, end, "55 48 89 E5 41 57 41 56 41 55 41 54 53 48 81 EC ? ? 00 00 49 89 FE 48 8D 9D ? ? ? ? 48 89 DF E8 ? ? ? ? 48 8B 1B 48 85 DB"); bitset_init) + { + if(auto trampoline = create_hook(bitset_init.value(), reinterpret_cast(hook_bitset_init)); trampoline) + { + _bitset_init = reinterpret_cast(trampoline.value()); + + // No reason to hook the rest + return; + } + } + } + if(const auto is_feature_available_ref = sig_scan(start, end, "E8 ? ? ? ? 86 43"); is_feature_available_ref) { const auto is_feature_available = follow_call_rel32(is_feature_available_ref.value()); diff --git a/linux/hook.hpp b/linux/hook.hpp index fdda8eb..7196a41 100644 --- a/linux/hook.hpp +++ b/linux/hook.hpp @@ -11,4 +11,5 @@ std::optional sig_scan(const uintptr_t start, const uintptr_t end, st uintptr_t follow_call_rel32(const uintptr_t address); uint64_t hook_is_feature_available(uintptr_t rcx, const char** guid); uint64_t* hook_map_find(uintptr_t* rcx, const char** str); +uint64_t hook_bitset_init(uintptr_t rcx); void hook(); diff --git a/windows/hook.cpp b/windows/hook.cpp index dbf78b0..e3da2ac 100644 --- a/windows/hook.cpp +++ b/windows/hook.cpp @@ -16,6 +16,7 @@ #include #include #endif +#include std::unordered_map g_features = { @@ -63,6 +64,7 @@ std::unordered_map g_features = { "ce8f644e-87ce-4ba5-b165-fadd69778019", "disable_sharing_friendships" }, { "6225c337-cd26-4ff0-b864-6c6dd84c9e0d", "disco-reported-issues" }, { "d865f64a-ca06-472d-ae01-7a444aba6251", "disco-director-cast-crew-updates" }, + { "e9cc7ec1-be5a-4727-af7b-0f107af1a07c", "disco-epg-airings-on-detail-pages" }, { "2131d3dc-56c8-45d0-acec-c4683fd9a027", "discover-genre-browsing" }, { "cb0e4c75-b1cb-43e9-97ea-6b9bc66c717b", "discover-managed-related-vod" }, { "807d9881-a846-40c3-8d54-84fc490b7ba9", "discover-managed-user-test" }, @@ -127,6 +129,7 @@ std::unordered_map g_features = { "2ea0e464-ea4f-4be2-97c1-ce6ed4b377dd", "photos-metadata-edition" }, { "850f3d1e-3f38-44c1-9c0c-e3c9127b8b5a", "photosV6-edit" }, { "3a2b0cb6-1519-4431-98e2-823c248c70eb", "photosV6-tv-albums" }, + { "068f4adf-43e5-4cc6-b5a1-1243e1be4c53", "playback-speed" }, { "02da2909-ddfd-46be-9e42-65008a79fc05", "played_badges" }, { "9aea4ca5-2095-4619-9339-88c1e662fde6", "pms_health" }, { "222020fb-1504-492d-af33-a0b80a49558a", "premium-dashboard" }, @@ -167,6 +170,7 @@ std::unordered_map g_features = { "9b5a4bea-3bbe-45d2-b226-00a6ef4d8e65", "tvod" }, { "5d80b92d-4ecf-4b0b-935f-5efc907bb2c1", "tvod_playback" }, { "362c5ba7-41e8-400d-8354-18d53868e2d3", "tvod-rentals" }, + { "e25d0e25-109e-4d6d-9a54-db0931af31c3", "tvod-wtw" }, { "06d14b9e-2af8-4c2b-a4a1-ea9d5c515824", "two-factor-authentication" }, { "20824f5c-6dd9-4655-9970-e7701a73c02a", "two-factor-authentication-clients" }, { "d14556be-ae6d-4407-89d0-b83953f4789a", "type-first" }, @@ -180,6 +184,7 @@ std::unordered_map g_features = { "1b870b8e-f1a7-497c-80b2-857d45f3123f", "vod-schema" }, { "65faa2d0-f57e-4c63-a6b6-f1baa48951b1", "watch-together-20200520" }, { "f83450e2-759a-4de4-8b31-e4a163896d43", "watch-together-invite" }, + { "236de47b-a757-4ed7-9003-507b296057b5", "watched-badges-v3" }, { "f0c452ce-11e7-465f-be04-5fb0bf4bec48", "watchlist" }, { "edd6039a-137c-4ace-b5d5-4e111ce9690b", "watchlist-source" }, { "f0f40559-a43a-4b8f-85ef-bdb1de1a912a", "watchlist-rss" }, @@ -242,9 +247,12 @@ std::unordered_set g_ignored_guids "a548af72-b804-4d05-8569-52785952d31d", // Unknown, used in LibraryRequestHandler }; +std::bitset<416>* g_feature_flags; + SafetyHookInline _is_feature_available{}; SafetyHookInline _map_find{}; SafetyHookInline _feature_manager_init{}; +SafetyHookInline _bitset_init{}; auto _feature_manager = reinterpret_cast(0); uintptr_t get_current_process_handle() @@ -392,6 +400,16 @@ uint64_t* hook_map_find(uintptr_t* rcx, uintptr_t rdx, const char** str) return _map_find.call(rcx, rdx, str); } +void hook_bitset_init(uintptr_t rcx, uintptr_t rdx) +{ + _bitset_init.call(rcx, rdx); + g_feature_flags->set(); + +#if _DEBUG + std::println("[INFO] [plexmediaserver_crack] Forced feature flags on.", reinterpret_cast(g_feature_flags)); +#endif +} + FeatureManager* hook_feature_manager_init(FeatureManager* rcx) { return _feature_manager = _feature_manager_init.call(rcx); @@ -417,6 +435,19 @@ void hook() const auto start = std::get<0>(info.value()); const auto end = std::get<1>(info.value()); + const auto bitset = sig_scan(start, end, "8B 84 24 ? ? 00 00 87 05 ? ? ? ? 8B"); + const auto bitset_init = sig_scan(start, end, "48 89 5C 24 18 48 89 74 24 20 57 41 54 41 55 41 56 41 57 48 81 EC 90 02 00 00 48 8B 05 ?? ?? ?? ?? 48 33 C4 48 89 84 24 88"); + + // Features are now enabled in std::atomic as of 2024/08/13 PMS BETA + if(bitset && bitset_init) + { + const uintptr_t addr = bitset.value() + 6 + *reinterpret_cast(bitset.value() + 9); + g_feature_flags = reinterpret_cast*>(addr + sizeof(uintptr_t)); + _bitset_init = safetyhook::create_inline(reinterpret_cast(bitset_init.value()), reinterpret_cast(hook_bitset_init)); + + return; + } + const auto is_feature_available = sig_scan(start, end, "41 54 41 56 41 57 48 83 EC 20 4C 8B F9 4C 8B F2"); const auto map_find = sig_scan(start, end, "48 8B C4 55 41 55"); const auto feature_manager_init = sig_scan(start, end, "48 89 5C 24 10 48 89 74 24 18 48 89 7C 24 20 55 41 54 41 55 41 56 41 57 48 8D AC 24 B0 EB"); @@ -425,7 +456,7 @@ void hook() if((!map_find && !is_feature_available) || !feature_manager_init || !feature_map_offset) { #if _DEBUG - std::println("[ERR] [plexmediaserver_crack] Couldn't find either is_feature_enabled or std::map>::find, FeatureManaget::Init, or the feature map offset; aborting."); + std::println("[ERR] [plexmediaserver_crack] Couldn't find either is_feature_enabled or std::map>::find, FeatureManager::Init, or the feature map offset; aborting."); #endif return; diff --git a/windows/hook.hpp b/windows/hook.hpp index 638cac1..27d120c 100644 --- a/windows/hook.hpp +++ b/windows/hook.hpp @@ -29,5 +29,6 @@ std::optional> get_section_info(std::string_vie std::optional sig_scan(const uintptr_t start, const uintptr_t end, std::string_view pattern); uint64_t hook_is_feature_available(uintptr_t rcx, const char** guid); uint64_t* hook_map_find(uintptr_t* rcx, uintptr_t rdx, const char** str); +void hook_bitset_init(uintptr_t rcx, uintptr_t rdx); FeatureManager* hook_feature_manager_init(FeatureManager* rcx); void hook();