mirror of
https://github.com/BugisoftRSG/SCAPI.git
synced 2024-12-22 20:47:25 +08:00
Update offsets
This commit is contained in:
parent
3be878c841
commit
c59829b7a0
@ -1,7 +1,5 @@
|
|||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
set(JSON_MultipleHeaders OFF)
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
json
|
json
|
||||||
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
|
GIT_REPOSITORY https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
|
||||||
|
@ -71,7 +71,7 @@ class CopyJob : command
|
|||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<unsigned char> get_data_len(size_t data_len, bool image) // should be 107684
|
vector<unsigned char> get_data_len(size_t data_len, bool image)
|
||||||
{
|
{
|
||||||
stringstream ss;
|
stringstream ss;
|
||||||
ss << hex << data_len;
|
ss << hex << data_len;
|
||||||
@ -82,7 +82,7 @@ class CopyJob : command
|
|||||||
data_len_hex = "0" + data_len_hex;
|
data_len_hex = "0" + data_len_hex;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<unsigned char> data_len_bytes = HexToBytes(data_len_hex); // should be \x01\xa4\xa4
|
vector<unsigned char> data_len_bytes = HexToBytes(data_len_hex);
|
||||||
|
|
||||||
switch (data_len_bytes.size()) {
|
switch (data_len_bytes.size()) {
|
||||||
case 1:
|
case 1:
|
||||||
|
68
src/main.cpp
68
src/main.cpp
@ -11,36 +11,36 @@
|
|||||||
#include <botan_all.h>
|
#include <botan_all.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
#include <tlhelp32.h>
|
#include <tlhelp32.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
uintptr_t GetModuleBaseAddress(DWORD procId, const char* modName)
|
uintptr_t GetModuleBaseAddress(DWORD procId, const char* modName)
|
||||||
|
{
|
||||||
|
uintptr_t modBaseAddr = 0;
|
||||||
|
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
|
||||||
|
if (hSnap != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
uintptr_t modBaseAddr = 0;
|
MODULEENTRY32 modEntry;
|
||||||
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, procId);
|
modEntry.dwSize = sizeof(modEntry);
|
||||||
if (hSnap != INVALID_HANDLE_VALUE)
|
if (Module32First(hSnap, &modEntry))
|
||||||
{
|
{
|
||||||
MODULEENTRY32 modEntry;
|
do
|
||||||
modEntry.dwSize = sizeof(modEntry);
|
|
||||||
if (Module32First(hSnap, &modEntry))
|
|
||||||
{
|
{
|
||||||
do
|
if (!strcmp(modEntry.szModule, modName))
|
||||||
{
|
{
|
||||||
if (!strcmp(modEntry.szModule, modName))
|
modBaseAddr = (uintptr_t)modEntry.modBaseAddr;
|
||||||
{
|
break;
|
||||||
modBaseAddr = (uintptr_t)modEntry.modBaseAddr;
|
}
|
||||||
break;
|
} while (Module32Next(hSnap, &modEntry));
|
||||||
}
|
|
||||||
} while (Module32Next(hSnap, &modEntry));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
CloseHandle(hSnap);
|
|
||||||
return modBaseAddr;
|
|
||||||
}
|
}
|
||||||
|
CloseHandle(hSnap);
|
||||||
|
return modBaseAddr;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AccountInfo GetAccountInfo()
|
AccountInfo GetAccountInfo()
|
||||||
@ -71,18 +71,18 @@ AccountInfo GetAccountInfo()
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* <Services Count="12">
|
* <Services Count="12">
|
||||||
<S ep="/Accounts.svc/" h="accounts-prod.ros.rockstargames.com" />
|
<S ep="/Accounts.svc/" h="accounts-prod.ros.rockstargames.com" />
|
||||||
<S ep="/Feed.asmx/" h="feed-gta5-prod.ros.rockstargames.com" />
|
<S ep="/Feed.asmx/" h="feed-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/Telemetry.asmx/SubmitCompressed" h="prod.telemetry.ros.rockstargames.com" />
|
<S ep="/Telemetry.asmx/SubmitCompressed" h="prod.telemetry.ros.rockstargames.com" />
|
||||||
<S ep="/Telemetry.asmx/SubmitRealTime" h="prod.telemetry.ros.rockstargames.com" />
|
<S ep="/Telemetry.asmx/SubmitRealTime" h="prod.telemetry.ros.rockstargames.com" />
|
||||||
<S ep="conductor" h="conductor-prod.ros.rockstargames.com" />
|
<S ep="conductor" h="conductor-prod.ros.rockstargames.com" />
|
||||||
<S ep="/ProfileStats.asmx/" h="ps-gta5-prod.ros.rockstargames.com" />
|
<S ep="/ProfileStats.asmx/" h="ps-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/matchmaking.asmx/" h="mm-gta5-prod.ros.rockstargames.com" />
|
<S ep="/matchmaking.asmx/" h="mm-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/ugc.asmx/" h="ugc-gta5-prod.ros.rockstargames.com" />
|
<S ep="/ugc.asmx/" h="ugc-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/Presence.asmx/" h="prs-gta5-prod.ros.rockstargames.com" />
|
<S ep="/Presence.asmx/" h="prs-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/Inbox.asmx/" h="inbox-gta5-prod.ros.rockstargames.com" />
|
<S ep="/Inbox.asmx/" h="inbox-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/Clans.asmx/" h="crews-gta5-prod.ros.rockstargames.com" />
|
<S ep="/Clans.asmx/" h="crews-gta5-prod.ros.rockstargames.com" />
|
||||||
<S ep="/cloudservices/members//GTA5/saves/mpstats" h="cs-gta5-prod.ros.rockstargames.com" />
|
<S ep="/cloudservices/members//GTA5/saves/mpstats" h="cs-gta5-prod.ros.rockstargames.com" />
|
||||||
</Services>
|
</Services>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -102,13 +102,13 @@ int main()
|
|||||||
uintptr_t base_address = GetModuleBaseAddress(pid, "GTA5.exe");
|
uintptr_t base_address = GetModuleBaseAddress(pid, "GTA5.exe");
|
||||||
|
|
||||||
char ticket[208]{};
|
char ticket[208]{};
|
||||||
ReadProcessMemory(phandle, (void*)(base_address + 0x2E7B300), &ticket, 208, 0);
|
ReadProcessMemory(phandle, (void*)(base_address + 0x2E7E380), &ticket, 208, 0);
|
||||||
|
|
||||||
char session_ticket[88]{};
|
char session_ticket[88]{};
|
||||||
ReadProcessMemory(phandle, (void*)(base_address + 0x2E7B300 + 0x200), &session_ticket, 88, 0);
|
ReadProcessMemory(phandle, (void*)(base_address + 0x2E7E380 + 0x200), &session_ticket, 88, 0);
|
||||||
|
|
||||||
unsigned char session_key[16]{};
|
unsigned char session_key[16]{};
|
||||||
ReadProcessMemory(phandle, (void*)(base_address + 0x2E7B300 + 0x608), &session_key, 16, 0);
|
ReadProcessMemory(phandle, (void*)(base_address + 0x2E7E380 + 0x608), &session_key, 16, 0);
|
||||||
|
|
||||||
TICKET = ticket;
|
TICKET = ticket;
|
||||||
SESSION_TICKET = string(session_ticket, 88);
|
SESSION_TICKET = string(session_ticket, 88);
|
||||||
|
Loading…
Reference in New Issue
Block a user