Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Exploits, Successes, AddressList, NoRun, Interface = {}, {}, {}, {}, {};
- local GlobalOffset = "28";
- function GetExploit(index)
- local tab, scan, result = Exploits[index], createMemScan(true);
- memscan_returnOnlyOneResult(scan, true);
- memscan_firstScan(scan, soExactValue, vtByteArray, rtTruncated, table.concat(tab[2], " "), nil, 0, 0x00FFFFFF, "", fsmNotAligned, nil, false, false, false, false);
- memscan_waitTillDone(scan);
- result = memscan_getOnlyResult(scan);
- if result == nil then return nil; end
- result = string.format("%X", result + tab[3]);
- result = string.rep("0", 8 - string.len(result)) .. result;
- return result;
- end
- function AddExploit(name, hex, offset)
- table.insert(Exploits, {name, hex, offset})
- end
- function toAddr(num)
- local num = tonumber(num);
- local addr = string.format("%X", num):upper();
- addr = string.rep("0", 8 - string.len(addr)) .. addr;
- return addr;
- end
- debugger_onBreakpoint = function()
- local function GetAddress(ESPaddr, Offset)
- local ESPaddr, Offset = tostring(ESPaddr) or string.rep("0", 8), tostring(Offset == nil and GlobalOffset or Offset);
- local SCaddr_base = tonumber("0x" .. ESPaddr) + tonumber("0x" .. Offset);
- local SCaddr_cont1, SCaddr_cont2, SCaddr_cont3, SCaddr_cont4 = tostring(string.format("%X", SCaddr_base)), tostring(string.format("%X", SCaddr_base + 1)), tostring(string.format("%X", SCaddr_base + 2)), tostring(string.format("%X", SCaddr_base + 3));
- local SCaddr = (readBytes(SCaddr_cont1) + (readBytes(SCaddr_cont2) * 256) + (readBytes(SCaddr_cont3) * 65536) + (readBytes(SCaddr_cont4) * 16777216));
- return toAddr(SCaddr);
- end
- --if readBytes(GetAddress(toAddr(ESP), GlobalOffset), 1) == 0x0D then
- local JOIN_addr = GetAddress(toAddr(ESP), GlobalOffset);
- local JOIN_len = tonumber("0x"..GetAddress(toAddr(ESP), string.format("%X", tonumber("0x"..GlobalOffset) + 4)));
- local JOIN_script_tbl = readBytes(JOIN_addr, JOIN_len, true);
- local JOIN_script = "";
- table.foreach(JOIN_script_tbl, function(i, v) JOIN_script = JOIN_script .. string.char(v); end);
- local script = JOIN_script .. [==[--[[INSERT SCRIPTS HERE]]--]==]
- local memory = allocateSharedMemory("[ROBLOX]-ScriptTrainer", string.len(script) + 5);
- local mem = toAddr(memory);
- local len = toAddr(string.len(script));
- local success_catch = writeString(mem, script);
- writeBytes(ESP + tonumber("0x" .. GlobalOffset), tonumber("0x" .. mem:sub(7, 8)), tonumber("0x" .. mem:sub(5, 6)), tonumber("0x" .. mem:sub(3, 4)),tonumber("0x" .. mem:sub(1, 2)));
- writeBytes(ESP + tonumber("0x" .. GlobalOffset) + 4, tonumber("0x" .. len:sub(7, 8)), tonumber("0x" .. len:sub(5, 6)), tonumber("0x" .. len:sub(3, 4)),tonumber("0x" .. len:sub(1, 2)));
- --print("[FiveInjector]: Script Execution location " .. GetAddress(toAddr(ESP), GlobalOffset) .. " with length " .. tonumber("0x" .. len));
- pcall(function() debug_removeBreakpoint(EIP); end);
- debug_continueFromBreakpoint(co_run);
- messageDialog("studio.ashx found and " .. (success_catch and "Thejustifierx successful" or "failed to inject."), (success_catch and 2 or 1), 2);
- --else
- --debug_continueFromBreakpoint(co_run)
- --end
- end
- function Exec()
- local unprotect_mem = {00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00, 01, 00, 01, 01, 01, 01, 01, 00, 01, 00, 01, 00, 00, 00, 01, 01, 01, 00, 00, 00, 00, 00, 01, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00, 00, 00, 00, 00, 01, 00, 00, 00, 00, 00, 01, 00, 00, 00}
- writeBytes("00F24118", unprotect_mem);
- pcall(function() object_destroy(Interface.MainFrame); end);
- Exploits, Successes, AddressList, Interface = {}, {}, {}, {};
- --AddExploit("level", {0x89, 0x74, 0x24, 0x0C, 0x89, 0x06, 0xE8}, 4)
- AddExploit("script", {0x83, 0xEC, 0x14, 0x56, 0x57, 0x8B, 0x7C, 0x24, 0x2C, 0x85, 0xFF}, 3)
- for i, v in pairs(Exploits) do
- local exploit = GetExploit(i);
- if (exploit == nil) then
- print("[FiveInjector]: Failed \"" .. v[1] .. "\"");
- else
- pcall(function() debug_removeBreakpoint(exploit); end);
- debug_setBreakpoint(exploit);
- AddressList[v[1]] = exploit;
- table.insert(Successes, v[1]);
- print("[FiveInjector]: Success \"" .. v[1] .. "\" [" .. exploit .. "]");
- end
- end
- print("[FiveInjector]: " .. tostring(#Successes) .. "/" .. tostring(#Exploits) .. " exploits found.")
- if #Successes == #Exploits then
- print("[FiveInjector]: Attached successfully. Listening for studio.ashx now...");
- else
- messageDialog("[FiveInjector]: Initializing failed. FiveInjector fails to launch", 1, 2);
- end
- end
- function myCheck(_)
- local id = getProcessIDFromProcessName("RobloxPlayer.exe");
- if id ~= nil then
- for i, v in pairs(NoRun) do
- if v == id then
- return
- end
- end
- table.insert(NoRun, id);
- openProcess(id);
- debugProcess(2);
- Exec();
- else
- local id2 = getProcessIDFromProcessName("RobloxPlayerBeta.exe");
- if id2 ~= nil then
- for i, v in pairs(NoRun) do
- if v == id2 then
- return
- end
- end
- table.insert(NoRun, id2);
- openProcess(id2);
- debugProcess(2);
- Exec();
- end
- end
- end
- t = createTimer(nil)
- timer_setInterval(t, 500)
- timer_onTimer(t, myCheck)
- timer_setEnabled(t, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement