This is a discord bot that allows you to run bash commands on the host machine and send files from it.
Run install.sh
script and grant it root axcess to install service and all dependencies.
pip install -r requirements.txt
Run apllication with option python3 main.py --config
to create a config file. You nead to do it set the API key and server ID.
Change path your scipt
Copy discordBashAccessor.service
to /etc/systemd/system/
.
Now we need to reload the daemon.
sudo systemctl daemon-reload
Let’s enable our service so that it doesn’t get disabled if the server restarts.
sudo systemctl enable discordBashAccessor.service
And now let’ start our service.
sudo systemctl start discordBashAccessor.service
Now our service is up and running.
There are several commands you can do to start, stop, restart, and check status.
To stop the service.
sudo systemctl stop discordBashAccessor.service
To restart.
sudo systemctl restart discordBashAccessor.service
To check status.
sudo systemctl status discordBashAccessor.service
Bot will be online when you start service.
Will run bash command o host machine and return output.
$run "bash command"
Will send file from host machine.
$file "path to file"