mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-01-20 02:24:46 +00:00
Added a way to disable the memPatch function for those worried about T2 ROP being used with memPatch
This commit is contained in:
parent
ee256dfe16
commit
524dd4b205
|
|
@ -68,6 +68,8 @@ bool conForceUpdate(Linker::SimObject *obj, S32 argc, const char* argv[]);
|
|||
// General Commands ---------------------------------
|
||||
const char* conSprintf(Linker::SimObject *obj, S32 argc, const char* argv[]);
|
||||
bool conTSExtensionUpdate(Linker::SimObject *obj, S32 argc, const char *argv[]);
|
||||
// memPatch Disabler -------------------------------
|
||||
bool disableMempatch(Linker::SimObject* obj, S32 argc, const char* argv[]);
|
||||
// Regex Commands ----------------------------------
|
||||
const char* reIterNext(Linker::SimObject* obj, S32 argc, const char* argv[]);
|
||||
bool reIterEnd(Linker::SimObject* obj, S32 argc, const char* argv[]);
|
||||
|
|
|
|||
|
|
@ -377,6 +377,19 @@ const char* conSprintf(Linker::SimObject *obj, S32 argc, const char* argv[])
|
|||
return result;
|
||||
}
|
||||
|
||||
// memPatch Disabler
|
||||
bool memPatchStub(Linker::SimObject* obj, S32 argc, const char* argv[])
|
||||
{
|
||||
Con::errorf(0, "TSExtension: Attempted usage of memPatch after disabling it!");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool disableMempatch(Linker::SimObject* obj, S32 argc, const char* argv[])
|
||||
{
|
||||
Con::addMethodB(NULL, "memPatch", &memPatchStub,"Currently not available.", 1, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// RE Commands -----------------------------------
|
||||
|
||||
#include <regex>
|
||||
|
|
|
|||
|
|
@ -459,6 +459,8 @@ __declspec(naked) void updateMoveHook()
|
|||
// General
|
||||
Con::addMethodS(NULL, "sprintf", &conSprintf,"Formats a string. See the C sprintf.", 2, 20);
|
||||
Con::addMethodB(NULL, "tsExtensionUpdate", &conTSExtensionUpdate,"Updates the TSExtension.", 1, 1);
|
||||
// memPatch Disabler
|
||||
Con::addMethodB(NULL, "disableMempatch", &disableMempatch,"Disables memPatch.", 1, 1);
|
||||
// Regex
|
||||
Con::addMethodB(NULL, "reSearch", &reSearch,"reSearch(pattern, target): Searches for a pattern within the target string.", 3, 3);
|
||||
Con::addMethodB(NULL, "reMatch", &reMatch,"reMatch(pattern, target): Attempts to match the entire target string to a pattern.", 3, 3);
|
||||
|
|
|
|||
Loading…
Reference in a new issue