diff --git a/.gitignore b/.gitignore index 88dbff1..af57925 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,43 @@ +# Visual Studio .vs/ +[Dd]ebug/ +[Rr]elease/ +x64/ +x86/ +[Aa]rm/ +[Aa]rm64/ +*.pdb +*.obj +*.exe +*.dll +*.iobj +*.ipdb +*.log +*.tlog +*.lastbuildstate +*.recipe +*.idb +*.cache +*.vsidx +*.VC.db + +# CLion / CMake +cmake-build-*/ +CMakeFiles/ +CMakeCache.txt +build/ +.cmake/ + +# Idea +.idea/ + +# NuGet +packages/ +*.nuget.props +*.nuget.targets +project.assets.json +project.nuget.cache + +# Submodules +GUI/ +RLIdentity/RLidentity/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..075f909 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "GUI"] + path = GUI + url = https://git.rlidentity.me/bits/RLidentity.git + branch = GUI diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..b071bde --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.10) +project(RLIdentityDLL) + +set(CMAKE_CXX_STANDARD 14) + +# Set output directory to x64/Release for consistency with VS project +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +add_library(RLIdentity SHARED + RLIdentity.cpp) + +# Link MinHook +target_link_libraries(RLIdentity PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libMinHook.x64.lib) + +# Add definitions if needed +target_compile_definitions(RLIdentity PRIVATE _USRDLL RLIDENTITYDLL_EXPORTS) diff --git a/RLIdentity.cpp b/RLIdentity.cpp index 8543172..e7f265e 100644 --- a/RLIdentity.cpp +++ b/RLIdentity.cpp @@ -1,115 +1,155 @@ -#include +// RLIdentity.cpp +// 1:1 Proven logic with ALL-SAFE JSON parsing (no dynamic allocations). + +#include #include #include #include +#include +#include -#pragma comment(lib, "MinHook.x64.lib") +#pragma comment(lib, "libMinHook.x64.lib") #pragma comment(lib, "shell32.lib") static char g_SpoofedName[256] = "Player"; -static char g_ConfigPath[MAX_PATH] = { 0 }; +static void* g_LocalUserId = nullptr; -typedef int(__stdcall* EOS_Func_t)(void*, void*, void**); -EOS_Func_t oEOS_UserInfo_CopyUserInfo = nullptr; - -void LoadConfig() { - // Get AppData path - char appDataPath[MAX_PATH]; - SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, appDataPath); - - sprintf_s(g_ConfigPath, "%s\\RLidentity\\config.txt", appDataPath); - - FILE* fp = NULL; - fopen_s(&fp, g_ConfigPath, "r"); - if (fp) { - char line[256] = { 0 }; - if (fgets(line, sizeof(line), fp)) { - line[strcspn(line, "\r\n")] = 0; - - if (strlen(line) > 0 && strlen(line) < 50) { - strcpy_s(g_SpoofedName, sizeof(g_SpoofedName), line); - } +void ClearLog() { + char path[MAX_PATH]; + if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, path))) { + char logFile[MAX_PATH]; + sprintf_s(logFile, "%s\\RLidentity\\log.txt", path); + FILE* f = NULL; + fopen_s(&f, logFile, "w"); + if (f) { + fprintf(f, "[RLidentity] --- New Session Started ---\n"); + fclose(f); } - fclose(fp); } } -int __stdcall hkEOS_UserInfo_CopyUserInfo(void* p1, void* p2, void** p3) { - int result = oEOS_UserInfo_CopyUserInfo(p1, p2, p3); +void LoadConfig() { + char path[MAX_PATH]; + if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_APPDATA, NULL, 0, path))) { + char jPath[MAX_PATH]; + sprintf_s(jPath, "%s\\RLidentity\\config.json", path); + + FILE* fp = NULL; + fopen_s(&fp, jPath, "r"); + if (fp) { + char buffer[1024] = { 0 }; + size_t bytes = fread(buffer, 1, sizeof(buffer)-1, fp); + fclose(fp); - if (result == 0 && p3 && *p3) { - char** structPtr = (char**)*p3; - - __try { - if (structPtr[3] && !IsBadReadPtr(structPtr[3], 6)) { - if (strstr(structPtr[3], "sfdb.") != nullptr) { - structPtr[3] = g_SpoofedName; + if (bytes > 0) { + const char* key = "\"spoofedName\""; + char* pos = strstr(buffer, key); + if (pos) { + char* colon = strchr(pos, ':'); + if (colon) { + char* start = strchr(colon, '\"'); + if (start) { + char* end = strchr(start + 1, '\"'); + if (end) { + size_t len = end - (start + 1); + if (len > 0 && len < 255) { + memcpy(g_SpoofedName, start + 1, len); + g_SpoofedName[len] = '\0'; + return; + } + } + } + } } } } - __except (EXCEPTION_EXECUTE_HANDLER) { + + char tPath[MAX_PATH]; + sprintf_s(tPath, "%s\\RLidentity\\config.txt", path); + fopen_s(&fp, tPath, "r"); + if (fp) { + char line[256] = { 0 }; + if (fgets(line, sizeof(line), fp)) { + line[strcspn(line, "\r\n")] = 0; + if (strlen(line) > 0) strcpy_s(g_SpoofedName, 256, line); + } + fclose(fp); } } - - return result; } -DWORD WINAPI ConfigReloadThread(LPVOID lpParam) { - while (true) { - Sleep(2000); - LoadConfig(); +typedef int(__stdcall* CopyUserInfo_t)(void*, void*, void**); +static CopyUserInfo_t oEOS_UserInfo_CopyUserInfo = nullptr; + +typedef int(__stdcall* ToString_t)(void*, char*, int32_t*); +static ToString_t oEOS_EpicAccountId_ToString = nullptr; + +int __stdcall hkEOS_EpicAccountId_ToString(void* handle, char* buffer, int32_t* length) { + if (handle && g_LocalUserId && handle == g_LocalUserId) { + size_t spoofLen = strlen(g_SpoofedName); + if (buffer && length && *length > (int32_t)spoofLen) { + strcpy_s(buffer, *length, g_SpoofedName); + *length = (int32_t)spoofLen + 1; + return 0; // EOS_Success + } } - return 0; + return oEOS_EpicAccountId_ToString(handle, buffer, length); } -BOOL InstallHooks() { - LoadConfig(); - - if (MH_Initialize() != MH_OK) { - return FALSE; +int __stdcall hkEOS_UserInfo_CopyUserInfo(void* p1, void* p2, void** p3) { + if (p2) { + void** options = (void**)p2; + g_LocalUserId = options[1]; // Capture LocalUserId handle } - HMODULE hEOSSDK = NULL; - for (int i = 0; i < 50; i++) { - hEOSSDK = GetModuleHandleA("EOSSDK-Win64-Shipping.dll"); - if (hEOSSDK) break; - Sleep(100); + int res = oEOS_UserInfo_CopyUserInfo(p1, p2, p3); + + if (res == 0 && p2 && p3 && *p3) { + void** options = (void**)p2; + if (options[1] == options[2]) { // If targeting our own info + char** s = (char**)*p3; + __try { + // Offset 24: DisplayName, Offset 40: Nickname + if (s[3]) s[3] = g_SpoofedName; + if (s[5]) s[5] = g_SpoofedName; + } __except (EXCEPTION_EXECUTE_HANDLER) {} + } } - - if (!hEOSSDK) { - return FALSE; - } - - LPVOID pFunc = (LPVOID)GetProcAddress(hEOSSDK, "EOS_UserInfo_CopyUserInfo"); - if (!pFunc) { - return FALSE; - } - - if (MH_CreateHook(pFunc, &hkEOS_UserInfo_CopyUserInfo, (LPVOID*)&oEOS_UserInfo_CopyUserInfo) != MH_OK) { - return FALSE; - } - - if (MH_EnableHook(pFunc) != MH_OK) { - return FALSE; - } - - CreateThread(NULL, 0, ConfigReloadThread, NULL, 0, NULL); - - return TRUE; + return res; } DWORD WINAPI HookThread(LPVOID lpParam) { - Sleep(3000); - InstallHooks(); + ClearLog(); + LoadConfig(); + + if (MH_Initialize() == MH_OK) { + HMODULE h = NULL; + for (int i = 0; i < 100; i++) { + h = GetModuleHandleA("EOSSDK-Win64-Shipping.dll"); + if (h) break; + Sleep(100); + } + if (h) { + LPVOID f1 = (LPVOID)GetProcAddress(h, "EOS_UserInfo_CopyUserInfo"); + if (f1 && MH_CreateHook(f1, (LPVOID)&hkEOS_UserInfo_CopyUserInfo, (LPVOID*)&oEOS_UserInfo_CopyUserInfo) == MH_OK) { + MH_EnableHook(f1); + } + + LPVOID f2 = (LPVOID)GetProcAddress(h, "EOS_EpicAccountId_ToString"); + if (f2 && MH_CreateHook(f2, (LPVOID)&hkEOS_EpicAccountId_ToString, (LPVOID*)&oEOS_EpicAccountId_ToString) == MH_OK) { + MH_EnableHook(f2); + } + } + } return 0; } -BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { - if (dwReason == DLL_PROCESS_ATTACH) { - DisableThreadLibraryCalls(hModule); +BOOL APIENTRY DllMain(HMODULE h, DWORD r, LPVOID) { + if (r == DLL_PROCESS_ATTACH) { + DisableThreadLibraryCalls(h); CreateThread(NULL, 0, HookThread, NULL, 0, NULL); } - else if (dwReason == DLL_PROCESS_DETACH) { + else if (r == DLL_PROCESS_DETACH) { MH_DisableHook(MH_ALL_HOOKS); MH_Uninitialize(); } diff --git a/RLIdentity.sln b/RLIdentity.sln index 85e209e..9785421 100644 --- a/RLIdentity.sln +++ b/RLIdentity.sln @@ -1,10 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.14.36414.22 d17.14 +VisualStudioVersion = 17.14.36414.22 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RLIdentity", "RLIdentity.vcxproj", "{71E79F3E-69F5-426D-8FBD-82CD278F585F}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "injector", "injector.vcxproj", "{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -21,6 +23,14 @@ Global {71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x64.Build.0 = Release|x64 {71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x86.ActiveCfg = Release|Win32 {71E79F3E-69F5-426D-8FBD-82CD278F585F}.Release|x86.Build.0 = Release|Win32 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x64.ActiveCfg = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x64.Build.0 = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x86.ActiveCfg = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Debug|x86.Build.0 = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x64.ActiveCfg = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x64.Build.0 = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x86.ActiveCfg = Release|x64 + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}.Release|x86.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/RLIdentity/x64/Debug/RLIdentity.dll.recipe b/RLIdentity/x64/Debug/RLIdentity.dll.recipe deleted file mode 100644 index 3ba1b97..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.dll.recipe +++ /dev/null @@ -1,11 +0,0 @@ - - - - - E:\projects\Rocket League\RLIdentityDLL\x64\Debug\RLIdentity.dll - - - - - - \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.log b/RLIdentity/x64/Debug/RLIdentity.log deleted file mode 100644 index 89a2e6f..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.log +++ /dev/null @@ -1,2 +0,0 @@ - RLIdentity.cpp -LINK : fatal error LNK1104: cannot open file 'MinHook.x64.lib' diff --git a/RLIdentity/x64/Debug/RLIdentity.obj b/RLIdentity/x64/Debug/RLIdentity.obj deleted file mode 100644 index dcef8e6..0000000 Binary files a/RLIdentity/x64/Debug/RLIdentity.obj and /dev/null differ diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/CL.command.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/CL.command.1.tlog deleted file mode 100644 index 19ce9fc..0000000 Binary files a/RLIdentity/x64/Debug/RLIdentity.tlog/CL.command.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/CL.read.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/CL.read.1.tlog deleted file mode 100644 index 190bc49..0000000 Binary files a/RLIdentity/x64/Debug/RLIdentity.tlog/CL.read.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/CL.write.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/CL.write.1.tlog deleted file mode 100644 index 081f575..0000000 Binary files a/RLIdentity/x64/Debug/RLIdentity.tlog/CL.write.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/Cl.items.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/Cl.items.tlog deleted file mode 100644 index 6210021..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/Cl.items.tlog +++ /dev/null @@ -1 +0,0 @@ -E:\projects\Rocket League\RLIdentityDLL\RLIdentity.cpp;E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Debug\RLIdentity.obj diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/RLIdentity.lastbuildstate b/RLIdentity/x64/Debug/RLIdentity.tlog/RLIdentity.lastbuildstate deleted file mode 100644 index abe87f7..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/RLIdentity.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:VcpkgTriplet=x64-windows: -Debug|x64|E:\projects\Rocket League\RLIdentityDLL\| diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/RLIdentity.write.1u.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/RLIdentity.write.1u.tlog deleted file mode 100644 index 4a3d350..0000000 Binary files a/RLIdentity/x64/Debug/RLIdentity.tlog/RLIdentity.write.1u.tlog and /dev/null differ diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.2.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.2.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.2.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.3.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.3.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.3.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.4.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.4.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.read.4.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.write.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.28624.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.command.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.command.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.command.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.read.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.read.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.read.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.secondary.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.secondary.1.tlog deleted file mode 100644 index 77f3e8c..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.secondary.1.tlog +++ /dev/null @@ -1,2 +0,0 @@ -^E:\PROJECTS\ROCKET LEAGUE\RLIDENTITYDLL\RLIDENTITY\X64\DEBUG\RLIDENTITY.OBJ -E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Debug\RLIdentity.ilk diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/link.write.1.tlog b/RLIdentity/x64/Debug/RLIdentity.tlog/link.write.1.tlog deleted file mode 100644 index 46b134b..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.tlog/link.write.1.tlog +++ /dev/null @@ -1 +0,0 @@ -ÿþ \ No newline at end of file diff --git a/RLIdentity/x64/Debug/RLIdentity.tlog/unsuccessfulbuild b/RLIdentity/x64/Debug/RLIdentity.tlog/unsuccessfulbuild deleted file mode 100644 index e69de29..0000000 diff --git a/RLIdentity/x64/Debug/RLIdentity.vcxproj.FileListAbsolute.txt b/RLIdentity/x64/Debug/RLIdentity.vcxproj.FileListAbsolute.txt deleted file mode 100644 index e6efe6e..0000000 --- a/RLIdentity/x64/Debug/RLIdentity.vcxproj.FileListAbsolute.txt +++ /dev/null @@ -1,2 +0,0 @@ -E:\projects\Rocket League\RLIdentityDLL\x64\Debug\minhook.x64d.dll -E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Debug\RLIdenti.F1359A32.Up2Date diff --git a/RLIdentity/x64/Debug/vc143.idb b/RLIdentity/x64/Debug/vc143.idb deleted file mode 100644 index af0136f..0000000 Binary files a/RLIdentity/x64/Debug/vc143.idb and /dev/null differ diff --git a/RLIdentity/x64/Debug/vc143.pdb b/RLIdentity/x64/Debug/vc143.pdb deleted file mode 100644 index aee77a5..0000000 Binary files a/RLIdentity/x64/Debug/vc143.pdb and /dev/null differ diff --git a/RLIdentity/x64/Debug/vcpkg.applocal.log b/RLIdentity/x64/Debug/vcpkg.applocal.log deleted file mode 100644 index b1b2952..0000000 --- a/RLIdentity/x64/Debug/vcpkg.applocal.log +++ /dev/null @@ -1,2 +0,0 @@ - -E:\projects\Rocket League\RLIdentityDLL\x64\Debug\minhook.x64d.dll diff --git a/RLIdentity/x64/Release/RLIdentity.dll.recipe b/RLIdentity/x64/Release/RLIdentity.dll.recipe deleted file mode 100644 index f243656..0000000 --- a/RLIdentity/x64/Release/RLIdentity.dll.recipe +++ /dev/null @@ -1,11 +0,0 @@ - - - - - E:\projects\Rocket League\RLIdentityDLL\x64\Release\RLIdentity.dll - - - - - - \ No newline at end of file diff --git a/RLIdentity/x64/Release/RLIdentity.iobj b/RLIdentity/x64/Release/RLIdentity.iobj deleted file mode 100644 index 34ad6e4..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.iobj and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.ipdb b/RLIdentity/x64/Release/RLIdentity.ipdb deleted file mode 100644 index 13920f1..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.ipdb and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.log b/RLIdentity/x64/Release/RLIdentity.log deleted file mode 100644 index 80835b8..0000000 --- a/RLIdentity/x64/Release/RLIdentity.log +++ /dev/null @@ -1,8 +0,0 @@ - Generating code - 10 of 11 functions (90.9%) were compiled, the rest were copied from previous compilation. - 6 functions were new in current compilation - 0 functions had inline decision re-evaluated but remain unchanged - Finished generating code - RLIdentity.vcxproj -> E:\projects\Rocket League\RLIdentityDLL\x64\Release\RLIdentity.dll - 'pwsh.exe' is not recognized as an internal or external command, - operable program or batch file. diff --git a/RLIdentity/x64/Release/RLIdentity.obj b/RLIdentity/x64/Release/RLIdentity.obj deleted file mode 100644 index 0d8f3dd..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.obj and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/CL.command.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/CL.command.1.tlog deleted file mode 100644 index 6bd3743..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.tlog/CL.command.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/CL.read.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/CL.read.1.tlog deleted file mode 100644 index b9f1ee3..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.tlog/CL.read.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/CL.write.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/CL.write.1.tlog deleted file mode 100644 index 2d8db12..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.tlog/CL.write.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/Cl.items.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/Cl.items.tlog deleted file mode 100644 index 02e6a69..0000000 --- a/RLIdentity/x64/Release/RLIdentity.tlog/Cl.items.tlog +++ /dev/null @@ -1 +0,0 @@ -E:\projects\Rocket League\RLIdentityDLL\RLIdentity.cpp;E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Release\RLIdentity.obj diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/RLIdentity.lastbuildstate b/RLIdentity/x64/Release/RLIdentity.tlog/RLIdentity.lastbuildstate deleted file mode 100644 index c18bcd8..0000000 --- a/RLIdentity/x64/Release/RLIdentity.tlog/RLIdentity.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:VcpkgTriplet=x64-windows-static: -Release|x64|E:\projects\Rocket League\RLIdentityDLL\| diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/link.command.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/link.command.1.tlog deleted file mode 100644 index 300df83..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.tlog/link.command.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/link.read.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/link.read.1.tlog deleted file mode 100644 index fe9495d..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.tlog/link.read.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/link.secondary.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/link.secondary.1.tlog deleted file mode 100644 index add6b58..0000000 --- a/RLIdentity/x64/Release/RLIdentity.tlog/link.secondary.1.tlog +++ /dev/null @@ -1,3 +0,0 @@ -^E:\PROJECTS\ROCKET LEAGUE\RLIDENTITYDLL\RLIDENTITY\X64\RELEASE\RLIDENTITY.OBJ -E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Release\RLIdentity.IPDB -E:\projects\Rocket League\RLIdentityDLL\RLIdentity\x64\Release\RLIdentity.iobj diff --git a/RLIdentity/x64/Release/RLIdentity.tlog/link.write.1.tlog b/RLIdentity/x64/Release/RLIdentity.tlog/link.write.1.tlog deleted file mode 100644 index 791e7a7..0000000 Binary files a/RLIdentity/x64/Release/RLIdentity.tlog/link.write.1.tlog and /dev/null differ diff --git a/RLIdentity/x64/Release/RLNameSpoofer.log b/RLIdentity/x64/Release/RLNameSpoofer.log deleted file mode 100644 index 43cf35f..0000000 --- a/RLIdentity/x64/Release/RLNameSpoofer.log +++ /dev/null @@ -1,8 +0,0 @@ - RLIdentity.cpp - Generating code - Previous IPDB not found, fall back to full compilation. - All 12 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. - Finished generating code - RLNameSpoofer.vcxproj -> E:\projects\Rocket League\RLIdentityDLL\x64\Release\RLIdentity.dll - 'pwsh.exe' is not recognized as an internal or external command, - operable program or batch file. diff --git a/RLIdentity/x64/Release/vc143.pdb b/RLIdentity/x64/Release/vc143.pdb deleted file mode 100644 index 7e5f27f..0000000 Binary files a/RLIdentity/x64/Release/vc143.pdb and /dev/null differ diff --git a/RLIdentity/x64/Release/vcpkg.applocal.log b/RLIdentity/x64/Release/vcpkg.applocal.log deleted file mode 100644 index e02abfc..0000000 --- a/RLIdentity/x64/Release/vcpkg.applocal.log +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dllmain.cpp b/dllmain.cpp deleted file mode 100644 index 1ca0972..0000000 --- a/dllmain.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -#pragma comment(lib, "d3d9.lib") - -BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { - if (dwReason == DLL_PROCESS_ATTACH) { - DisableThreadLibraryCalls(hModule); - - // INSTANT visual feedback - MessageBoxA(NULL, "RLNameSpoofer.dll loaded successfully!", "DLL Injected", MB_OK | MB_ICONINFORMATION); - } - return TRUE; -} \ No newline at end of file diff --git a/injector.cpp b/injector.cpp new file mode 100644 index 0000000..a884315 --- /dev/null +++ b/injector.cpp @@ -0,0 +1,88 @@ +// injector.cpp +// A simple, standalone DLL injector for Rocket League. +// Compile as a x64 Console Application in Visual Studio. + +#include +#include +#include +#include + +// Find the Process ID by name +DWORD GetProcessIdByName(const wchar_t* processName) { + DWORD pid = 0; + HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); + if (hSnapshot != INVALID_HANDLE_VALUE) { + PROCESSENTRY32W pe; + pe.dwSize = sizeof(PROCESSENTRY32W); + if (Process32FirstW(hSnapshot, &pe)) { + do { + if (_wcsicmp(pe.szExeFile, processName) == 0) { + pid = pe.th32ProcessID; + break; + } + } while (Process32NextW(hSnapshot, &pe)); + } + CloseHandle(hSnapshot); + } + return pid; +} + +int wmain(int argc, wchar_t* argv[]) { + if (argc < 3) { + std::wcout << L"Usage: injector.exe " << std::endl; + return 1; + } + + const wchar_t* targetProcess = argv[1]; + const wchar_t* dllPath = argv[2]; + + DWORD pid = GetProcessIdByName(targetProcess); + if (pid == 0) { + std::wcout << L"[-] Failed to find process: " << targetProcess << std::endl; + return 1; + } + + std::wcout << L"[+] Found process " << targetProcess << L" (PID: " << pid << L")" << std::endl; + + HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); + if (hProcess == NULL) { + std::wcout << L"[-] Failed to open process. Error: " << GetLastError() << std::endl; + return 1; + } + + // Allocate memory in target process for the DLL path string + size_t pathLen = (wcslen(dllPath) + 1) * sizeof(wchar_t); + void* remoteMem = VirtualAllocEx(hProcess, NULL, pathLen, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); + if (remoteMem == NULL) { + std::wcout << L"[-] Failed to allocate memory in target process." << std::endl; + CloseHandle(hProcess); + return 1; + } + + // Write the DLL path string into the allocated memory + if (!WriteProcessMemory(hProcess, remoteMem, dllPath, pathLen, NULL)) { + std::wcout << L"[-] Failed to write memory in target process." << std::endl; + VirtualFreeEx(hProcess, remoteMem, 0, MEM_RELEASE); + CloseHandle(hProcess); + return 1; + } + + // Create a remote thread that calls LoadLibraryW with the path to our DLL + HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, (LPTHREAD_START_ROUTINE)LoadLibraryW, remoteMem, 0, NULL); + if (hThread == NULL) { + std::wcout << L"[-] Failed to create remote thread. Error: " << GetLastError() << std::endl; + VirtualFreeEx(hProcess, remoteMem, 0, MEM_RELEASE); + CloseHandle(hProcess); + return 1; + } + + std::wcout << L"[+] DLL injected successfully!" << std::endl; + + // Clean up + WaitForSingleObject(hThread, INFINITE); + VirtualFreeEx(hProcess, remoteMem, 0, MEM_RELEASE); + CloseHandle(hThread); + CloseHandle(hProcess); + + return 0; +} \ No newline at end of file diff --git a/injector.vcxproj b/injector.vcxproj new file mode 100644 index 0000000..6d1b32d --- /dev/null +++ b/injector.vcxproj @@ -0,0 +1,61 @@ + + + + + Release + x64 + + + + 17.0 + Win32Proj + {A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D} + injector + 10.0 + + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + $(SolutionDir)x64\Release\ + $(Platform)\$(Configuration)\ + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + stdcpp17 + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/injector.vcxproj.user b/injector.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/injector.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/x64/Debug/RLIdentity.pdb b/x64/Debug/RLIdentity.pdb deleted file mode 100644 index 0cc9525..0000000 Binary files a/x64/Debug/RLIdentity.pdb and /dev/null differ diff --git a/x64/Debug/minhook.x64d.dll b/x64/Debug/minhook.x64d.dll deleted file mode 100644 index f78f568..0000000 Binary files a/x64/Debug/minhook.x64d.dll and /dev/null differ diff --git a/x64/Release/RLIdentity.dll b/x64/Release/RLIdentity.dll deleted file mode 100644 index 78573ec..0000000 Binary files a/x64/Release/RLIdentity.dll and /dev/null differ diff --git a/x64/Release/RLIdentity.pdb b/x64/Release/RLIdentity.pdb deleted file mode 100644 index 4ab8070..0000000 Binary files a/x64/Release/RLIdentity.pdb and /dev/null differ