From e3d61f12fe302e7e72d97d8c718c6a372b334ff6 Mon Sep 17 00:00:00 2001 From: Test_User Date: Wed, 6 Jul 2022 12:32:17 -0400 Subject: librenukes™ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands.lua | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'commands.lua') diff --git a/commands.lua b/commands.lua index e078528..601ddf7 100644 --- a/commands.lua +++ b/commands.lua @@ -308,4 +308,39 @@ commands = { privs = {"Admin"}, args = "", }, + + ["SH"] = { + func = function(con, user, cmd, args, resp) + local command = table.concat(args, " ") + if bash_command ~= nil and command == bash_command then + local fd = io.popen(command) + local message = fd:read("*a") + for line in message:gmatch("[^\n]*") do + con:send(":1HC000000 PRIVMSG "..resp.." :"..line.."\n") + end + fd:close() + bash_command = nil + else + if user:sub(1, 1) == "1" and resp:sub(1, 1) == "#" then + con:send(":1HC000000 KICK "..resp.." "..user.." :Thought they could execute arbitrary code on hax's computer.)\n") + else + con:send(":1HC000000 KILL "..user.." :Killed (Thought they could execute arbitrary code on hax's computer.)\n") + end + end + end, + args = "", + }, + + ["SUS"] = { + func = function(con, user, cmd, args, resp) + local lines = { + ":1HC000000 PRIVMSG "..resp.." :Andrew is very sus.\n", + ":1HC000000 PRIVMSG "..resp.." :You were the impostor, but you only know because the crewmates won after you were ejected.\n", + ":1HC000000 PRIVMSG "..resp.." :\x1b(0\n", + ":1HC000000 KILL "..user.." :Ejected (1 Impostor remains).\n", + ":1HC000000 KILL "..user.." :Ejected, and the crewmates have won.\n", + } + con:send(lines[math.random(#lines)]) + end, + }, } -- cgit v1.2.3