Skip to content

linuxfandudeguy/webshell

Repository files navigation

WebShell

costume1 (1)

WebShell is a browser-based Linux terminal experience designed for testing. This project was created as an experiment to see if the node.js module child_process with the export exec could power an entire terminal, and to fulfill the need for terminal technologies in the browser.

Features

  • RHEL-based terminal: The terminal uses Amazon Linux, which is based on Fedora/CentOS.
  • Browser-based: Access a fully interactive Linux terminal directly from your browser.
  • Pre-installed tools: Essential development tools and utilities are available.
  • API Access: Programmatically run commands via an API.

API

WebShell includes an API to execute commands programmatically.

Endpoint

URL: https://web-terminal-eight.vercel.app/run
Method: POST
Headers: Content-Type: application/json
Body: {"command": "your_linux_command_here"}

Example

To try it, run the following command in your system terminal if curl is installed:

curl -X POST https://web-terminal-eight.vercel.app/run -H "Content-Type: application/json" -d '{"command": "ls -l"}'

Screenshots

Terminal View

Screenshot 2024-07-31 8 46 05 AM

API View

Screenshot 2024-07-28 11 49 40 AM

Customization Commands

WebShell has a variety of commands that allow you to customize your shell to however you want.

  • setfontsize - Allows you to change the size of the text using px or em.
  • setfont - Allows you to change the font of the terminal by providing a font URL in otf or ttf.
  • setcolor - Allows you to change the background color by providing a hex code.
  • setbgcolor - Allows you to change the background color by providing a hex code.
  • setprompt - Allows you to change the prompt of the terminal admin@webshell:~$ to whatever you want.

The usage example of each command is below:

setfont https://webshell-omega.vercel.app/assets/fonts/Pixel_NES.ttf
setcolor #ff0000
setbgcolor #000000
setfontsize 16px
setprompt foo@localhost~$

How it Works

WebShell uses AWS with a Node.js runtime deployed on Vercel. The typeset command in the terminal can display the environment variables.

WebShell uses the child_process.exec export to run commands.

NOTE: WebShell Should not be used for complicated tasks due to its restrictions.

Updates

WebShell now has node.js support! Just type node and then You can run JavaScript.

Licensing

WebShell is licensed under the CC0-1.0 license.

Contact

For more information, please contact the creator.

Releases

No releases published

Packages

No packages published

Languages