Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from util import hook
- import subprocess
- @hook.command
- def servershell(inp, chan=None):
- cleaninput = str(inp)
- #p = subprocess.Popen(inp, stdout=subprocess.PIPE)
- #result = p.communicate()[0]
- result = subprocess.check_output(cleaninput, stderr=subprocess.STDOUT, shell=True)
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement