GithubHelp home page GithubHelp logo

dissh's Introduction

Discord Interactive Shell (dissh)

A discord bot capable of accessing remote shell.

src/main.js source code of the bot.
src/registering_commands.js used to register the command.

Slash Commands

Start an ssh session. After logging in for the first time, the bot will automatically save the credential.

leave the options blank and the bot will use the saved credential.

/sshd [<host> <port> <username> <password>]

Execute a command in the current ssh session.

leave the option blank to update the ssh output. (not yet implemented)

/ssh [command]

Exit the current ssh session.

/exit

Delete your saved ssh credential.

/purge

Installation Setup

Note: You must have Git, Node.js and npm installed prior to this setup.

  1. Clone the repository on your machine:
git clone https://github.com/yuan-miranda/dissh.git
  1. Download the following modules inside the dissh directory:
npm install dotenv ssh2 node-cron discord.js -y
  1. Setting up the discord bot:
  • Go to https://discord.com/developers/applications and select or create a bot.
  • Copy the Application ID. (discord bot id) image
  • On the left side panel, go to Bot section and copy the bot's token. (when its 'Reset Token', just do what it says) image
  • Scroll down and under the Privileged Gateway Intents, enable the following: image
  • And on the OAuth2 section, go to OAuth2 URL Generator, and select bot > Administrator and copy the generated url and enter it on your browser to invite your bot on the server.
  1. Create a .env file inside the src directory with the following values.
# .env contents
TOKEN=YOUR_DISCORD_BOT_TOKEN
BOT_ID=YOUR_DISCORD_BOT_ID
  1. To run the bot, execute the following commands inside the src directory.
node register_commands.js
node main.js

dissh's People

Contributors

yuan-miranda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.