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 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 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 local floatingWindowManager = require('floatingWindowManager') floatingWindowManager:init() -- 中断线程 local 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 json =json--调用 local g = {} g.file = gg.getFile() g.sel = nil gqlb={"请先搜索歌曲",} idb={"1010"} SN,gc=1,nil g.config = gg.getFile():gsub("%lua$", "").."cfg" function bei() g.data = loadfile("-- WSG PRO 1.0.9(109)\n"..g.config) if g.data ~= nil then g.sel = g.data() g.data = nil end if g.sel == nil then g.sel = {"请输入歌曲名","10"} end end bei() --搜索歌曲 function start(name,sl) fw=gg.makeRequest("http://music.163.com/api/search/get?s="..name.."&type=1&offset=0&total=true&limit="..sl) return fw end --歌词 --播放音乐 function play(id,name) gg.toast("正在播放音乐:"..name,true) gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3") end --停止播放 function stop() gg.toast("正在停止音乐") for i=1,100 do gg.playMusic("stop") gg.playMusic("stop") gg.playMusic("stop") end end ---- function Play(gqlb,idb) SN = gg.choice(gqlb,nil,ts) if SN == nil then XGCK =-1 else sn=gg.choice({"播放歌曲","播放并下载"},nil,"歌曲:"..gqlb[SN]) if sn == nil then end if sn == 1 then play(idb[SN],gqlb[SN]) end if sn == 2 then local XEY=gg.makeRequest("http://music.163.com/song/media/outer/url?id="..idb[SN]..".mp3").content local XEY1=gg.getFile():gsub("[^/]+$","")..gqlb[SN]..".mp3" io.open(XEY1,"w"):write(XEY) gg.alert("提示:\n\n音乐已成功下载位置:\n\n"..XEY1) end XGCK=-1 end end function zjson(jsonr) local str = jsonr -- 匹配Json Key的正则表达式 local pattern = "\"[%w]+\":" string.gsub(str, pattern, function(v) if string.find(str, v) then str = string.gsub(str, v, string.gsub(v, "\"", "")) end end) str = string.gsub(str, ":", "=") str = string.gsub(str, "%[", "{") str = string.gsub(str, "%]", "}") local data = "-- WSG PRO 1.0.9(109)\nreturn " .. str local res = load(data)() return res end function json(con) res=zjson(con) zd=res.result.songCount pd=go3-zd if pd <= 0 then else go3=zd end ts="《"..go1.."》找到"..zd.."首歌曲,当前显示"..go3.."首" gqlb={} idb={} for i=1,go3 do gqlb[i]=res.result.songs[i].name idb[i]=res.result.songs[i].id end --print(idb) end function YY998() Obtain=gg.makeRequest("https://api.uomg.com/api/rand.music?sort=热歌榜&format=json").content muchen=Obtain:match('url":"(.-)","picurl') gg.playMusic(muchen) end -----------------------------------------音乐-------------------------------------- changan = {} YoYoImpl = luajava.getYoYoImpl() vibra = context:getSystemService(Context.VIBRATOR_SERVICE) function guid() seed = {'e','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'} tb = {} for i = 1,32 do table.insert(tb,seed[math.random(1,16)]) end sid = table.concat(tb) return string.format('%s%s%s%s%s', string.sub(sid,1,8), string.sub(sid,10,12), string.sub(sid,21,22)) ..string.format('%s%s%s%s%s', string.sub(sid,1,6), string.sub(sid,21,25) ) end function 获取图片(txt) gg.toast("正在加载资源...") txt = string.url(txt,"de") txt = file.checkUrl(txt) return luajava.getBitmapDrawable(txt) end hanshu = function(v, event) local Action = event:getAction() if Action == MotionEvent.ACTION_DOWN then isMove = false RawX = event:getRawX() RawY = event:getRawY() x = mainLayoutParams.x y = mainLayoutParams.y elseif Action == MotionEvent.ACTION_MOVE then isMove = true mainLayoutParams.x = tonumber(x) + (event:getRawX() - RawX) mainLayoutParams.y = tonumber(y) + (event:getRawY() - RawY) window:updateViewLayout(floatWindow, mainLayoutParams) end end function changebg() luajava.runUiThread(function() if nowbg<#bglist then nowbg=nowbg+1 else nowbg=1 end beij=bglist[nowbg] ckou:setBackground(beij) end) end function particlelz() local webView = luajava.webView(function(webView) webView:loadData([[
]]..text3..[[