From 44cbe584865fe3874b00bef087190e1560bd4bf0 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 14 Jul 2021 16:19:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E6=96=B0=E5=A2=9Esu?= =?UTF-8?q?do(su)=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 9d695fff..4d3e8051 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -12,6 +12,7 @@ log{C.lC,"©2021 26F Studio some rights reserved"} log{C.dR,"DO NOT RUN ANY CODE YOU DON'T UNDERSTAND"} local history,hisPtr={"?"} +local sudomode=false local the_secret=(14^2*10)..(2*11) local commands={}do @@ -630,6 +631,28 @@ local commands={}do end, description="Reset all things.", } + commands.sudo={ + code=function(code) + if sudomode then + local success,result=pcall(loadstring(code)) + if success then + if result~=nil then + log{C.lG,">> "..tostring(result)} + else + log{C.lG,"done"} + end + else + log{C.R,result} + end + elseif code=="7126"then + sudomode=true + log{C.Y,"* SUDO MODE ON, DO NOT RUN ANY CODE YOU DON'T UNDERSTAND *"} + log{C.Y,"* 最高权限模式开启, 请不要执行任何自己不懂确切含义的代码 *"} + else + log{C.Y,"Password not correct"} + end + end, + }commands.su="sudo" --Game commands.rmconf={