From 69222a4bd0585ffdbfd1a749335fdc1778c68ea4 Mon Sep 17 00:00:00 2001 From: topkecleon Date: Sun, 6 Dec 2015 15:56:19 -0500 Subject: [PATCH] Shell command plugin --- plugins/bin.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 plugins/bin.lua diff --git a/plugins/bin.lua b/plugins/bin.lua new file mode 100644 index 00000000..ff2ee036 --- /dev/null +++ b/plugins/bin.lua @@ -0,0 +1,28 @@ +--[[ + binsh by NXij + https://github.com/NXij/binsh/ + https://github.com/topkecleon/binsh/ + + Shell output for telegram-bot. + + Warning: This plugin interfaces with your operating system. Even without root privileges, a bad command can be harmful. +]]-- + +do + + function run(msg, matches) + return io.popen(matches[1]):read('*all') + end + + return { + description = 'Run a system command.', + usage = {'!bin '}, + patterns = { + '^!bin (.*)$' + }, + run = run, + privileged = true + } + +end +