Add info for how to test client utilities
This commit is contained in:
parent
92ef38cd3c
commit
f4553679c3
|
|
@ -3,11 +3,21 @@
|
||||||
#define MFC2010
|
#define MFC2010
|
||||||
#define ARBITERBUILD
|
#define ARBITERBUILD
|
||||||
|
|
||||||
|
// when ARBITERBUILD is defined, the following changes occur:
|
||||||
|
// DataModel->getJobId is hooked
|
||||||
|
// StandardOut->print is hooked
|
||||||
|
// Network::RakNetAddressToString is hooked
|
||||||
|
// -jobId arg becomes available
|
||||||
|
// HTTP requests and output messages are logged to a file
|
||||||
|
|
||||||
// RobloxApp (2010)
|
// RobloxApp (2010)
|
||||||
#ifdef MFC2010
|
#ifdef MFC2010
|
||||||
#define CLASSLOCATION_CROBLOXAPP 0x00BFF898
|
#define CLASSLOCATION_CROBLOXAPP 0x00BFF898
|
||||||
#define CLASSLOCATION_CAPP 0x00405D20
|
#define CLASSLOCATION_CAPP 0x00405D20
|
||||||
|
|
||||||
|
#define CLASSPADDING_CROBLOXDOC__WORKSPACE 40
|
||||||
|
#define CLASSPADDING_DATAMODEL__JOBID 730
|
||||||
|
|
||||||
#define STRUCTOFFSET_DATAMODEL__JOBID 2912
|
#define STRUCTOFFSET_DATAMODEL__JOBID 2912
|
||||||
|
|
||||||
#define ADDRESS_DATAMODEL__GETJOBID 0x005CACC0
|
#define ADDRESS_DATAMODEL__GETJOBID 0x005CACC0
|
||||||
|
|
@ -29,6 +39,8 @@
|
||||||
#define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0
|
#define CLASSLOCATION_CROBLOXAPP 0x00CBA8A0
|
||||||
#define CLASSLOCATION_CAPP 0x00406D80
|
#define CLASSLOCATION_CAPP 0x00406D80
|
||||||
|
|
||||||
|
#define CLASSPADDING_CROBLOXDOC__WORKSPACE 45
|
||||||
|
|
||||||
#define STRUCTOFFSET_DATAMODEL__JOBID 2956
|
#define STRUCTOFFSET_DATAMODEL__JOBID 2956
|
||||||
|
|
||||||
#define ADDRESS_DATAMODEL__GETJOBID 0x005E70C0
|
#define ADDRESS_DATAMODEL__GETJOBID 0x005E70C0
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,14 @@
|
||||||
|
|
||||||
#include <oaidl.h>
|
#include <oaidl.h>
|
||||||
|
|
||||||
|
/* struct DataModel
|
||||||
|
{
|
||||||
|
void* padding1[CLASSPADDING_DATAMODEL__JOBID];
|
||||||
|
std::string* jobId;
|
||||||
|
}; */
|
||||||
|
|
||||||
|
class DataModel;
|
||||||
|
|
||||||
#if defined(MFC2010) || defined(MFC2011)
|
#if defined(MFC2010) || defined(MFC2011)
|
||||||
class CWorkspace;
|
class CWorkspace;
|
||||||
|
|
||||||
|
|
@ -15,15 +23,12 @@ const auto CWorkspace__ExecUrlScript = (HRESULT(__stdcall*)(CWorkspace * workspa
|
||||||
|
|
||||||
struct CRobloxDoc
|
struct CRobloxDoc
|
||||||
{
|
{
|
||||||
void* padding1[40];
|
void* padding1[CLASSPADDING_CROBLOXDOC__WORKSPACE];
|
||||||
CWorkspace* workspace;
|
CWorkspace* workspace;
|
||||||
};
|
};
|
||||||
|
|
||||||
// padding1[4] = offset of 0x10
|
// padding1[4] = offset of 0x10
|
||||||
// padding1[40] = offset of 0xA0 (160)
|
// padding1[40] = offset of 0xA0
|
||||||
// possible options
|
|
||||||
// padding1[46] = offset of 0xB8
|
|
||||||
// padding1[84] = offset of 0x150
|
|
||||||
struct CApp;
|
struct CApp;
|
||||||
|
|
||||||
// const auto CApp__CreateGame = (CWorkspace * (__thiscall*)(CApp * _this, void*, int, LPCWSTR))ADDRESS_CAPP__CREATEGAME;
|
// const auto CApp__CreateGame = (CWorkspace * (__thiscall*)(CApp * _this, void*, int, LPCWSTR))ADDRESS_CAPP__CREATEGAME;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, char
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARBITERBUILD
|
#ifdef ARBITERBUILD
|
||||||
int __fastcall DataModel__getJobId_hook(char* _this, void*, int a2)
|
int __fastcall DataModel__getJobId_hook(DataModel* _this, void*, int a2)
|
||||||
{
|
{
|
||||||
// this only sets the job id when game.jobId is called by lua
|
// this only sets the job id when game.jobId is called by lua
|
||||||
// so the gameserver script must call game.jobId at the beginning for this to take effect
|
// so the gameserver script must call game.jobId at the beginning for this to take effect
|
||||||
|
|
@ -87,8 +87,7 @@ int __fastcall DataModel__getJobId_hook(char* _this, void*, int a2)
|
||||||
jobIdPtr += 4;
|
jobIdPtr += 4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string* jobIdValue = (std::string*)jobIdPtr;
|
((std::string*)jobIdPtr)->assign(jobId);
|
||||||
jobIdValue->assign(jobId);
|
|
||||||
|
|
||||||
setJobId = true;
|
setJobId = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,12 @@
|
||||||
|
|
||||||
#include "RobloxMFCClasses.h"
|
#include "RobloxMFCClasses.h"
|
||||||
|
|
||||||
// #include <atlstr.h>
|
|
||||||
|
|
||||||
// Type Definitions //
|
// Type Definitions //
|
||||||
|
|
||||||
typedef BOOL(__thiscall* Http__trustCheck_t)(const char* url);
|
typedef BOOL(__thiscall* Http__trustCheck_t)(const char* url);
|
||||||
typedef void(__thiscall* Crypt__verifySignatureBase64_t)(HCRYPTPROV* _this, char a2, int a3, int a4, int a5, int a6, int a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
typedef void(__thiscall* Crypt__verifySignatureBase64_t)(HCRYPTPROV* _this, char a2, int a3, int a4, int a5, int a6, int a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
||||||
#ifdef ARBITERBUILD
|
#ifdef ARBITERBUILD
|
||||||
typedef INT(__thiscall* DataModel__getJobId_t)(char* _this, int a2);
|
typedef INT(__thiscall* DataModel__getJobId_t)(DataModel* _this, int a2);
|
||||||
typedef void(__thiscall* StandardOut__print_t)(int _this, int type, std::string* message);
|
typedef void(__thiscall* StandardOut__print_t)(int _this, int type, std::string* message);
|
||||||
// typedef void(__thiscall* Network__RakNetAddressToString_t)(int raknetAddress, bool writePort, char portDelineator);
|
// typedef void(__thiscall* Network__RakNetAddressToString_t)(int raknetAddress, bool writePort, char portDelineator);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -39,7 +37,7 @@ extern CRobloxCommandLineInfo__ParseParam_t CRobloxCommandLineInfo__ParseParam;
|
||||||
BOOL __fastcall Http__trustCheck_hook(const char* url);
|
BOOL __fastcall Http__trustCheck_hook(const char* url);
|
||||||
void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, char a2, int a3, int a4, int a5, int a6, int a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
void __fastcall Crypt__verifySignatureBase64_hook(HCRYPTPROV* _this, void*, char a2, int a3, int a4, int a5, int a6, int a7, int a8, char a9, int a10, int a11, int a12, int a13, int a14, int a15);
|
||||||
#ifdef ARBITERBUILD
|
#ifdef ARBITERBUILD
|
||||||
INT __fastcall DataModel__getJobId_hook(char* _this, void*, int a2);
|
INT __fastcall DataModel__getJobId_hook(DataModel* _this, void*, int a2);
|
||||||
void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message);
|
void __fastcall StandardOut__print_hook(int _this, void*, int type, std::string* message);
|
||||||
// std::string __fastcall Network__RakNetAddressToString_hook(int raknetAddress, bool writePort, char portDelineator);
|
// std::string __fastcall Network__RakNetAddressToString_hook(int raknetAddress, bool writePort, char portDelineator);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
16
README.md
16
README.md
|
|
@ -2,3 +2,19 @@
|
||||||
Manages DLLs for extending game client/server functionality
|
Manages DLLs for extending game client/server functionality
|
||||||
|
|
||||||
Based off [ndoesstuff/JoinScriptUrlImpl](https://github.com/ndoesstuff/JoinScriptUrlImpl) as per the MIT license
|
Based off [ndoesstuff/JoinScriptUrlImpl](https://github.com/ndoesstuff/JoinScriptUrlImpl) as per the MIT license
|
||||||
|
|
||||||
|
Test command line parameter reimplementation (2010/2011 only):
|
||||||
|
> RobloxApp.exe -a http://polygondev.pizzaboxer.xyz/login/negotiate.ashx -t 0 -j http://polygondev.pizzaboxer.xyz/game/visit.ashx
|
||||||
|
|
||||||
|
Test trust check:
|
||||||
|
> Insert a new brick with decal
|
||||||
|
> Try setting decal ID to http://tadah.rocks - Should succeed
|
||||||
|
> Try setting decal ID to http://tadah.rocks@example.com - Should fail
|
||||||
|
|
||||||
|
Test signature check:
|
||||||
|
> Run loadfile("rbxasset://signatureinvalid.txt")() - Should throw an exception
|
||||||
|
> Run loadfile("rbxasset://signatureoverflow.txt")() - Should throw an exception
|
||||||
|
|
||||||
|
Test output and jobId (Arbiter builds only):
|
||||||
|
> RobloxApp.exe -jobId ExampleJobId - Should open an output console
|
||||||
|
> Run print(game.jobId) - Should print "ExampleJobId" in the console
|
||||||
Loading…
Reference in New Issue