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 --ML防二改 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 --ML防二改 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 --ML防二改 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 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 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--ML防二改 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 --ML防二改 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 --ML防二改 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 -- 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--MENGLI防二改 -------------------------------------------------------------------------------------------------------------< function Main() MLI = gg.multiChoice({ "登录防闪",--1 "秒上白银",--2 "解锁模式",--3 "角色皮肤",--4 "道具皮肤",--5 "渲染透视",--6 "全图亮透",--7 "视野高度",--8 "人物移速",--9 "人物穿墙",--10 "人物爬墙",--11 "人物踏空",--12 "极速回血",--13 "移动开物",--14 "屏蔽指针",--15 "强制开锁",--16 "全员禁攻",--17 "金币翻倍",--18 "无视夹子",--19 "追捕破盾",--20 "医疗范围",--21 "手雷范围",--22 "倒地购物",--23 "道具冷却",--24 "变身攻击",--25 "道具满级",--26 "无限踩夹",--27 "直接逃生",--28 "逃生防烧",--29 "追捕狂暴",--30 "全图吸人",--31 "子穿射程",--32 "子弹速度",--33 "武器间隔",--34 "增加子弹",--35 "秒换弹夹",--36 "武器后座",--37 "技能数量",--38 "技能冷却",--39 "全图秒开",--40 "六格道具",--41 "退出脚本",--42 }, ML,"Cc陈") if MLI == nil then else if MLI[1]==true then a1() end if MLI[2]==true then a2() end if MLI[3]==true then a3() end if MLI[4]==true then a4() end if MLI[5]==true then a5() end if MLI[6]==true then a6() end if MLI[7]==true then a7() end if MLI[8]==true then a8() end if MLI[9]==true then a9() end if MLI[10]==true then a10() end if MLI[11]==true then a11() end if MLI[12]==true then a12() end if MLI[13]==true then a13() end if MLI[14]==true then a14() end if MLI[15]==true then a15() end if MLI[16]==true then a16() end if MLI[17]==true then a17() end if MLI[18]==true then a18() end if MLI[19]==true then a19() end if MLI[20]==true then a20() end if MLI[21]==true then a21() end if MLI[22]==true then a22() end if MLI[23]==true then a23() end if MLI[24]==true then a24() end if MLI[25]==true then a25() end if MLI[26]==true then a26() end if MLI[27]==true then a27() end if MLI[28]==true then a28() end if MLI[29]==true then a29() end if MLI[30]==true then a30() end if MLI[31]==true then a31() end if MLI[32]==true then a32() end if MLI[33]==true then a33() end if MLI[34]==true then a34() end if MLI[35]==true then a35() end if MLI[36]==true then a36() end if MLI[37]==true then a37() end if MLI[38]==true then a38() end if MLI[39]==true then a39() end if MLI[40]==true then a40() end if MLI[41]==true then a41() end if MLI[42]==true then Exit() end end MLI=1 end function a1() gg.clearResults() gg.setRanges(8) gg.searchNumber("778,923,875", 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.clearResults() gg.toast("登录防闪") end function a2() BaseAddressD(0xD16F68,'-482082000') BaseAddressD(0x10F0314,'-476053496') BaseAddressY(0x135B6E4,'-352327561') BaseAddressY(0xD24278,'-369092697') gg.toast("秒上白银") end function a3() BaseAddressD(0x10f4414,'-476053503') gg.toast("解锁模式") end function a4() BaseAddressD(0x205efbc,'-476053503') gg.toast("角色皮肤") end function a5() BaseAddressD(0x150efb4,'-476053503') gg.toast("道具皮肤") end function a6() BaseAddressF(0xDD3488,'0') gg.toast("渲染透视") end function a7() BaseAddressY(0x15d9550,'-516948194') gg.toast("全图亮透") end function a8() mm=gg.alert("视野高度","开启","关闭") if mm==1 then BaseAddressD(0x1e25270,'-482082420') gg.toast("视野高度[开启]") end if mm==2 then BaseAddressQ(0x1e25270,'-382906384') gg.toast("视野高度[关闭]") end end function a9() BaseAddressD(0x135fd08,'-482144364') gg.toast("人物移速") end function a10() fastsearch({{-10,16,32},{49.0,20,16}},{{999999,0,16}},'人物穿墙') end function a11() mm=gg.alert("人物爬墙","开启","关闭") if mm==1 then BaseAddressF(0xdece18,'-1') gg.toast("人物爬墙[开启]") end if mm==2 then BaseAddressF(0xdece18,'0.95') gg.toast("人物爬墙[关闭]") end end function a12() mm=gg.alert("人物踏空","开启","关闭") if mm==1 then BaseAddressF(0xdc7058,'10') gg.toast("人物踏空[开启]") end if mm==2 then BaseAddressF(0xdc7058,'0.08') gg.toast("人物踏空[关闭]") end end function a13() fastsearch({{4692750812789604352,32,32},{2.0,-4,16},{10.0,4,16}},{{200,-4,16},{9999,4,16}},'极速回血') end function a14() BaseAddressD(0x15e5e78,'-476053504') gg.toast("移动开物") end function a15() BaseAddressY(0x15995a8,'-369096553') gg.toast("屏蔽指针") end function a16() BaseAddressD(0x15a84a8,'-482082352') gg.toast("强制开锁") end function a17() mm=gg.alert("全员禁攻","开启","关闭") if mm==1 then BaseAddressY(0xf7cf20,'-369080078') gg.toast("全员禁攻[开启]") end if mm==2 then BaseAddressY(0xf7cf20,'-382907408') gg.toast("全员禁攻[关闭]") end end function a18() BaseAddressD(0x10f3844,'-476052411') gg.toast("金币翻倍") end function a19() BaseAddressD(0x15b8660,'-516948194') gg.toast("无视夹子") end function a20() BaseAddressD(0x361d4f4,'-476053504') gg.toast("追捕破盾") end function a21() fastsearch({{4608083138725491507,32,32},{3689348813882916864,-4,32}},{{3.6,0,64}},'医疗箱范围') end function a22() fastsearch({{4612811918334230528,32,32},{2.0,72,64}},{{3.6,72,64}},'手雷范围') end function a23() BaseAddressD(0x1a85e04,'-476053504') gg.toast("倒地购物") end function a24() BaseAddressD(0x11d178c,'-516948194') gg.toast("道具冷却") end function a25() BaseAddressD(0xf84094,'-516948194') gg.toast("变身攻击") end function a26() BaseAddressD(0x14f5718,'-476053491') gg.toast("道具满级") end function a27() BaseAddressY(0x3bba9e8,'-516948194') gg.toast("无限踩夹") end function a28() BaseAddressY(0x1356034,'-352322013') BaseAddressY(0x1356034,'-382908368') gg.toast("直接逃生") end function a29() BaseAddressD(0x1357a70,'-476053504') gg.toast("逃生防烧") end function a30() BaseAddressD(0x1357a70,'-476053503') BaseAddressA(0x1357a70,'-382908176') gg.toast("追捕狂暴") end function a31() mm=gg.alert("全图吸人","开启","关闭") if mm==1 then BaseAddressY(0xd24220,'-516948194') gg.toast("全图吸人[开启]") end if mm==2 then BaseAddressY(0xd24220,'-382908368') gg.toast("全图吸人[关闭]") end end function a32() mm=gg.alert("子穿射程","开启","关闭") if mm==1 then BaseAddressD(0xf8b390,'-476053503') gg.toast("子穿射程[开启]") end if mm==2 then BaseAddressQ(0xf8b390,'-382906384') gg.toast("子穿射程[关闭]") end end function a33() mm=gg.alert("子弹速度","开启","关闭") if mm==1 then BaseAddressF(0x242d154,'10.5') gg.toast("子弹速度[开启]") end if mm==2 then BaseAddressF(0x242d154,'0') gg.toast("子弹速度[关闭]") end end function a34() fastsearch({{256,4,32},{1065353216,44,4},{65536,232,4}},{{0,76,16,true}},'武器间隔') end function a35() fastsearch({{0.05000000075,16,32},{1067869798,-56,4},{1067869798,-52,4},{1065353216,188,4}},{{550,248,4}},'增加子弹') end function a36() fastsearch({{0.05000000075,16,32},{1067869798,-56,4},{1067869798,-52,4},{1065353216,188,4}},{{0,216,4,true}},'秒换弹夹') end function a37() BaseAddressF(0xf8cea0,'1') gg.toast("武器后座") end function a38() fastsearch({{1581114487,4,32},{-934560717,-4,4}},{{999,-44,4}},'技能数量') end function a39() fastsearch({{1581114487,4,32},{-934560717,-4,4}},{{0,-40,16},{0,-36,16}},'技能冷却') end function a40() BaseAddressY(0x1c568ec,'-369095898') BaseAddressY(0x1c568ec,'-382906896') gg.toast("") end function a41() fastsearch({{211,16,32},{4,-20,16},{70,-4,16},{26,8,16}},{{6,-16,4}},'六格道具') end function Exit() MLI=gg.alert("确定退出吗?","确定","不确定") if MLI == 1 then os.exit(print("")) end if MLI == 2 then Main() end end cs = '' while(true)do if gg.isVisible(true) then MLI=-1 gg.setVisible(false) end gg.clearResults() if MLI==-1 then Main() end end