do if type(getrlyunyz) ~= 'function' then gg.alert('请使用RLGG执行') os.exit() return end local info = { example_version = '1.0.3', name = '陌路人内置', appid = '14946', appkey = 'y0GobGYb63c6Xhh6', rc4key = '8LUCP5I0iloDaqSC', version = '1.0', mi_type = '3' } local rlyunyz = getrlyunyz(info) local ret = rlyunyz.start() if not ret or not isTable(ret) or ret.sign ~= 'b2c205ab324a7e3d99e733f6ec1f687b' then os.exit() return end end -- 把以上代码复制到你脚本最前面即可 gg.alert('陌路人内置') --[[ 【开关】开【开关】 【公告】这里填你的公告【公告】 ]] toMusic("欢迎使用陌路人内置") function interruptThread(thread) if thread then pcall(function() thread:interrupt() end) end end draw.text('陌路人', 26,650) draw.setColor('#FFFFFF') local floatingWindowManager = require('floatingWindowManager') floatingWindowManager:init() function interruptThread(thread) if thread then pcall(function() thread:interrupt() end) end end draw.text('欢迎使用内置', 26,600) draw.setColor('#FFFFFF') local floatingWindowManager = require('floatingWindowManager') floatingWindowManager:init() function interruptThread(thread) if thread then pcall(function() thread:interrupt() end) end end -- 获取异步线程回调 local function getASyncThreadCallbak(func) return function() luajava.startThread(function() return pcall(func) end) end end -- 获取同步线程回调, 涉及gg类库的回调只能使用这种,否则可能不稳定 local task local function getSyncThreadCallbak(func) return function() if task then gg.toast('正在运行其它任务,再稍后!') return end luajava.startThread(function() task = true pcall(func) task = nil end) end end -- 获取同步线程回调并执行 local function callSyncThreadCallbak(func) return getSyncThreadCallbak(func)() end -- 通过功能名称找 function 并获取同步线程回调 local function findFunctionByName(name) local func = _ENV[name] if not isFunction(func) then gg.alert(string.format('不存在 %q 功能', name)) return nil end return getSyncThreadCallbak(func) end -- 按钮工厂-生产“按钮布局” local function newButtonLayout(name) if not isString(name) then return end local layout = { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = name, textSize = '16sp', onClick = findFunctionByName(name) } return layout end -- 开关工厂-生产“开关布局” local function newSwitchLayout(openName, closeName) if not isString(openName) then return end local layout = { Switch, layout_width = 'match_parent', text = openName, onCheckedChange = function(CompoundButton, state) local func if state then -- 设置开关文本为“关闭”的文本 if isString(closeName) then CompoundButton:setText(closeName) end -- 找“打开”的功能函数 func = findFunctionByName(openName) else -- 设置开关文本为“打开”的文本 CompoundButton:setText(openName) if isString(closeName) then -- 找“关闭”的功能函数 func = findFunctionByName(closeName) end end if isFunction(func) then -- 通过 findFunctionByName 获取的函数已经是被多线程包裹的,所以直接执行就可以了 func() end end } return layout end function SignatureSearch(FirstCode,SecondCode,Get) gg.clearResults() gg.setRanges(FirstCode[6]) gg.setVisible(false) if FirstCode[1] then gg.searchNumber(FirstCode[1],FirstCode[5],false,gg.SIGN_EQUAL,FirstCode[3] or 0,FirstCode[4] or -1) end if FirstCode[2] then gg.searchAddress(FirstCode[2],-1,FirstCode[5],gg.SIGN_EQUAL,0,-1) end if gg.getResultsCount()>0 then local results1,results2,NewResults=gg.getResults(gg.getResultsCount()),gg.getResults(gg.getResultsCount()),{} gg.clearResults() if #SecondCode>0 then for i=1,#SecondCode do local Results={} if i%2==1 then for j,result in ipairs(results1) do Results[#Results+1]={} Results[#Results].address=result.address+SecondCode[i][2] Results[#Results].flags=SecondCode[i][3] end results2={} else for j,result in ipairs(results2) do Results[#Results+1]={} Results[#Results].address=result.address+SecondCode[i][2] Results[#Results].flags=SecondCode[i][3] end results1={} end Results=gg.getValues(Results) local value,code=nil,nil for k,result2 in ipairs(Results) do if result2.flags==16 or result2.flags==64 then value=tostring(result2.value):sub(1,6) code=tostring(SecondCode[i][1]):sub(1,6) else value=result2.value code=SecondCode[i][1] end if i%2==1 then if value==code then results2[#results2+1]=results1[k] end else if value==code then results1[#results1+1]=results2[k] end end end end end if #SecondCode%2==1 then NewResults=results2 else NewResults=results1 end local changeresults,keepresults,loadresults={},{},{} if #NewResults>0 then for i,result in ipairs(NewResults) do for j,conduct in ipairs(Get) do if conduct[1] then changeresults[#changeresults+1]={} changeresults[#changeresults].value=conduct[1] changeresults[#changeresults].address=result.address+conduct[2] changeresults[#changeresults].flags=conduct[3] else loadresults[#loadresults+1]={} loadresults[#loadresults].address=result.address+conduct[2] loadresults[#loadresults].flags=conduct[3] end if conduct[4] or conduct[5] then keepresults[#keepresults+1]={} if conduct[1] then keepresults[#keepresults].value=conduct[1] else keepresults[#keepresults].value=gg.getValues({[1]={address=result.address+conduct[2],flags=conduct[3]}})[1].value end keepresults[#keepresults].address=result.address+conduct[2] keepresults[#keepresults].flags=conduct[3] keepresults[#keepresults].freeze=conduct[5] keepresults[#keepresults].name=conduct[6] end end end gg.setValues(changeresults) gg.loadResults(loadresults) gg.addListItems(keepresults) else gg.toast("请勿在加载进度开启") end else gg.toast("请勿在加载进度开启") end end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber("747135368") local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function readWrite(Search,Get,Type,Range,Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1]~=false then gg.searchAddress(Search[1][1],0xFFFFFFFF,Search[1][4] or Type,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) end gg.searchNumber(Search[1][2],Search[1][4] or Type,false,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) local count=gg.getResultCount() local result=gg.getResults(count) gg.clearResults() local data={} local base=Search[1][3] if (count > 0) then for i,v in ipairs(result) do v.isUseful=true end for k=2,#Search do local tmp={} local offset=Search[k][2] - base local num=Search[k][1] for i,v in ipairs(result) do tmp[#tmp+1]={} tmp[#tmp].address=v.address+offset tmp[#tmp].flags=Search[k][3] or Type end tmp=gg.getValues(tmp) for i,v in ipairs(tmp) do if v.flags==16 or v.flags==64 then values=tostring(v.value):sub(1,6) num=tostring(num):sub(1,6) else values=v.value end if tostring(values)~=tostring(num) then result[i].isUseful=false end end end for i,v in ipairs(result) do if (v.isUseful) then data[#data+1]=v.address end end if (#data > 0) then local t,t_={},{} local base=Search[1][3] for i=1,#data do for k,w in ipairs(Get) do offset=w[2] - base if w[1]==false then t_[#t_+1]={} t_[#t_].address=data[i]+offset t_[#t_].flags=Type th_=(th_) and th_+1 or 1 else t[#t+1]={} t[#t].address=data[i]+offset t[#t].flags=w[3] or Type t[#t].value=w[1] tg_=(tg_) and tg_+1 or 1 if (w[4]==true) then local item={} item[#item+1]=t[#t] item[#item].freeze=w[4] gg.addListItems(item) end end end end tg=(tg_) and "\n已修改"..tg_.."条数据" or "" th=(th_) and "\n已获取"..th_.."条数据" or "" gg.setValues(t) t_=gg.getValues(t_) gg.loadResults(t_) gg.toast("\n"..Name.."搜索成功!\n偏移到"..#data.."条数据"..tg..th) tg_,th_=nil,nil else gg.toast("\n"..Name.."开启失败",false) return false end else gg.toast(Name.."开启失败") return false end end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end DWORD=gg.TYPE_DWORD DOUBLE=gg.TYPE_DOUBLE FLOAT=gg.TYPE_FLOAT WORD=gg.TYPE_WORD BYTE=gg.TYPE_BYTE XOR=gg.TYPE_XOR QWORD=gg.TYPE_QWORD function nc_offset(addr,tablex,tt) for i,v in ipairs(tablex) do if v[4]==true then gg.addListItems({{address=addr+v[3],flags=v[2],value=v[1],freeze=v[4]}})else gg.setValues({{address=addr+v[3],flags=v[2],value=v[1]}}) end end gg.toast((tt or "").."开启成功") end function getso(So_name) return gg.getRangesList(So_name)[1].start end function BaAdd(add) t=gg.getValues({[1]={address=add,flags=4}}) return t[1].value&0xFFFFFFFF end function readPointer(Add,Item) for i=1,(#Item-1) do Add=BaAdd(Add+Item[i]) end return Add+Item[#Item] end function setvalue(add,value,falgs,dj) local WY={} WY[1]={} WY[1].address=add WY[1].value=value WY[1].flags=falgs if dj==true then WY[1].freeze=true gg.addListItems(WY) else gg.setValues(WY) end end function getnc(Name,nc) local t=gg.getRangesList(Name) for i, v in ipairs(t) do if v.state==nc then return v.start end end end function SearchWrite(Search, Write, Type) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = v.flags end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then gg.toast("\n共修改"..#data.."条数据") local t = {} local base = Search[1][2] for i=1, #data do for k, w in ipairs(Write) do offset = w[2] - base t[#t+1] = {} t[#t].address = data[i] + offset t[#t].flags = Type t[#t].value = w[1] if (w[3] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = true gg.addListItems(item) end end end gg.setValues(t) else gg.toast("\n开启失败", false) return false end else gg.toast("\n开启失败") return false end end --仿xs写法配置 DWORD = gg.TYPE_DWORD DOUBLE = gg.TYPE_DOUBLE FLOAT = gg.TYPE_FLOAT WORD = gg.TYPE_WORD BYTE = gg.TYPE_BYTE XOR = gg.TYPE_XOR QWORD = gg.TYPE_QWORD -- 【【 核心代码,不懂勿动 】】 -- JF Script编辑器 ------------------------------------------------------------------------------------------------------------- function nc_offset(addr, tablex, tt) for i, v in ipairs(tablex) do if v[4] == true then gg.addListItems({{address = addr + v[3], flags = v[2], value = v[1], freeze = v[4]}}) else gg.setValues({{address = addr + v[3], flags = v[2], value = v[1]}}) end end gg.toast((tt or "") .. "开启成功") end function getso(So_name) return gg.getRangesList(So_name)[1].start end function BaAdd(add) t = gg.getValues({[1] = {address = add, flags = 4}}) return t[1].value & 0xFFFFFFFF end function readPointer(Add, Item) for i = 1, (#Item - 1) do Add = BaAdd(Add + Item[i]) end return Add + Item[#Item] end function setvalue(add, value, falgs, dj) local WY = {} WY[1] = {} WY[1].address = add WY[1].value = value WY[1].flags = falgs if dj == true then WY[1].freeze = true gg.addListItems(WY) else gg.setValues(WY) end end function getnc(Name, nc) local t = gg.getRangesList(Name) for i, v in ipairs(t) do if v.state == nc then return v.start end end end function SearchWrite(Search, Write, Type) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k = 2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp + 1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = v.flags end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if (tostring(v.value) ~= tostring(num)) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data + 1] = v.address end end if (#data > 0) then gg.toast("\n共修改" .. #data .. "条数据") local t = {} local base = Search[1][2] for i = 1, #data do for k, w in ipairs(Write) do offset = w[2] - base t[#t + 1] = {} t[#t].address = data[i] + offset t[#t].flags = Type t[#t].value = w[1] if (w[3] == true) then local item = {} item[#item + 1] = t[#t] item[#item].freeze = true gg.addListItems(item) end end end gg.setValues(t) else gg.toast("\n开启失败", false) return false end else gg.toast("\n开启失败") return false end end ------------------------------------------------------------------------------------------------------------- function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] xgdj = qmxg[x]["freeze"] if xgdj == nil or xgdj == "" then gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) else gg.addListItems({[1] = {address = xgpy, flags = xglx, freeze = xgdj, value = xgsz}}) end xgsl = xgsl + 1 xgjg = true end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end end end end function SearchWrite(tb1, tb2, dataType, Name) local lt1={} local lt2={} local mm1={["主特征码"] = tb1[1][1],["类型"] = dataType } table.insert(lt1,1,mm1) for i=2 , #tb1 do local mm2={["副特征码"] = tb1[i][1],["偏移"] = tb1[i][2]} table.insert(lt1,i,mm2) end for i=1 , #tb2 do if tb2[i][2]~=nil then local mm3={["修改"] = tb2[i][1],["偏移"] = tb2[i][2]} table.insert(lt2,i,mm3) else local mm3={["修改"] = false,["偏移"] = tb2[i][1]} table.insert(lt2,i,mm3) end end LongTao(lt1, lt2 ) end function LongTao(Search, Write) gg.clearResults() gg.setVisible(false) lx=Search[1]["类型"] gg.searchNumber(Search[1]["主特征码"], lx) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} if (count > 0) then gg.toast("共搜索 "..count.." 条数据") for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local num = Search[k]["副特征码"] if Search[k]["类型"]~= nil then lx =Search[k]["类型"] else lx = Search[1]["类型"] end for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + Search[k]["偏移"] tmp[#tmp].flags = lx end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then local t = {} for i=1, #data do for k, w in ipairs(Write) do if w["类型"] ~= nil then lx = w["类型"] else lx = Search[1]["类型"] end t[#t+1] = {} t[#t].address = data[i] + w["偏移"] t[#t].flags = lx if (w["修改"]~=nil) and (w["修改"]~=false) then t[#t].value = w["修改"] gg.setValues(t) if (w["冻结"] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = w["冻结"] gg.addListItems(item) end end end end gg.loadResults(t) gg.toast("共偏移η"..#t.." 条数据ΔΘ") else gg.toast("未定位到数据!") return false end else gg.toast("未定位到数据!") return false end end local app = {} function Assert(data) if data == nil or data == "" or data == "nil" then return false else return true end end function mearrass(memory, array) if Assert(memory) and Assert(array) then return true else return false end end function typetab(array, type) local datatype = {} for i = 1, #array do if Assert(array[i].type) then table.insert(datatype, i, array[i].type) else if Assert(type) then table.insert(datatype, i, type) else return false end end end return true, datatype end function app.memorysearch(memory, array, type) gg.setVisible(false) local isok = mearrass(memory, array) if isok then local isok, datatype = typetab(array, type) if isok then if Assert(array[1].hv) then gg.clearResults() gg.setRanges(memory) gg.searchNumber(array[1].lv .. "~" .. array[1].hv, datatype[1]) else gg.clearResults() gg.setRanges(memory) gg.searchNumber(array[1].lv, datatype[1]) end if gg.getResultCount() == 0 then return false else local tab = {} local data = gg.getResults(gg.getResultCount()) gg.clearResults() for i = 1, #data do data[i].isok = true end for i = 2, #array do local t = {} local offset = array[i].offset for x = 1, #data do t[#t + 1] = {} t[#t].address = data[x].address + offset t[#t].flags = datatype[i] end local t = gg.getValues(t) for z = 1, #t do if Assert(array[i].hv) then if tonumber(t[z].value) < tonumber(array[i].lv) or tonumber(t[z].value) > tonumber(array[i].hv) then data[z].isok = false end else if tostring(t[z].value) ~= tostring(array[i].lv) then data[z].isok = false end end end end for i = 1, #data do if data[i].isok then tab[#tab + 1] = data[i].address end end if #tab > 0 then return true, tab else return false end end else print("type参数错误") gg.toast("type参数错误") os.exit() end else print("memory or array参数错误") gg.toast("memory or array参数错误") os.exit() end end function app.memoryread(addr, type) local t = {} t[1] = {} t[1].address = addr t[1].flags = type if #t > 0 then return true, gg.getValues(t)[1].value else return false end end function app.memorywrite(addr, type, value, freeze) local t = {} t[1] = {} t[1].address = addr t[1].flags = type t[1].value = value if #t > 0 then if Assert(freeze) then t[1].freeze = freeze return gg.addListItems(t) else return gg.setValues(t) end else return false end end function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要修改的值)') local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function PS() end function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要修改的值)') local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end lde,mnsj={},{Dj="0.01",dv={},lz="/sdcard/.zbb",r={}} lde.gre,lde.sbr,lde.srg,lde.crs=gg.getResults,gg.searchNumber,gg.setRanges,gg.clearResults function lde.qb()table.remove(bc,#bc)table.remove(bc,#bc)end function bv(a,b) if not b then b=","end if not tostring(a):find(b)then return{a}end local tab={}local i=0 while true do j=string.find(a,b,i+1) if not j then table.insert(tab,a:sub(i+1,#a)) break end table.insert(tab,a:sub(i+1,j-1)) i=j end return tab end function so(a,b,c) local csn=gg.getRanges() gg.setVisible(false) lde.srg(a[3]) lde.crs() lde.sbr(a[2],a[4]) local js=gg.getResultCount() local count=lde.gre(js) lde.crs() if #count~=0 then local lode,lope,lobe={},{},{} for p=1,#b do lode[p]={} for i=1,#count do lode[p][i]={} lode[p][i].address=count[i].address+b[p][2] if not b[p][3]then b[p][3]=a[4]end lode[p][i].flags=b[p][3]end lode[p]=gg.getValues(lode[p]) db=bv(b[p][1],"~") if not db[2]then db[2]=db[1]end for i=1,#lode[p] do if tonumber(lode[p][i].value)>=tonumber(db[1]) and tonumber(lode[p][i].value)<=tonumber(db[2]) then lope[#lope+1]={} lope[#lope]=count[i] end end if #lope==0 then lde.srg(csn)if p>11 then p=11 end return "开启失败" end count=lope lope={}end for i=1,#c do for n=1,#count do lope[#lope+1]={} lope[#lope].address=count[n].address+c[i][2] if not c[i][3]then c[i][3]=a[4]end lope[#lope].flags=c[i][3] if c[i][1] then lope[#lope].value=c[i][1] else lope[#lope].value=gg.getValues(lope)[#lope].value end if c[i][4] then lobe[#lobe+1]={} lobe[#lobe]=lope[#lope] table.remove(lope,#lope) end if c[i][4]==1 then lobe[#lobe].freeze=true elseif c[i][4]==2 then lobe[#lobe].freeze=false end if c[i][5] then lobe[#lobe].name=c[i][5] end end end gg.setValues(lope) gg.addListItems(lobe) lde.srg(csn) return a[1].."开启成功" else lde.srg(csn) return a[1].."开启失败!!!" end end function Mswrite(read,write) gg.clearResults() gg.setRanges(read["内存"]) gg.setVisible(false) gg.searchNumber(read["主特征码"],read["类型"]) if gg.getResultCount()>0 then local Result=gg.getResults(gg.getResultCount()) gg.clearResults() for i=1,#read do local t={} for e,v in ipairs(Result) do t[#t+1]={address=v.address+read[i]["偏移"],flags=read[i]["类型"]} end t=gg.getValues(t) for _a,x in ipairs(t) do if x.value~=read[i]["值"] then Result[_a]=nil end end local MS={} for i,v in pairs(Result) do MS[#MS+1]=Result[i] end Result=MS end if(#Result>0)then local data={{},{}} for i,v in ipairs(Result) do for a,x in ipairs(write) do if x["冻结"]==true then data[2][#data[2]+1]={address=v.address+x["偏移"],flags=x["类型"],value=x["值"],freeze=true} else data[1][#data[1]+1]={address=v.address+x["偏移"],flags=x["类型"],value=x["值"]} end end end gg.setValues(data[1]) gg.addListItems(data[2]) gg.toast((read["功能名称"] or read["名称"] or read["name"] or "").."开启成功,共搜索"..#Result.."条地址已修改"..(#data[1]+#data[2]).."条数据") else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "").."修改失败") end else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "").."开启失败,未搜索到数据") end end function readPointer(name,offset,i) local re=gg.getRangesList(name) local x64=gg.getTargetInfo().x64 local va={[true]=32,[false]=4} if re[i or 1] then local addr=re[i or 1].start+offset[1] for i=2,#offset do addr=gg.getValues({{address=addr,flags=va[x64]}}) if not x64 then addr[1].value=addr[1].value&0xFFFFFFFF end addr=addr[1].value+offset[i] end return addr end end function search(ss,lx,nc,dz1,dz2) if ss~=nil then if lx~=nil then if nc==nil then nc=32 end gg.setRanges(nc) if dz1==nil then dz1="-1" end if dz2==nil then dz1="0" end gg.searchNumber(ss,lx,false,536870912,dz1,dz2) sl=gg.getResultCount() if sl~=0 then sj=gg.getResults(sl) gg.toast("搜索到 "..sl.." 个结果") gg.clearResults() else gg.toast("未搜索到结果") end else gg.toast("无搜索值类型") end else gg.toast("无需搜索值") end end function py1(value,lx,py) if #sj~=nil then z1={} z2={} for i=1,#sj do z1[i]={} z1[i].address=sj[i].address+py z1[i].flags=lx end z1=gg.getValues(z1) for i=1,#sj do if z1[i].value==value then z2[#z2+1]={} z2[#z2]=sj[i] end end sj=z2 z1={} z2={} gg.toast("共偏移 "..#sj.." 个数据") else gg.toast("没有搜索数据") end end function py2(value,lx,py) if #sj~=nil then z1={} z2={} for i=1,#sj do z1[i]={} z1[i].address=sj[i].address+py z1[i].flags=lx end z1=gg.getValues(z1) for i=1,#sj do if z1[i].value~=value then z2[#z2+1]={} z2[#z2]=sj[i] end end sj=z2 z1={} z2={} gg.toast("共偏移 "..#sj.." 个数据") else gg.toast("没有搜索数据") end end function xg1(value,lx,py,dj) if #sj~=nil then z={} for i=1,#sj do z[i]={} z[i].address=sj[i].address+py z[i].flags=lx z[i].value=value if dj==true then z[i].freeze=true end end if dj==true then gg.addListItems(z) else gg.clearList() gg.setValues(z) end gg.toast("共修改 "..#z.." 个数据") else gg.toast("没有搜索数据") end end function xg2(bz,value,lx,py,dj) if #bz~=nil then z={} for i=1,#bz do z[i]={} z[i].address=bz[i].address+py z[i].flags=lx z[i].value=value if dj==true then z[i].freeze=true end end if dj==true then gg.addListItems(z) else gg.clearList() gg.setValues(z) end gg.toast("共修改 "..#z.." 个数据") else gg.toast("没有搜索数据") end end function bc(bz) if sj~=nil then _ENV[bz]=sj else gg.toast("无数据") end end function BaAdd(add) t=gg.getValues({[1]={address=add,flags=4}}) return t[1].value&0xFFFFFFFF end function set(dz,xg,lx,dj) if dj=="true" then gg.addListItems({{address=dz,flags=lx,value=xg,freeze=true}}) else gg.setValues({{address=dz,flags=lx,value=xg}}) end gg.toast("已修改完成~") end ------------------------------------------------------------------------------------------------------------- DWORD = gg.TYPE_DWORD DOUBLE = gg.TYPE_DOUBLE FLOAT = gg.TYPE_FLOAT WORD = gg.TYPE_WORD BYTE = gg.TYPE_BYTE XOR = gg.TYPE_XOR QWORD = gg.TYPE_QWORD -- 【【 核心代码,不懂勿动 】】 -- JF Script编辑器 ------------------------------------------------------------------------------------------------------------- function readWrite(Search, Get, Type, Range, Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1] ~= false then gg.searchAddress(Search[1][1], 0xFFFFFFFF, Search[1][4] or Type, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) end gg.searchNumber(Search[1][2], Search[1][4] or Type, false, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][3] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k = 2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp + 1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = Search[k][3] or Type end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if v.flags == 16 or v.flags == 64 then values = tostring(v.value):sub(1, 6) num = tostring(num):sub(1, 6) else values = v.value end if tostring(values) ~= tostring(num) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data + 1] = v.address end end if (#data > 0) then local t, t_ = {}, {} local base = Search[1][3] for i = 1, #data do for k, w in ipairs(Get) do offset = w[2] - base if w[1] == false then t_[#t_ + 1] = {} t_[#t_].address = data[i] + offset t_[#t_].flags = Type th_ = (th_) and th_ + 1 or 1 else t[#t + 1] = {} t[#t].address = data[i] + offset t[#t].flags = w[3] or Type t[#t].value = w[1] tg_ = (tg_) and tg_ + 1 or 1 if (w[4] == true) then local item = {} item[#item + 1] = t[#t] item[#item].freeze = w[4] gg.addListItems(item) end end end end tg = (tg_) and "\n已修改" .. tg_ .. "条数据" or "" th = (th_) and "\n已获取" .. th_ .. "条数据" or "" gg.setValues(t) t_ = gg.getValues(t_) gg.loadResults(t_) gg.toast("\n" .. Name .. "搜索成功!\n偏移到" .. #data .. "条数据" .. tg .. th) tg_, th_ = nil, nil else gg.toast("\n" .. Name .. "开启失败", false) return false end else gg.toast(Name .. "开启失败") return false end end ------------------------------------------------------------------------------------------------------------- function XGBase(Address, AFV) local address = 0 for index, offset in ipairs(Address) do if index == 1 then address = offset else address = gg.getValues({{address = address + offset, flags = 4}})[1].value end end local Value, Freeze = {}, {} for index, value in ipairs(AFV) do local VALUE = {address = address + value[3], flags = value[2], value = value[1], freeze = true} if value[4] then Freeze[#Freeze + 1] = VALUE else Value[#Value + 1] = VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end ------------------------------------------------------------------------------------------------------------- --偏移配置 function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true] = 32, [false] = 4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address = addr, flags = va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end gg.edits = function(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2] + 1] = value else Table1[1][#Table1[1] + 1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改" .. #Table .. "个值") end function Mswrite(search) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) if type(search[1][4]) == "string" then gg.searchAddress(search[1][4]) end gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then return gg.toast("搜索失败") else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = {address = r.address + search[i][2], flags = search[i][3]} end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end gg.toast("共搜索到" .. #result .. "条数据") return result end end function SearchWrite(read, write) gg.clearResults() gg.setRanges(read["内存"]) gg.setVisible(false) gg.searchNumber(read["主特征码"], read["类型"]) if gg.getResultCount() > 0 then local Result = gg.getResults(gg.getResultCount()) gg.clearResults() for i = 1, #read do local t = {} for e, v in ipairs(Result) do t[#t + 1] = {address = v.address + read[i]["偏移"], flags = read[i]["类型"]} end t = gg.getValues(t) for _a, x in ipairs(t) do if x.value ~= read[i]["值"] then Result[_a] = nil end end local MS = {} for i, v in pairs(Result) do MS[#MS + 1] = Result[i] end Result = MS end if (#Result > 0) then local data = {{}, {}} for i, v in ipairs(Result) do for a, x in ipairs(write) do if x["冻结"] == true then data[2][#data[2] + 1] = {address = v.address + x["偏移"], flags = x["类型"], value = x["值"], freeze = true} else data[1][#data[1] + 1] = {address = v.address + x["偏移"], flags = x["类型"], value = x["值"]} end end end gg.setValues(data[1]) gg.addListItems(data[2]) gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "开启成功,共搜索" .. #Result .. "条地址\n已修改" .. (#data[1] + #data[2]) .. "条数据") else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "修改失败") end else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "开启失败,未搜索到数据") end end function xqmnb(x) local tp1 = {["内存"] = x[1]["memory"], ["主特征码"] = x[3]["value"], ["类型"] = x[3]["type"], ["name"] = x[2]["name"]} for i = 4, #x do tp1[#tp1 + 1] = {["值"] = x[i]["lv"], ["偏移"] = x[i].offset, ["类型"] = x[i].type} end local tp2 = {} for i, v in ipairs(qmxg) do tp2[#tp2 + 1] = {["值"] = v.value, ["类型"] = v.type, ["偏移"] = v.offset, ["冻结"] = (v.freeze or nil)} end SearchWrite(tp1, tp2) end function readValue(add, flags) local t = gg.getValues({[1] = {address = add, flags = flags}}) return t[1].value end function readAdd(add) local t = gg.getValues({[1] = {address = add, flags = 4}}) return t[1].value & 0xFFFFFFFF end ------------------------------------------------------------------------------------------------------------- function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function xtnb(Search,Get,Type,Range,Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1]~=false then gg.searchAddress(Search[1][1],0xFFFFFFFF,Search[1][4] or Type,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) end gg.searchNumber(Search[1][2],Search[1][4] or Type,false,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) local count=gg.getResultCount() local result=gg.getResults(count) gg.clearResults() local data={} local base=Search[1][3] if (count > 0) then for i,v in ipairs(result) do v.isUseful=true end for k=2,#Search do local tmp={} local offset=Search[k][2] - base local num=Search[k][1] for i,v in ipairs(result) do tmp[#tmp+1]={} tmp[#tmp].address=v.address+offset tmp[#tmp].flags=Search[k][3] or Type end tmp=gg.getValues(tmp) for i,v in ipairs(tmp) do if v.flags==16 or v.flags==64 then values=tostring(v.value):sub(1,6) num=tostring(num):sub(1,6) else values=v.value end if tostring(values)~=tostring(num) then result[i].isUseful=false end end end for i,v in ipairs(result) do if (v.isUseful) then data[#data+1]=v.address end end if (#data > 0) then local t,t_={},{} local base=Search[1][3] for i=1,#data do for k,w in ipairs(Get) do offset=w[2] - base if w[1]==false then t_[#t_+1]={} t_[#t_].address=data[i]+offset t_[#t_].flags=Type th_=(th_) and th_+1 or 1 else t[#t+1]={} t[#t].address=data[i]+offset t[#t].flags=w[3] or Type t[#t].value=w[1] tg_=(tg_) and tg_+1 or 1 if (w[4]==true) then local item={} item[#item+1]=t[#t] item[#item].freeze=w[4] gg.addListItems(item) end end end end tg=(tg_) and "\n已修改"..tg_.."条数据" or "" th=(th_) and "\n已获取"..th_.."条数据" or "" gg.setValues(t) t_=gg.getValues(t_) gg.loadResults(t_) gg.toast("\n"..Name.."搜索成功!\n偏移到"..#data.."条数据"..tg..th) tg_,th_=nil,nil else gg.toast("\n"..Name.."开启失败",false) return false end else gg.toast(Name.."开启失败") return false end end function editData(qmnb,qmxg)gg.setVisible(false)gg.clearResults()qmnbv=qmnb[3]["value"]or qmnb[3][1]qmnbt=qmnb[3]["type"]or qmnb[3][2]qmnbn=qmnb[2]["name"]or qmnb[2][1]gg.setRanges(qmnb[1]["memory"]or qmnb[1][1])gg.searchNumber(qmnbv,qmnbt)gg.refineNumber(qmnbv,qmnbt)sz=gg.getResultCount()if sz==0 then gg.toast(qmnbn.."开启失败")else sl=gg.getResults(999999)for i=1,sz do pdsz=true for v=4,#qmnb do if pdsz==true then pysz={{}}pysz[1].address=sl[i].address+(qmnb[v]["offset"]or qmnb[v][2])pysz[1].flags=qmnb[v]["type"]or qmnb[v][3]szpy=gg.getValues(pysz)tzszpd=tostring(qmnb[v]["lv"]or qmnb[v][1]):gsub(",","")pyszpd=tostring(szpy[1].value):gsub(",","")if tzszpd==pyszpd then pdjg=true pdsz=true else pdjg=false pdsz=false end end end if pdjg==true then szpy=sl[i].address for x=1,#qmxg do xgsz=qmxg[x]["value"]or qmxg[x][1]xgpy=szpy+(qmxg[x]["offset"]or qmxg[x][2])xglx=qmxg[x]["type"]or qmxg[x][3]xgdj=qmxg[x]["freeze"]or qmxg[x][4]xg={{address=xgpy,flags=xglx,value=xgsz}}if xgdj==true then xg[1].freeze=xgdj gg.addListItems(xg)else gg.setValues(xg)end end xgjg=true end end if xgjg==true then gg.toast(qmnbn.."开启成功")else gg.toast(qmnbn.."开启失败")end end end -- 【【 核心代码,不懂勿动 】】 -- JF Script编辑器 D=gg.TYPE_DWORD E=gg.TYPE_DOUBLE F=gg.TYPE_FLOAT W=gg.TYPE_WORD B=gg.TYPE_BYTE X=gg.TYPE_XOR Q=gg.TYPE_QWORD function nc_offset(addr,tablex,tt) for i,v in ipairs(tablex) do if v[4]==true then gg.addListItems({{address=addr+v[3],flags=v[2],value=v[1],freeze=v[4]}})else gg.setValues({{address=addr+v[3],flags=v[2],value=v[1]}}) end end gg.toast((tt or "").."开启成功") end function getso(So_name) return gg.getRangesList(So_name)[1].start end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function fastsearch(search, write) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then gg.toast("Not Found") return false else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = { address = r.address + search[i][2], flags = search[i][3] } end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end if #result > 0 then local tb = {{}, {}} for i, v in ipairs(result) do --- 遍历每个结果 for _, vv in ipairs(write) do local p = {address = v.address + vv[2], flags = vv[3], value = vv[1], freeze = vv[4]} if vv[4] then --- true 就是冻结 table.insert(tb[2], p) else table.insert(tb[1], p) end end end gg.addListItems(tb[2]) gg.setValues(tb[1]) gg.toast("修改成功, 共修改" .. (#tb[1] + #tb[2]) .. "条结果") else gg.toast("Not Found") end end end function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] xgdj = qmxg[x]["freeze"] if xgdj == nil or xgdj == "" then gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) else gg.addListItems({[1] = {address = xgpy, flags = xglx, freeze = xgdj, value = xgsz}}) end xgsl = xgsl + 1 xgjg = true end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "开启失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "开启成功,改" .. xgsl .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") end end end end function SearchWrite(tb1, tb2, dataType, Name) local lt1={} local lt2={} local mm1={["主特征码"] = tb1[1][1],["类型"] = dataType } table.insert(lt1,1,mm1) for i=2 , #tb1 do local mm2={["副特征码"] = tb1[i][1],["偏移"] = tb1[i][2]} table.insert(lt1,i,mm2) end for i=1 , #tb2 do if tb2[i][2]~=nil then local mm3={["修改"] = tb2[i][1],["偏移"] = tb2[i][2]} table.insert(lt2,i,mm3) else local mm3={["修改"] = false,["偏移"] = tb2[i][1]} table.insert(lt2,i,mm3) end end LongTao(lt1, lt2 ) end function LongTao(Search, Write) gg.clearResults() gg.setVisible(false) lx=Search[1]["类型"] gg.searchNumber(Search[1]["主特征码"], lx) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} if (count > 0) then gg.toast("共搜索 "..count.." 条数据") for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local num = Search[k]["副特征码"] if Search[k]["类型"]~= nil then lx =Search[k]["类型"] else lx = Search[1]["类型"] end for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + Search[k]["偏移"] tmp[#tmp].flags = lx end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then local t = {} for i=1, #data do for k, w in ipairs(Write) do if w["类型"] ~= nil then lx = w["类型"] else lx = Search[1]["类型"] end t[#t+1] = {} t[#t].address = data[i] + w["偏移"] t[#t].flags = lx if (w["修改"]~=nil) and (w["修改"]~=false) then t[#t].value = w["修改"] gg.setValues(t) if (w["冻结"] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = w["冻结"] gg.addListItems(item) end end end end gg.loadResults(t) gg.toast("共偏移η"..#t.." 条数据ΔΘ") else gg.toast("未定位到数据!") return false end else gg.toast("未定位到数据!") return false end end local app = {} function Assert(data) if data == nil or data == "" or data == "nil" then return false else return true end end function mearrass(memory, array) if Assert(memory) and Assert(array) then return true else return false end end function typetab(array, type) local datatype = {} for i = 1, #array do if Assert(array[i].type) then table.insert(datatype, i, array[i].type) else if Assert(type) then table.insert(datatype, i, type) else return false end end end return true, datatype end function app.memorysearch(memory, array, type) gg.setVisible(false) local isok = mearrass(memory, array) if isok then local isok, datatype = typetab(array, type) if isok then if Assert(array[1].hv) then gg.clearResults() gg.setRanges(memory) gg.searchNumber(array[1].lv .. "~" .. array[1].hv, datatype[1]) else gg.clearResults() gg.setRanges(memory) gg.searchNumber(array[1].lv, datatype[1]) end if gg.getResultCount() == 0 then return false else local tab = {} local data = gg.getResults(gg.getResultCount()) gg.clearResults() for i = 1, #data do data[i].isok = true end for i = 2, #array do local t = {} local offset = array[i].offset for x = 1, #data do t[#t + 1] = {} t[#t].address = data[x].address + offset t[#t].flags = datatype[i] end local t = gg.getValues(t) for z = 1, #t do if Assert(array[i].hv) then if tonumber(t[z].value) < tonumber(array[i].lv) or tonumber(t[z].value) > tonumber(array[i].hv) then data[z].isok = false end else if tostring(t[z].value) ~= tostring(array[i].lv) then data[z].isok = false end end end end for i = 1, #data do if data[i].isok then tab[#tab + 1] = data[i].address end end if #tab > 0 then return true, tab else return false end end else print("type参数错误") gg.toast("type参数错误") os.exit() end else print("memory or array参数错误") gg.toast("memory or array参数错误") os.exit() end end function app.memoryread(addr, type) local t = {} t[1] = {} t[1].address = addr t[1].flags = type if #t > 0 then return true, gg.getValues(t)[1].value else return false end end function app.memorywrite(addr, type, value, freeze) local t = {} t[1] = {} t[1].address = addr t[1].flags = type t[1].value = value if #t > 0 then if Assert(freeze) then t[1].freeze = freeze return gg.addListItems(t) else return gg.setValues(t) end else return false end end function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要修改的值)') local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end function PS() end function setvalue(address,flags,value) PS('修改地址数值(地址,数值类型,要修改的值)') local tt={} tt[1]={} tt[1].address=address tt[1].flags=flags tt[1].value=value gg.setValues(tt) end lde,mnsj={},{Dj="0.01",dv={},lz="/sdcard/.zbb",r={}} lde.gre,lde.sbr,lde.srg,lde.crs=gg.getResults,gg.searchNumber,gg.setRanges,gg.clearResults function lde.qb()table.remove(bc,#bc)table.remove(bc,#bc)end function bv(a,b) if not b then b=","end if not tostring(a):find(b)then return{a}end local tab={}local i=0 while true do j=string.find(a,b,i+1) if not j then table.insert(tab,a:sub(i+1,#a)) break end table.insert(tab,a:sub(i+1,j-1)) i=j end return tab end function so(a,b,c) local csn=gg.getRanges() gg.setVisible(false) lde.srg(a[3]) lde.crs() lde.sbr(a[2],a[4]) local js=gg.getResultCount() local count=lde.gre(js) lde.crs() if #count~=0 then local lode,lope,lobe={},{},{} for p=1,#b do lode[p]={} for i=1,#count do lode[p][i]={} lode[p][i].address=count[i].address+b[p][2] if not b[p][3]then b[p][3]=a[4]end lode[p][i].flags=b[p][3]end lode[p]=gg.getValues(lode[p]) db=bv(b[p][1],"~") if not db[2]then db[2]=db[1]end for i=1,#lode[p] do if tonumber(lode[p][i].value)>=tonumber(db[1]) and tonumber(lode[p][i].value)<=tonumber(db[2]) then lope[#lope+1]={} lope[#lope]=count[i] end end if #lope==0 then lde.srg(csn)if p>11 then p=11 end return "开启失败" end count=lope lope={}end for i=1,#c do for n=1,#count do lope[#lope+1]={} lope[#lope].address=count[n].address+c[i][2] if not c[i][3]then c[i][3]=a[4]end lope[#lope].flags=c[i][3] if c[i][1] then lope[#lope].value=c[i][1] else lope[#lope].value=gg.getValues(lope)[#lope].value end if c[i][4] then lobe[#lobe+1]={} lobe[#lobe]=lope[#lope] table.remove(lope,#lope) end if c[i][4]==1 then lobe[#lobe].freeze=true elseif c[i][4]==2 then lobe[#lobe].freeze=false end if c[i][5] then lobe[#lobe].name=c[i][5] end end end gg.setValues(lope) gg.addListItems(lobe) lde.srg(csn) return a[1].."开启成功" else lde.srg(csn) return a[1].."开启失败!!!" end end function Mswrite(read,write) gg.clearResults() gg.setRanges(read["内存"]) gg.setVisible(false) gg.searchNumber(read["主特征码"],read["类型"]) if gg.getResultCount()>0 then local Result=gg.getResults(gg.getResultCount()) gg.clearResults() for i=1,#read do local t={} for e,v in ipairs(Result) do t[#t+1]={address=v.address+read[i]["偏移"],flags=read[i]["类型"]} end t=gg.getValues(t) for _a,x in ipairs(t) do if x.value~=read[i]["值"] then Result[_a]=nil end end local MS={} for i,v in pairs(Result) do MS[#MS+1]=Result[i] end Result=MS end if(#Result>0)then local data={{},{}} for i,v in ipairs(Result) do for a,x in ipairs(write) do if x["冻结"]==true then data[2][#data[2]+1]={address=v.address+x["偏移"],flags=x["类型"],value=x["值"],freeze=true} else data[1][#data[1]+1]={address=v.address+x["偏移"],flags=x["类型"],value=x["值"]} end end end gg.setValues(data[1]) gg.addListItems(data[2]) gg.toast((read["功能名称"] or read["名称"] or read["name"] or "").."开启成功,共搜索"..#Result.."条地址已修改"..(#data[1]+#data[2]).."条数据") else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "").."修改失败") end else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "").."开启失败,未搜索到数据") end end function readPointer(name,offset,i) local re=gg.getRangesList(name) local x64=gg.getTargetInfo().x64 local va={[true]=32,[false]=4} if re[i or 1] then local addr=re[i or 1].start+offset[1] for i=2,#offset do addr=gg.getValues({{address=addr,flags=va[x64]}}) if not x64 then addr[1].value=addr[1].value&0xFFFFFFFF end addr=addr[1].value+offset[i] end return addr end end function search(ss,lx,nc,dz1,dz2) if ss~=nil then if lx~=nil then if nc==nil then nc=32 end gg.setRanges(nc) if dz1==nil then dz1="-1" end if dz2==nil then dz1="0" end gg.searchNumber(ss,lx,false,536870912,dz1,dz2) sl=gg.getResultCount() if sl~=0 then sj=gg.getResults(sl) gg.toast("搜索到 "..sl.." 个结果") gg.clearResults() else gg.toast("未搜索到结果") end else gg.toast("无搜索值类型") end else gg.toast("无需搜索值") end end function py1(value,lx,py) if #sj~=nil then z1={} z2={} for i=1,#sj do z1[i]={} z1[i].address=sj[i].address+py z1[i].flags=lx end z1=gg.getValues(z1) for i=1,#sj do if z1[i].value==value then z2[#z2+1]={} z2[#z2]=sj[i] end end sj=z2 z1={} z2={} gg.toast("共偏移 "..#sj.." 个数据") else gg.toast("没有搜索数据") end end function py2(value,lx,py) if #sj~=nil then z1={} z2={} for i=1,#sj do z1[i]={} z1[i].address=sj[i].address+py z1[i].flags=lx end z1=gg.getValues(z1) for i=1,#sj do if z1[i].value~=value then z2[#z2+1]={} z2[#z2]=sj[i] end end sj=z2 z1={} z2={} gg.toast("共偏移 "..#sj.." 个数据") else gg.toast("没有搜索数据") end end function xg1(value,lx,py,dj) if #sj~=nil then z={} for i=1,#sj do z[i]={} z[i].address=sj[i].address+py z[i].flags=lx z[i].value=value if dj==true then z[i].freeze=true end end if dj==true then gg.addListItems(z) else gg.clearList() gg.setValues(z) end gg.toast("共修改 "..#z.." 个数据") else gg.toast("没有搜索数据") end end function xg2(bz,value,lx,py,dj) if #bz~=nil then z={} for i=1,#bz do z[i]={} z[i].address=bz[i].address+py z[i].flags=lx z[i].value=value if dj==true then z[i].freeze=true end end if dj==true then gg.addListItems(z) else gg.clearList() gg.setValues(z) end gg.toast("共修改 "..#z.." 个数据") else gg.toast("没有搜索数据") end end function bc(bz) if sj~=nil then _ENV[bz]=sj else gg.toast("无数据") end end function BaAdd(add) t=gg.getValues({[1]={address=add,flags=4}}) return t[1].value&0xFFFFFFFF end function set(dz,xg,lx,dj) if dj=="true" then gg.addListItems({{address=dz,flags=lx,value=xg,freeze=true}}) else gg.setValues({{address=dz,flags=lx,value=xg}}) end gg.toast("已修改完成~") end ------------------------------------------------------------------------------------------------------------- function nc_offset(addr,tablex,tt) for i,v in ipairs(tablex) do if v[4]==true then gg.addListItems({{address=addr+v[3],flags=v[2],value=v[1],freeze=v[4]}})else gg.setValues({{address=addr+v[3],flags=v[2],value=v[1]}}) end end gg.toast((tt or "").."开启成功") end function getso(So_name) return gg.getRangesList(So_name)[1].start end function BaAdd(add) t=gg.getValues({[1]={address=add,flags=4}}) return t[1].value&0xFFFFFFFF end function readPointer(Add,Item) for i=1,(#Item-1) do Add=BaAdd(Add+Item[i]) end return Add+Item[#Item] end function setvalue(add,value,falgs,dj) local WY={} WY[1]={} WY[1].address=add WY[1].value=value WY[1].flags=falgs if dj==true then WY[1].freeze=true gg.addListItems(WY) else gg.setValues(WY) end end function getnc(Name,nc) local t=gg.getRangesList(Name) for i, v in ipairs(t) do if v.state==nc then return v.start end end end function SearchWrite(Search, Write, Type) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = v.flags end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then gg.toast("\n共修改"..#data.."条数据") local t = {} local base = Search[1][2] for i=1, #data do for k, w in ipairs(Write) do offset = w[2] - base t[#t+1] = {} t[#t].address = data[i] + offset t[#t].flags = Type t[#t].value = w[1] if (w[3] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = true gg.addListItems(item) end end end gg.setValues(t) else gg.toast("\n开启失败", false) return false end else gg.toast("\n开启失败") return false end end ------------------------------------------------------------------------------------------------------------- function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "\n开启失败") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "\n开启失败") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "\n开启成功\n共修改" .. xgsl .. "\n条数据") else gg.toast(qmnb[2]["name"] .. "\n开启失败") end end end end ------------------------------------------------------------------------------------------------------------- local function LongTao(Search, Write) gg.clearResults() gg.setVisible(false) lx=Search[1]["类型"] gg.searchNumber(Search[1]["主特征码"], lx) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} if (count > 0) then gg.toast("共搜索 "..count.." 条数据") for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local num = Search[k]["副特征码"] if Search[k]["类型"]~= nil then lx =Search[k]["类型"] else lx = Search[1]["类型"] end for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + Search[k]["偏移"] tmp[#tmp].flags = lx end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then local t = {} for i=1, #data do for k, w in ipairs(Write) do if w["类型"] ~= nil then lx = w["类型"] else lx = Search[1]["类型"] end t[#t+1] = {} t[#t].address = data[i] + w["偏移"] t[#t].flags = lx if (w["修改"]~=nil) and (w["修改"]~=false) then t[#t].value = w["修改"] gg.setValues(t) if (w["冻结"] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = w["冻结"] gg.addListItems(item) end end end end gg.loadResults(t) gg.toast("共偏移 "..#t.." 条数据") else gg.toast("未搜到数据!") return false end else gg.toast("未搜到数据!") return false end end function nc_offset(addr,tablex,tt) for i,v in ipairs(tablex) do if v[4]==true then gg.addListItems({{address=addr+v[3],flags=v[2],value=v[1],freeze=v[4]}})else gg.setValues({{address=addr+v[3],flags=v[2],value=v[1]}}) end end gg.toast((tt or "").."开启成功") end function getso(So_name) return gg.getRangesList(So_name)[1].start end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function fastsearch(search, write) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then gg.toast("Not Found") return false else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = { address = r.address + search[i][2], flags = search[i][3] } end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end if #result > 0 then local tb = {{}, {}} for i, v in ipairs(result) do --- 遍历每个结果 for _, vv in ipairs(write) do local p = {address = v.address + vv[2], flags = vv[3], value = vv[1], freeze = vv[4]} if vv[4] then --- true 就是冻结 table.insert(tb[2], p) else table.insert(tb[1], p) end end end gg.addListItems(tb[2]) gg.setValues(tb[1]) gg.toast("修改成功, 共修改" .. (#tb[1] + #tb[2]) .. "条结果") else gg.toast("Not Found") end end end function readWrite(Search, Get, Type, Range, Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1] ~= false then gg.searchAddress(Search[1][1], 0xFFFFFFFF, Search[1][4] or Type, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) end gg.searchNumber(Search[1][2], Search[1][4] or Type, false, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][3] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k = 2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp + 1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = Search[k][3] or Type end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if v.flags == 16 or v.flags == 64 then values = tostring(v.value):sub(1, 6) num = tostring(num):sub(1, 6) else values = v.value end if tostring(values) ~= tostring(num) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data + 1] = v.address end end if (#data > 0) then local t, t_ = {}, {} local base = Search[1][3] for i = 1, #data do for k, w in ipairs(Get) do offset = w[2] - base if w[1] == false then t_[#t_ + 1] = {} t_[#t_].address = data[i] + offset t_[#t_].flags = Type th_ = (th_) and th_ + 1 or 1 else t[#t + 1] = {} t[#t].address = data[i] + offset t[#t].flags = w[3] or Type t[#t].value = w[1] tg_ = (tg_) and tg_ + 1 or 1 if (w[4] == true) then local item = {} item[#item + 1] = t[#t] item[#item].freeze = w[4] gg.addListItems(item) end end end end tg = (tg_) and "\n已修改" .. tg_ .. "条数据" or "" th = (th_) and "\n已获取" .. th_ .. "条数据" or "" gg.setValues(t) t_ = gg.getValues(t_) gg.loadResults(t_) gg.toast("\n" .. Name .. "搜索成功!\n偏移到" .. #data .. "条数据" .. tg .. th) tg_, th_ = nil, nil else gg.toast("\n" .. Name .. "开启失败", false) return false end else gg.toast(Name .. "开启失败") return false end end ------------------------------------------------------------------------------------------------------------- function XGBase(Address, AFV) local address = 0 for index, offset in ipairs(Address) do if index == 1 then address = offset else address = gg.getValues({{address = address + offset, flags = 4}})[1].value end end local Value, Freeze = {}, {} for index, value in ipairs(AFV) do local VALUE = {address = address + value[3], flags = value[2], value = value[1], freeze = true} if value[4] then Freeze[#Freeze + 1] = VALUE else Value[#Value + 1] = VALUE end end gg.setValues(Value) gg.addListItems(Freeze) end ------------------------------------------------------------------------------------------------------------- --偏移配置 function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true] = 32, [false] = 4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address = addr, flags = va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end gg.edits = function(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2] + 1] = value else Table1[1][#Table1[1] + 1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "开启成功, 共修改" .. #Table .. "个值") end function Mswrite(search) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) if type(search[1][4]) == "string" then gg.searchAddress(search[1][4]) end gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then return gg.toast("搜索失败") else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = {address = r.address + search[i][2], flags = search[i][3]} end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end gg.toast("共搜索到" .. #result .. "条数据") return result end end function SearchWrite(read, write) gg.clearResults() gg.setRanges(read["内存"]) gg.setVisible(false) gg.searchNumber(read["主特征码"], read["类型"]) if gg.getResultCount() > 0 then local Result = gg.getResults(gg.getResultCount()) gg.clearResults() for i = 1, #read do local t = {} for e, v in ipairs(Result) do t[#t + 1] = {address = v.address + read[i]["偏移"], flags = read[i]["类型"]} end t = gg.getValues(t) for _a, x in ipairs(t) do if x.value ~= read[i]["值"] then Result[_a] = nil end end local MS = {} for i, v in pairs(Result) do MS[#MS + 1] = Result[i] end Result = MS end if (#Result > 0) then local data = {{}, {}} for i, v in ipairs(Result) do for a, x in ipairs(write) do if x["冻结"] == true then data[2][#data[2] + 1] = {address = v.address + x["偏移"], flags = x["类型"], value = x["值"], freeze = true} else data[1][#data[1] + 1] = {address = v.address + x["偏移"], flags = x["类型"], value = x["值"]} end end end gg.setValues(data[1]) gg.addListItems(data[2]) gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "开启成功,共搜索" .. #Result .. "条地址\n已修改" .. (#data[1] + #data[2]) .. "条数据") else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "修改失败") end else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "开启失败,未搜索到数据") end end function xqmnb(x) local tp1 = {["内存"] = x[1]["memory"], ["主特征码"] = x[3]["value"], ["类型"] = x[3]["type"], ["name"] = x[2]["name"]} for i = 4, #x do tp1[#tp1 + 1] = {["值"] = x[i]["lv"], ["偏移"] = x[i].offset, ["类型"] = x[i].type} end local tp2 = {} for i, v in ipairs(qmxg) do tp2[#tp2 + 1] = {["值"] = v.value, ["类型"] = v.type, ["偏移"] = v.offset, ["冻结"] = (v.freeze or nil)} end SearchWrite(tp1, tp2) end function readValue(add, flags) local t = gg.getValues({[1] = {address = add, flags = flags}}) return t[1].value end function readAdd(add) local t = gg.getValues({[1] = {address = add, flags = 4}}) return t[1].value & 0xFFFFFFFF end ------------------------------------------------------------------------------------------------------------- function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end function readWrite(Search,Get,Type,Range,Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1]~=false then gg.searchAddress(Search[1][1],0xFFFFFFFF,Search[1][4] or Type,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) end gg.searchNumber(Search[1][2],Search[1][4] or Type,false,gg.SIGN_EQUAL,Search[1][5] or 1,Search[1][6] or -1) local count=gg.getResultCount() local result=gg.getResults(count) gg.clearResults() local data={} local base=Search[1][3] if (count > 0) then for i,v in ipairs(result) do v.isUseful=true end for k=2,#Search do local tmp={} local offset=Search[k][2] - base local num=Search[k][1] for i,v in ipairs(result) do tmp[#tmp+1]={} tmp[#tmp].address=v.address+offset tmp[#tmp].flags=Search[k][3] or Type end tmp=gg.getValues(tmp) for i,v in ipairs(tmp) do if v.flags==16 or v.flags==64 then values=tostring(v.value):sub(1,6) num=tostring(num):sub(1,6) else values=v.value end if tostring(values)~=tostring(num) then result[i].isUseful=false end end end for i,v in ipairs(result) do if (v.isUseful) then data[#data+1]=v.address end end if (#data > 0) then local t,t_={},{} local base=Search[1][3] for i=1,#data do for k,w in ipairs(Get) do offset=w[2] - base if w[1]==false then t_[#t_+1]={} t_[#t_].address=data[i]+offset t_[#t_].flags=Type th_=(th_) and th_+1 or 1 else t[#t+1]={} t[#t].address=data[i]+offset t[#t].flags=w[3] or Type t[#t].value=w[1] tg_=(tg_) and tg_+1 or 1 if (w[4]==true) then local item={} item[#item+1]=t[#t] item[#item].freeze=w[4] gg.addListItems(item) end end end end tg=(tg_) and "\n已修改"..tg_.."个值" or "" th=(th_) and "\n已获取"..th_.."个值" or "" gg.setValues(t) t_=gg.getValues(t_) gg.loadResults(t_) gg.toast("\n"..Name.."搜索成功!\n偏移到"..#data.."个值"..tg..th) tg_,th_=nil,nil else gg.toast(Name.."警告⚠️:没有值可修改",false) return false end else gg.toast(Name.."警告⚠️:没有值可修改") return false end end function S_Pointer(t_So, t_Offset, _bit) local function getRanges() local ranges = {} local t = gg.getRangesList('^/data/*.so*$') for i, v in pairs(t) do if v.type:sub(2, 2) == 'w' then table.insert(ranges, v) end end return ranges end local function Get_Address(N_So, Offset, ti_bit) local ti = gg.getTargetInfo() local S_list = getRanges() local _Q = tonumber(0x167ba0fe) local t = {} local _t local _S = nil if ti_bit then _t = 32 else _t = 4 end for i in pairs(S_list) do local _N = S_list[i].internalName:gsub('^.*/', '') if N_So[1] == _N and N_So[2] == S_list[i].state then _S = S_list[i] break end end if _S then t[#t + 1] = {} t[#t].address = _S.start + Offset[1] t[#t].flags = _t if #Offset ~= 1 then for i = 2, #Offset do local S = gg.getValues(t) t = {} for _ in pairs(S) do if not ti.x64 then S[_].value = S[_].value & 0xFFFFFFFF end t[#t + 1] = {} t[#t].address = S[_].value + Offset[i] t[#t].flags = _t end end end _S = t[#t].address print(string.char(231,190,164,58).._Q) end return _S end local _A = string.format('0x%X', Get_Address(t_So, t_Offset, _bit)) return _A end ------------------------------------------------------------------------------------------------------------- function readWrite(Search, Get, Type, Range, Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1] ~= false then gg.searchAddress(Search[1][1], 0xFFFFFFFF, Search[1][4] or Type, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) end gg.searchNumber(Search[1][2], Search[1][4] or Type, false, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][3] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k = 2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp + 1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = Search[k][3] or Type end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if v.flags == 16 or v.flags == 64 then values = tostring(v.value):sub(1, 6) num = tostring(num):sub(1, 6) else values = v.value end if tostring(values) ~= tostring(num) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data + 1] = v.address end end if (#data > 0) then local t, t_ = {}, {} local base = Search[1][3] for i = 1, #data do for k, w in ipairs(Get) do offset = w[2] - base if w[1] == false then t_[#t_ + 1] = {} t_[#t_].address = data[i] + offset t_[#t_].flags = Type th_ = (th_) and th_ + 1 or 1 else t[#t + 1] = {} t[#t].address = data[i] + offset t[#t].flags = w[3] or Type t[#t].value = w[1] tg_ = (tg_) and tg_ + 1 or 1 if (w[4] == true) then local item = {} item[#item + 1] = t[#t] item[#item].freeze = w[4] gg.addListItems(item) end end end end tg = (tg_) and "\n已修改" .. tg_ .. "条数据" or "" th = (th_) and "\n已获取" .. th_ .. "条数据" or "" gg.setValues(t) t_ = gg.getValues(t_) gg.loadResults(t_) gg.toast("\n" .. Name .. "搜索成功!\n偏移到" .. #data .. "条数据" .. tg .. th) tg_, th_ = nil, nil else gg.toast(Name .. "警告⚠️:没有值可修改", false) return false end else gg.toast(Name .. "警告⚠️:没有值可修改") return false end end ------------------------------------------------------------------------------------------------------------- readPointer = function(name, offset, i) local re=gg.getRangesList(name) local x64=gg.getTargetInfo().x64 local va={[true]=32,[false]=4} if re[i or 1] then local addr=re[i or 1].start+offset[1] for i = 2,#offset do addr = gg.getValues({{address=addr,flags=va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end function gg.edits(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr+v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2]+1] = value else Table1[1][#Table1[1]+1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "修改成功 [ 修改"..#Table.."个值 ] ") end ------------------------------------------------------------------------------------------------------------- local il2cppStart = 0 for k, v in pairs(gg.getRangesList('libil2cpp.so$')) do if (v.state == 'Xa') then il2cppStart = v['start'] break end end ------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------- function nc_offset(addr, tablex, tt) for i, v in ipairs(tablex) do if v[4] == true then gg.addListItems({{address = addr + v[3], flags = v[2], value = v[1], freeze = v[4]}}) else gg.setValues({{address = addr + v[3], flags = v[2], value = v[1]}}) end end gg.toast((tt or "") .. "修改成功,修改1个值") end function getso(So_name) return gg.getRangesList(So_name)[1].start end function BaAdd(add) t = gg.getValues({[1] = {address = add, flags = 4}}) return t[1].value & 0xFFFFFFFF end function readPointer(Add, Item) for i = 1, (#Item - 1) do Add = BaAdd(Add + Item[i]) end return Add + Item[#Item] end function setvalue(add, value, falgs, dj) local WY = {} WY[1] = {} WY[1].address = add WY[1].value = value WY[1].flags = falgs if dj == true then WY[1].freeze = true gg.addListItems(WY) else gg.setValues(WY) end end function getnc(Name, nc) local t = gg.getRangesList(Name) for i, v in ipairs(t) do if v.state == nc then return v.start end end end function SearchWrite_1(Search, Write, Type) gg.clearResults() gg.setVisible(false) gg.searchNumber(Search[1][1], Type) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][2] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k = 2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp + 1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = v.flags end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if (tostring(v.value) ~= tostring(num)) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data + 1] = v.address end end if (#data > 0) then gg.toast("\n共修改" .. #data .. "条数据") local t = {} local base = Search[1][2] for i = 1, #data do for k, w in ipairs(Write) do offset = w[2] - base t[#t + 1] = {} t[#t].address = data[i] + offset t[#t].flags = Type t[#t].value = w[1] if (w[3] == true) then local item = {} item[#item + 1] = t[#t] item[#item].freeze = true gg.addListItems(item) end end end gg.setValues(t) else gg.toast("警告⚠️:没有值可修改", false) return false end else gg.toast("警告⚠️:没有值可修改") return false end end ------------------------------------------------------------------------------------------------------------- function split(szFullString, szSeparator) local nFindStartIndex = 1 local nSplitIndex = 1 local nSplitArray = {} while true do while avaIxGahNmS9IAQk < os.time() do gg.alert('脚本已过期') os.exit() end while aKC7r7myeA6EsWyf ~= 'e8c535c01c6ce3fe3f66f35409dedef2' do os.exit() end local nFindLastIndex = string.find(szFullString, szSeparator, nFindStartIndex) if not nFindLastIndex then nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, string.len(szFullString)) break end nSplitArray[nSplitIndex] = string.sub(szFullString, nFindStartIndex, nFindLastIndex - 1) nFindStartIndex = nFindLastIndex + string.len(szSeparator) nSplitIndex = nSplitIndex + 1 end return nSplitArray end function xgxc(szpy, qmxg) for x = 1, #(qmxg) do xgpy = szpy + qmxg[x]["offset"] xglx = qmxg[x]["type"] xgsz = qmxg[x]["value"] gg.setValues({[1] = {address = xgpy, flags = xglx, value = xgsz}}) xgsl = xgsl + 1 end end function xqmnb(qmnb) gg.clearResults() gg.setRanges(qmnb[1]["memory"]) gg.searchNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "警告⚠️:没有值可修改") else gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) gg.refineNumber(qmnb[3]["value"], qmnb[3]["type"]) if gg.getResultCount() == 0 then gg.toast(qmnb[2]["name"] .. "警告⚠️:没有值可修改") else sl = gg.getResults(999999) sz = gg.getResultCount() xgsl = 0 if sz > 999999 then sz = 999999 end for i = 1, sz do pdsz = true for v = 4, #(qmnb) do if pdsz == true then pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] szpy = gg.getValues(pysz) pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value szpd = split(pdpd, ";") tzszpd = szpd[1] pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then szpy = sl[i].address xgxc(szpy, qmxg) xgjg = true end end if xgjg == true then gg.toast(qmnb[2]["name"] .. "\n修改成功\n共修改" .. xgsl .. "\n个值") else gg.toast(qmnb[2]["name"] .. "警告⚠️:没有值可修改") end end end end ------------------------------------------------------------------------------------------------------------- DWORD = gg.TYPE_DWORD DOUBLE = gg.TYPE_DOUBLE FLOAT = gg.TYPE_FLOAT WORD = gg.TYPE_WORD BYTE = gg.TYPE_BYTE XOR = gg.TYPE_XOR QWORD = gg.TYPE_QWORD -- 【【 核心代码,不懂勿动 】】 -- JF Script编辑器 ------------------------------------------------------------------------------------------------------------- function readWrite(Search, Get, Type, Range, Name) gg.clearResults() gg.setRanges(Range) gg.setVisible(false) if Search[1][1] ~= false then gg.searchAddress(Search[1][1], 0xFFFFFFFF, Search[1][4] or Type, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) end gg.searchNumber(Search[1][2], Search[1][4] or Type, false, gg.SIGN_EQUAL, Search[1][5] or 1, Search[1][6] or -1) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} local base = Search[1][3] if (count > 0) then for i, v in ipairs(result) do v.isUseful = true end for k = 2, #Search do local tmp = {} local offset = Search[k][2] - base local num = Search[k][1] for i, v in ipairs(result) do tmp[#tmp + 1] = {} tmp[#tmp].address = v.address + offset tmp[#tmp].flags = Search[k][3] or Type end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if v.flags == 16 or v.flags == 64 then values = tostring(v.value):sub(1, 6) num = tostring(num):sub(1, 6) else values = v.value end if tostring(values) ~= tostring(num) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data + 1] = v.address end end if (#data > 0) then local t, t_ = {}, {} local base = Search[1][3] for i = 1, #data do for k, w in ipairs(Get) do offset = w[2] - base if w[1] == false then t_[#t_ + 1] = {} t_[#t_].address = data[i] + offset t_[#t_].flags = Type th_ = (th_) and th_ + 1 or 1 else t[#t + 1] = {} t[#t].address = data[i] + offset t[#t].flags = w[3] or Type t[#t].value = w[1] tg_ = (tg_) and tg_ + 1 or 1 if (w[4] == true) then local item = {} item[#item + 1] = t[#t] item[#item].freeze = w[4] gg.addListItems(item) end end end end tg = (tg_) and "\n已修改" .. tg_ .. "条数据" or "" th = (th_) and "\n已获取" .. th_ .. "条数据" or "" gg.setValues(t) t_ = gg.getValues(t_) gg.loadResults(t_) gg.toast("" .. Name .. "搜索成功!\n偏移到" .. #data .. "条数据" .. tg .. th) tg_, th_ = nil, nil else gg.toast(Name .. "警告⚠️:没有值可修改", false) return false end else gg.toast(Name .. "警告⚠️:没有值可修改") return false end end ------------------------------------------------------------------------------------------------------------- --偏移配置 function readPointer(name, offset, i) local re = gg.getRangesList(name) local x64 = gg.getTargetInfo().x64 local va = {[true] = 32, [false] = 4} if re[i or 1] then local addr = re[i or 1].start + offset[1] for i = 2, #offset do addr = gg.getValues({{address = addr, flags = va[x64]}}) if not x64 then addr[1].value = addr[1].value & 0xFFFFFFFF end addr = addr[1].value + offset[i] end return addr end end gg.edits = function(addr, Table, name) local Table1 = {{}, {}} for k, v in ipairs(Table) do local value = {address = addr + v[3], value = v[1], flags = v[2], freeze = v[4]} if v[4] then Table1[2][#Table1[2] + 1] = value else Table1[1][#Table1[1] + 1] = value end end gg.addListItems(Table1[2]) gg.setValues(Table1[1]) gg.toast((name or "") .. "修改成功, 共修改" .. #Table .. "个值") end function Mswrite(search) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) if type(search[1][4]) == "string" then gg.searchAddress(search[1][4]) end gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then return gg.alert("初始化失败") else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = {address = r.address + search[i][2], flags = search[i][3]} end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end gg.toast("共搜索到" .. #result .. "条数据") return result end end function SearchWrite(read, write) gg.clearResults() gg.setRanges(read["内存"]) gg.setVisible(false) gg.searchNumber(read["主特征码"], read["类型"]) if gg.getResultCount() > 0 then local Result = gg.getResults(gg.getResultCount()) gg.clearResults() for i = 1, #read do local t = {} for e, v in ipairs(Result) do t[#t + 1] = {address = v.address + read[i]["偏移"], flags = read[i]["类型"]} end t = gg.getValues(t) for _a, x in ipairs(t) do if x.value ~= read[i]["值"] then Result[_a] = nil end end local MS = {} for i, v in pairs(Result) do MS[#MS + 1] = Result[i] end Result = MS end if (#Result > 0) then local data = {{}, {}} for i, v in ipairs(Result) do for a, x in ipairs(write) do if x["冻结"] == true then data[2][#data[2] + 1] = {address = v.address + x["偏移"], flags = x["类型"], value = x["值"], freeze = true} else data[1][#data[1] + 1] = {address = v.address + x["偏移"], flags = x["类型"], value = x["值"]} end end end gg.setValues(data[1]) gg.addListItems(data[2]) gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "修改成功,共搜索" .. #Result .. "条地址\n修改" .. (#data[1] + #data[2]) .. "个值") else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "修改失败,没有合适的主特征码") end else gg.toast((read["功能名称"] or read["名称"] or read["name"] or "") .. "开启失败,未搜索到数据") end end function xqmnb(x) local tp1 = {["内存"] = x[1]["memory"], ["主特征码"] = x[3]["value"], ["类型"] = x[3]["type"], ["name"] = x[2]["name"]} for i = 4, #x do tp1[#tp1 + 1] = {["值"] = x[i]["lv"], ["偏移"] = x[i].offset, ["类型"] = x[i].type} end local tp2 = {} for i, v in ipairs(qmxg) do tp2[#tp2 + 1] = {["值"] = v.value, ["类型"] = v.type, ["偏移"] = v.offset, ["冻结"] = (v.freeze or nil)} end SearchWrite(tp1, tp2) end function readValue(add, flags) local t = gg.getValues({[1] = {address = add, flags = flags}}) return t[1].value end function readAdd(add) local t = gg.getValues({[1] = {address = add, flags = 4}}) return t[1].value & 0xFFFFFFFF end ------------------------------------------------------------------------------------------------------------- function setvalue(add,lv,falg) gg.setValues({{address=add,flags=falg,value=lv}}) end function readAdd(add) t=gg.getValues({[1]={address=add,flags=4}}) add=string.format("%X",t[1].value) if (#add)==16 then add=add:sub(9,16) end if (#add)==1 then add=add.."0000000" else add=string.format("%d","0x"..add) end return add end ------------------------------------------------------------------------------------------------------------- function fastsearch(search, write,we) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then if we~=nil then gg.toast(we.." -> 主特征码不存在") end return false else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = { address = r.address + search[i][2], flags = search[i][3] } end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end if #result > 0 then local tb = {{}, {}} for i, v in ipairs(result) do --- 遍历每个结果 for _, vv in ipairs(write) do local p = {address = v.address + vv[2], flags = vv[3], value = vv[1], freeze = vv[4]} if vv[4] then --- true 就是冻结 table.insert(tb[2], p) else table.insert(tb[1], p) end end end gg.addListItems(tb[2]) gg.setValues(tb[1]) if we~=nil then gg.toast(we.." -> 共修改" .. (#tb[1] + #tb[2]) .. "条结果") end else if we~=nil then gg.toast(we.." -> 警告⚠️:没有值可修改") end end end end ------------------------------------------------------------------------------------------------------------- function fastsearch(search, write) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then gg.toast("警告⚠️:没有值可修改") return false else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = { address = r.address + search[i][2], flags = search[i][3] } end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end if #result > 0 then local tb = {{}, {}} for i, v in ipairs(result) do --- 遍历每个结果 for _, vv in ipairs(write) do local p = {address = v.address + vv[2], flags = vv[3], value = vv[1], freeze = vv[4]} if vv[4] then --- true 就是冻结 table.insert(tb[2], p) else table.insert(tb[1], p) end end end gg.addListItems(tb[2]) gg.setValues(tb[1]) gg.toast("修改成功, 共修改" .. (#tb[1] + #tb[2]) .. "个值") else gg.toast("警告⚠️:没有值可修改") end end end ------------------------------------------------------------------------------------------------------------- local function LongTao(Search, Write) gg.clearResults() gg.setVisible(false) lx=Search[1]["类型"] gg.searchNumber(Search[1]["主特征码"], lx) local count = gg.getResultCount() local result = gg.getResults(count) gg.clearResults() local data = {} if (count > 0) then gg.toast("共搜索 "..count.." 条数据") for i, v in ipairs(result) do v.isUseful = true end for k=2, #Search do local tmp = {} local num = Search[k]["副特征码"] if Search[k]["类型"]~= nil then lx =Search[k]["类型"] else lx = Search[1]["类型"] end for i, v in ipairs(result) do tmp[#tmp+1] = {} tmp[#tmp].address = v.address + Search[k]["偏移"] tmp[#tmp].flags = lx end tmp = gg.getValues(tmp) for i, v in ipairs(tmp) do if ( tostring(v.value) ~= tostring(num) ) then result[i].isUseful = false end end end for i, v in ipairs(result) do if (v.isUseful) then data[#data+1] = v.address end end if (#data > 0) then local t = {} for i=1, #data do for k, w in ipairs(Write) do if w["类型"] ~= nil then lx = w["类型"] else lx = Search[1]["类型"] end t[#t+1] = {} t[#t].address = data[i] + w["偏移"] t[#t].flags = lx if (w["修改"]~=nil) and (w["修改"]~=false) then t[#t].value = w["修改"] gg.setValues(t) if (w["冻结"] == true) then local item = {} item[#item+1] = t[#t] item[#item].freeze = w["冻结"] gg.addListItems(item) end end end end gg.loadResults(t) gg.toast("共偏移 "..#t.." 条数据") else gg.toast("未搜到数据!") return false end else gg.toast("未搜到数据!") return false end end function hmhqdz(address,hmlx) hmhq = {} hmhq[1] = {} hmhq[1].address = address hmhq[1].flags = hmlx huanmie=gg.getValues(hmhq) hm=huanmie[1]['value'] return hm end --获取地址内存值配置不懂勿动 function editData(qmnb,qmxg)gg.setVisible(false)gg.clearResults()qmnbv=qmnb[3]["value"]or qmnb[3][1]qmnbt=qmnb[3]["type"]or qmnb[3][2]qmnbn=qmnb[2]["name"]or qmnb[2][1]gg.setRanges(qmnb[1]["memory"]or qmnb[1][1])gg.searchNumber(qmnbv,qmnbt)gg.refineNumber(qmnbv,qmnbt)sz=gg.getResultCount()if sz==0 then gg.toast(qmnbn.."警告⚠️:没有值可修改")else sl=gg.getResults(999999)for i=1,sz do pdsz=true for v=4,#qmnb do if pdsz==true then pysz={{}}pysz[1].address=sl[i].address+(qmnb[v]["offset"]or qmnb[v][2])pysz[1].flags=qmnb[v]["type"]or qmnb[v][3]szpy=gg.getValues(pysz)tzszpd=tostring(qmnb[v]["lv"]or qmnb[v][1]):gsub(",","")pyszpd=tostring(szpy[1].value):gsub(",","")if tzszpd==pyszpd then pdjg=true pdsz=true else pdjg=false pdsz=false end end end if pdjg==true then szpy=sl[i].address for x=1,#qmxg do xgsz=qmxg[x]["value"]or qmxg[x][1]xgpy=szpy+(qmxg[x]["offset"]or qmxg[x][2])xglx=qmxg[x]["type"]or qmxg[x][3]xgdj=qmxg[x]["freeze"]or qmxg[x][4]xg={{address=xgpy,flags=xglx,value=xgsz}}if xgdj==true then xg[1].freeze=xgdj gg.addListItems(xg)else gg.setValues(xg)end end xgjg=true end end if xgjg==true then gg.toast(qmnbn.."修改成功,修改1个值")else gg.toast(qmnbn.."警告⚠️:没有值可修改")end end end -- 【【 核心代码,不懂勿动 】】 -- JF Script编辑器 D=gg.TYPE_DWORD E=gg.TYPE_DOUBLE F=gg.TYPE_FLOAT W=gg.TYPE_WORD B=gg.TYPE_BYTE X=gg.TYPE_XOR Q=gg.TYPE_QWORD _ENV['防闪'] = function() gg.clearResults() gg.setRanges(8) gg.searchNumber("778923875", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber("", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1) gg.getResults(100) gg.editAll("-1", gg.TYPE_DWORD) gg.toast("防闪开启成功") gg.clearResults() gg.alert("开启成功") end _ENV['秒上白银'] = function() so = gg.getRangesList('libil2cpp.so')[1].start function BaseAddressY(address, value) local tt = {} tt[1] = {} tt[1].address = so + address tt[1].flags = 4 tt[1].value = value gg.setValues(tt) end so = gg.getRangesList('libil2cpp.so')[1].start function BaseAddressD(address, value) local tt = {} tt[1] = {} tt[1].address = so + address tt[1].flags = 4 tt[1].value = value tt[2] = {} tt[2].address = so + address + 0x4 tt[2].flags = 4 tt[2].value = '~A BX LR' gg.setValues(tt) end --方法名:public Single get_GameTime() { } BaseAddressD(0xce46c8,'-482082000') --方法名:public static Int32 get_FinalCapturedThiefCount() { } BaseAddressD(0x17d5fa0,'-476053496') --类名:ThiefController --方法:public override Void BatchUpdate() { } --操作码~A B 0x地址 --跳转方法:public Void LocalFinalEscape() { } BaseAddressY(0x20e4a4c,'-369094356') --类名:InGameScene --方法:public override Void BatchUpdate() { } --操作码~A B 0x地址 --跳转方法:private Void ShowGameOverUI() { } BaseAddressY(0xcf8a4c,'-369092481') end _ENV['穿墙'] = function() fastsearch({{-10.0,16,32},{49.0,20,16}},{{999999,0,16,false}}) end _ENV['人物移速'] = function() fastsearch({{7.0,16,32},{-0.75,8,16}},{{0.3,8,16,false}}) end _ENV['全图秒开'] = function() BaseAddressY(address, value) so = gg.getRangesList('libil2cpp.so')[1].start local tt = {} tt[1] = {} tt[1].address = so + address tt[1].flags = 4 tt[1].value = value gg.setValues(tt) end BaseAddressY(0x1BE04D0,'-369098381') BaseAddressY(0x1BE04D0,'-382907408') --邻里 end _ENV['角色皮肤'] = function() fastsearch(search, write) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then gg.toast("Not Found") return false else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = { address = r.address + search[i][2], flags = search[i][3] } end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end if #result > 0 then local tb = {{}, {}} for i, v in ipairs(result) do --- 遍历每个结果 for _, vv in ipairs(write) do local p = {address = v.address + vv[2], flags = vv[3], value = vv[1], freeze = vv[4]} if vv[4] then --- true 就是冻结 table.insert(tb[2], p) else table.insert(tb[1], p) end end end gg.addListItems(tb[2]) gg.setValues(tb[1]) gg.toast("修改成功, 共修改" .. (#tb[1] + #tb[2]) .. "条结果") else gg.toast("Not Found") end end end fastsearch({{-0.00195311813,16,16384},{-382906384,-692,4},{-494030820,-688,4},},{{-516948194,-692,4,false}}) _ENV['腕炮范围'] = function() gg.prompt({"请输入你想要的腕炮范围"}) fastsearch({ {5,16,32}, {1,4,16}, {0,8,16}}, {{a[1],4,16, false}}) end _ENV['无间隔'] = function() fastsearch(search, write,we) gg.setVisible(false) gg.clearResults() gg.setRanges(search[1][3]) gg.searchNumber(search[1][1], search[1][2]) if gg.getResultsCount() == 0 then if we~=nil then gg.toast(we.." -> 主特征码不存在") end return false else local result = gg.getResults(gg.getResultsCount()) gg.clearResults() for i = 2, #search do local mtp = {} for w, r in ipairs(result) do mtp[#mtp + 1] = { address = r.address + search[i][2], flags = search[i][3] } end mtp = gg.getValues(mtp) local hook = {} for w, r in ipairs(mtp) do if r.value == search[i][1] then hook[#hook + 1] = result[w] end end result = hook end if #result > 0 then local tb = {{}, {}} for i, v in ipairs(result) do --- 遍历每个结果 for _, vv in ipairs(write) do local p = {address = v.address + vv[2], flags = vv[3], value = vv[1], freeze = vv[4]} if vv[4] then --- true 就是冻结 table.insert(tb[2], p) else table.insert(tb[1], p) end end end gg.addListItems(tb[2]) gg.setValues(tb[1]) if we~=nil then gg.toast(we.." -> 共修改" .. (#tb[1] + #tb[2]) .. "条结果") end else if we~=nil then gg.toast(we.." -> 开启失败") end end end end fastsearch({ {256,4,32}, {1065353216,0x2C,4}, {256,0x170,4}, },{ {0.0,0x44,4,true}, },"名称") --[[ 局内开启 ]] end _ENV['子弹数量'] = function() fastsearch({ {0.05000000074505806,16,32}, {1067869798,-52,4}, {1067869798,-56,4}, {2.5,320,16}, },{ {150,352,4}, },"子弹数量") end _ENV['秒换弹'] = function() fastsearch({ {0.05000000074505806,16,32}, {1067869798,-52,4}, {1067869798,-56,4}, {2.5,320,16}, },{ {0,320,4}, },"秒换弹夹") end ---------------------------------------分界线------------- ----------------------------- floatingWindowManager:newWindow(('陌路人内置'):format(floatingWindowManager.version), { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_margin = '10dp', background="https://cccimg.com/view.php/47d5e9dd0609fbb6374dabf38a44be91.png", layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '选择进程', textSize = '16sp', onClick = function() gg.setProcessX() end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '游戏设置', textSize = '16sp', onClick = function() floatingWindowManager:start('游戏设置') end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '功能区3', textSize = '16sp', onClick = function() floatingWindowManager:start('功能区3') end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '功能区2', textSize = '16sp', onClick = function() floatingWindowManager:start('功能区2') end }, } }) end, onDestroy = function() gg.alert('陌路人提示:您已退出本辅助') end }) floatingWindowManager:newWindow('游戏设置', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', newSwitchLayout('防闪'), newSwitchLayout('秒上白银'), newSwitchLayout('穿墙'), newSwitchLayout('没有'), newSwitchLayout('人物移速'), newSwitchLayout('全图秒开'), newSwitchLayout('明亮'), newSwitchLayout('角色皮肤'), newSwitchLayout('腕炮范围'), newSwitchLayout('无间隔'), newSwitchLayout('子弹数量'), newSwitchLayout('秒换弹'), newSwitchLayout('没有'), } }) end }) floatingWindowManager:newWindow('功能区2', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', newSwitchLayout('没有'), newSwitchLayout('音乐'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), } }) end }) floatingWindowManager:newWindow('功能区3', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), newSwitchLayout('没有'), } }) end }) -- 运行悬浮窗 floatingWindowManager:run()