From 8beb94836c87335e9fd6b4fab60913436fca2f97 Mon Sep 17 00:00:00 2001 From: Izaya Date: Sun, 23 Apr 2017 02:47:58 +1000 Subject: [PATCH] added a more lightweight remote execution module --- modules/applications/rexec.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 modules/applications/rexec.lua diff --git a/modules/applications/rexec.lua b/modules/applications/rexec.lua new file mode 100644 index 0000000..4704d9f --- /dev/null +++ b/modules/applications/rexec.lua @@ -0,0 +1,14 @@ +reP,tREs=4,{} +s("rexec",function() + while true do + if ev[1] == "net_msg" then + local V=false + for k,v in ipairs(tREs) do if ev[2] == v then V=true end end + if ev[3] == reP and V then + ns(ev[2],ev[3],pcall(load(msg))) + end + end + C.yield() + end +end) +