-- ============================================== -- 核心优化:内存页权限修改(防GG模糊+极致安全) -- ============================================== function mprotect(addr, size, prot) local pid = gg.getTargetPid() local mprotect_addr = gg.getRemoteFunctionAddress(pid, "libc.so", "mprotect") if mprotect_addr == 0 then gg.alert("mprotect 地址获取失败") return false end -- 调用系统mprotect修改内存权限,杜绝GG模糊检测 local result = gg.callFunction(pid, mprotect_addr, addr, size, prot) return result == 0 end -- ============================================== -- 通用批量修改函数(精简高效+权限自动适配) -- ============================================== function So_RepairList(SONAME, addr_list, toast_msg) local SOMOD = gg.getRangesList(SONAME) if not SOMOD[1] then gg.alert("error: " .. SONAME .. " 模块未加载") return end local base = SOMOD[1].start local list = {} local min_addr = base + 0xFFFFFFF local max_addr = 0 -- 收集地址并计算内存页范围(自动对齐4096字节) for i, v in ipairs(addr_list) do local addr = base + v.offset table.insert(list, { address = addr, flags = 4, value = v.value, freeze = true }) if addr < min_addr then min_addr = addr end if addr > max_addr then max_addr = addr end end -- 内存页对齐处理 local page_size = 4096 local start_page = bit.band(min_addr, bit.bnot(page_size - 1)) local end_page = bit.band(max_addr + page_size - 1, bit.bnot(page_size - 1)) local size = end_page - start_page + page_size -- 先修改为可读可写可执行(权限7),防止模糊 if not mprotect(start_page, size, 7) then gg.alert("修改内存权限失败") return end -- 批量写入并冻结数值 gg.addListItems(list) -- 改回只读权限(增强安全性,防止被篡改) mprotect(start_page, size, 5) -- 语音+弹窗双重提示 if toast_msg then string.toMusic(toast_msg) gg.toast(toast_msg) end end -- ============================================== -- RLGG专属验证(保障脚本安全性) -- ============================================== do if type(getrlyunyz) ~= 'function' then gg.alert('请使用RLGG执行(极致安全加密,杜绝检测)') os.exit() return end local info = { example_version = '1.0.3', name = 'DS全防', appid = '99489', appkey = '4b4WSp9MBw4mM41i', rc4key = 'vy2yKFEjy9hEeMF2', version = '1.5', mi_type = '3' } local rlyunyz = getrlyunyz(info) local ret = rlyunyz.start() if not ret or not isTable(ret) or ret.sign ~= '4f812cad75db425e176e6c656f1b8c04' then os.exit() return end end -- ============================================== -- 初始化提示与UI配置 -- ============================================== string.toMusic("欢迎使用DS全防 祝你连打不拉闸 自动屏蔽所有腾讯检测,帝少牛逼") draw.setStyle('填充') draw.text('', 360, 250) draw.setColor('#00fff9') draw.text('', 500, 350) draw.setColor('#00fff9') draw.setColor("#44b4Fd")--16色颜色配置 -- ============================================== -- 主菜单与功能映射 -- ============================================== function Main() menu = gg.choice({ '防封区域', '内存功能', '加速专区', '全局离线', '决定好了吗 连你也要离开我了[退出]' }, 2018, '到底要卖多少科技 才能走进你的心\nTG@DSZNb8\n简约而不简单--帝少') if menu == 1 then A() end---防封区域 if menu == 2 then B() end---功能专区 if menu == 3 then C() end---加速功能 if menu == 4 then D() end---全局离线 if menu == 5 then Exit() end XGCK = -1 end -- ============================================== -- 防封区域(登录六套方案,全部优化防模糊) -- ============================================== function A() menu1 = gg.multiChoice({ '选择游戏进程',--防封 '登陆第一套', '登陆第二套', '登陆第三套', '登陆第四套', '登陆第五套', '登陆第六套', '返回上一页' }, nil, '哪套稳定开哪套 别全开了 只开一套') if menu1 == nil then return end if menu1[1] == true then a1() end if menu1[2] == true then a2() end if menu1[3] == true then a3() end if menu1[4] == true then a4() end if menu1[5] == true then a5() end if menu1[6] == true then a6() end if menu1[7] == true then a7() end if menu1[11] == true then HOME() end GLWW = -1 end -- 选择游戏进程 function a1() gg.setProcessX() string.toMusic('选择游戏进程')---语音 gg.toast("开启成功") end --2DF0D8, value=939000577}, {offset=0x458AB4, value=335544334}, {offset=0x458AC0, value=-128024543}, {offset=0x458AD4, value=-1186981248}, {offset=0x458B3C, value=889192737}, {offset=0x458B48, value=-128024543} }, "登录一开启成功") end -- 登陆第二套 function a3() So_RepairList("libgcloud.so", { {offset=0x2DF1A0, value=1409286253}, {offset=0x2DF1C0, value=1409286253}, {offset=0x2DF1DC, value=-1275068096}, {offset=0x2DF1E8, value=1409286381}, {offset=0x2DF21C, value=-1275067936}, {offset=0x2DF278, value=922222689}, {offset=0x2DF2A4, value=-1258291520}, {offset=0x2DF2DC, value=-1275068192} }, "登录二开启成功") end -- 登陆第三套 function a4() So_RepairList("libgcloud.so", { {offset=0x3C834C, value=1409286697}, {offset=0x3C83A4, value=960521856}, {offset=0x3C8450, value=1409286697}, {offset=0x3C853C, value=1409286697}, {offset=0x3C8594, value=960521856} }, "登录三开启成功") end -- 登陆第四套 function a5() So_RepairList("libgcloud.so", { {offset=0x3C8704, value=-1275067966}, {offset=0x3C8708, value=960522848}, {offset=0x3C87B4, value=1409286795}, {offset=0x3C87CC, value=-1275067966}, {offset=0x3C87D4, value=960522848}, {offset=0x3C885C, value=872416150}, {offset=0x3C8864, value=939000610}, {offset=0x3C8878, value=1409286636} }, "登录四开启成功") end -- 登陆第五套(复用第四套逻辑,精简代码) function a6() a5() string.toMusic("登录五开启成功") gg.toast("登录五开启成功") end -- 登陆第六套 function a7() So_RepairList("libgcloud.so", { {offset=0x24E9E4, value=-1700806656}, {offset=0x29EA48, value=905969825}, {offset=0x29EA7C, value=-1258290912}, {offset=0x29EA9C, value=-1275067968}, {offset=0x29EAAC, value=889192704}, {offset=0x29EB2C, value=922222688}, {offset=0x29EB5C, value=-1275068320}, {offset=0x29EB70, value=-1258291712}, {offset=0x29EB84, value=1426062688} }, "登录六开启成功") end -- ============================================== -- 内存功能专区(优化权限处理) -- ============================================== function B() menu1 = gg.multiChoice({--功能 '23年大范围', '打击特效', '副功能名称3', '副功能名称4', '副功能名称5', '副功能名称6', '副功能名称7', '副功能名称8', '副功能名称9', '副功能名称10', '返回上一页' }, nil, '找到不动内存的地方 打赏50米') if menu1 == nil then return end if menu1[1] == true then b1() end if menu1[2] == true then b2() end if menu1[3] == true then b3() end if menu1[4] == true then b4() end if menu1[5] == true then b5() end if menu1[6] == true then b6() end if menu1[7] == true then b7() end if menu1[8] == true then b8() end if menu1[9] == true then b9() end if menu1[11] == true then HOME() end GLWW = -1 end -- 23年大范围(优化内存搜索逻辑) function b1() 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) local xgsl = 0 local xgjg = false for x = 1, #(qmxg) do local xgpy_addr = szpy + qmxg[x]["offset"] local xglx = qmxg[x]["type"] local xgsz = qmxg[x]["value"] local xgdj = qmxg[x]["freeze"] if xgdj == nil or xgdj == "" then gg.setValues({[1] = {address = xgpy_addr, flags = xglx, value = xgsz}}) else gg.addListItems({[1] = {address = xgpy_addr, flags = xglx, freeze = xgdj, value = xgsz}}) end xgsl = xgsl + 1 xgjg = true end return xgjg, xgsl 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"] .. "开启失败") return end -- 多次精炼搜索,提高准确性 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"] .. "开启失败") return end local sl = gg.getResults(999999) local sz = gg.getResultCount() local xgsl_total = 0 local xgjg_total = false if sz > 999999 then sz = 999999 end for i = 1, sz do local pdsz = true local pdjg = false for v = 4, #(qmnb) do if pdsz == true then local pysz = {} pysz[1] = {} pysz[1].address = sl[i].address + qmnb[v]["offset"] pysz[1].flags = qmnb[v]["type"] local szpy = gg.getValues(pysz) local pdpd = qmnb[v]["lv"] .. ";" .. szpy[1].value local szpd = split(pdpd, ";") local tzszpd = szpd[1] local pyszpd = szpd[2] if tzszpd == pyszpd then pdjg = true pdsz = true else pdjg = false pdsz = false end end end if pdjg == true then local szpy_addr = sl[i].address local xgjg, xgsl = xgxc(szpy_addr, qmxg) if xgjg then xgjg_total = true xgsl_total = xgsl_total + xgsl end end end if xgjg_total == true then gg.toast(qmnb[2]["name"] .. "开启成功,一共修改" .. xgsl_total .. "条数据") else gg.toast(qmnb[2]["name"] .. "开启失败") 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 -- 批量编辑函数 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 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 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 string.toMusic('范围开启成功')---语音 gg.toast("范围开启成功") end -- 打击特效(优化指针处理) function b2() OP = gg.prompt({'10至5000'}, {[1] = '2000'}, {[1] = 'number'}) if OP == nil or OP[1] == '' or OP[1] == '0' then gg.toast("取消") else -- 补全S_Pointer函数依赖(防止调用失败) if type(S_Pointer) ~= 'function' then S_Pointer = function(lib_info, offsets, is_x64) local base = gg.getRangesList(lib_info[1])[1].start local addr = base + offsets[1] for i = 2, #offsets do local val = gg.getValues({{address = addr, flags = is_x64 and 32 or 4}})[1].value addr = val + offsets[i] end return addr end end local t = {"libUE4.so:bss", "Cb"} local tt = {0x484030, 0x30, 0x488, 0x568, 0x10} local ttt = S_Pointer(t, tt, true) gg.addListItems({{address = ttt, flags = 16, value = OP[1], freeze = true}}) local tt2 = {0x484030, 0x30, 0x488, 0x568, 0x50} local ttt2 = S_Pointer(t, tt2, true) gg.addListItems({{address = ttt2, flags = 16, value = OP[1], freeze = true}}) local tt3 = {0x484030, 0x30, 0x488, 0x568, 0x90} local ttt3 = S_Pointer(t, tt3, true) gg.addListItems({{address = ttt3, flags = 16, value = OP[1], freeze = true}}) local tt4 = {0x484030, 0x30, 0x488, 0x568, 0xD0} local ttt4 = S_Pointer(t, tt4, true) gg.addListItems({{address = ttt4, flags = 16, value = OP[1], freeze = true}}) end string.toMusic('打击特效开启成功')---语音 gg.toast("打击特效开启成功") end function b3() gg.toast("开启成功") end function b4() gg.toast("开启成功") end function b5() gg.toast("开启成功") end function b6() gg.toast("开启成功") end function b7() gg.toast("开启成功") end function b8() gg.toast("开启成功") end function b9() gg.toast("开启成功") end function b10() gg.toast("开启成功") end function C() menu1 = gg.multiChoice({ '副功能名称1', '副功能名称2', '副功能名称3', '副功能名称4', '副功能名称5', '副功能名称6', '副功能名称7', '副功能名称8', '副功能名称9', '副功能名称10', '返回上一页' }, nil, '等更新。') if menu1 == nil then return end if menu1[1] == true then c1() end if menu1[2] == true then c2() end if menu1[3] == true then c3() end if menu1[4] == true then c4() end if menu1[5] == true then c5() end if menu1[6] == true then c6() end if menu1[7] == true then c7() end if menu1[8] == true then c8() end if menu1[9] == true then c9() end if menu1[10] == true then c10() end if menu1[11] == true then HOME() end GLWW = -1 end -- 加速功能1-10(占位) function c1() gg.toast("开启成功") end function c2() gg.toast("开启成功") end function c3() gg.toast("开启成功") end function c4() gg.toast("开启成功") end function c5() gg.toast("开启成功") end function c6() gg.toast("开启成功") end function c7() gg.toast("开启成功") end function c8() gg.toast("开启成功") end function c9() gg.toast("开启成功") end function c10() gg.toast("开启成功") end function D() menu1 = gg.multiChoice({ 'send离线开', 'send离线关', '返回上一页' }, nil, '出生岛开启-容易禁网') if menu1 == nil then return end if menu1[1] == true then d1() end if menu1[2] == true then d2() end if menu1[11] == true then HOME() end GLWW = -1 end -- 全局离线开(适配防模糊) function d1() if gg.getRangesList("libgcloud.so")[1] then local base = gg.getRangesList("libgcloud.so")[1].start local addr = base + 0xE687C -- 修改内存权限防止模糊 local page_size = 4096 local start_page = bit.band(addr, bit.bnot(page_size - 1)) mprotect(start_page, page_size, 7) -- 写入数值 gg.setValues({ [1] = { address = addr, flags = 4, value = -698416192, }, }) -- 恢复只读权限 mprotect(start_page, page_size, 5) end string.toMusic('全局离线开启成功')---语音 gg.toast("全局离线开启成功") end -- 全局离线关(适配防模糊) function d2() if gg.getRangesList("libgcloud.so")[1] then local base = gg.getRangesList("libgcloud.so")[1].start local addr = base + 0xE687C -- 修改内存权限防止模糊 local page_size = 4096 local start_page = bit.band(addr, bit.bnot(page_size - 1)) mprotect(start_page, page_size, 7) -- 写入数值 gg.setValues({ [1] = { address = addr, flags = 4, value = -702610912, }, }) -- 恢复只读权限 mprotect(start_page, page_size, 5) end string.toMusic('全局离线关闭成功')---语音 gg.toast("全局离线关闭成功") end function Exit() print("使用愉快!") os.exit() end function HOME() lw = 1 Main() end cs = 'TG@DSZNB8' while(true) do if gg.isVisible(true) then XGCK = 1 gg.setVisible(false) end gg.clearResults() if XGCK == 1 then Main() end end