Skip to content
This repository has been archived by the owner on Oct 14, 2018. It is now read-only.

Shell command plugin #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions plugins/bin.lua
Original file line number Diff line number Diff line change
@@ -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 <command>'},
patterns = {
'^!bin (.*)$'
},
run = run,
privileged = true
}

end