Witty - An unsafe web server to export shell to web

Related tags

DevOps Tools witty
Overview

WiTTY: Web-based interactive TTY

This program allows you to use terminal in the browser. Simply run the program and give it the command to execute when users connect via the browser. Interestingly, it allows others to view your interactive sessions as well. This could be useful to provide remote support and/or help. You can use the program to run any command line programs, such as bash, htop, vi, ssh. This following screenshot shows that six interactive session running zsh on macOS Monterey.

To use the program, you need to provide a TLS cert. You can request a free Let's Encrypt cert or use a self-signed cert. The program currently does not support user authentication. Therefore, do not run it in untrusted networks or leave it running. A probably safe use of the program is to run ssh. Please ensure that you do not automatically login to the ssh server (e.g., via key authentication).

AGAIN, Do NOT run this in an untrusted network. You will expose your shell to anyone that can access your network and Do NOT leave the server running.

This program is written in the go programming language, using the Gin web framework, gorilla/websocket, pty, and the wonderful xterm.js! The workflow is simple, the client will initiate a terminal window (xterm.js) and create a websocket with the server, which relays the data between pty and xterm. You can customize the look and feel of the HTML pages by editing files under the assets directory.

Installation

  1. Install the go compiler.

  2. Download the release and unzip it, or clone the repo

    git clone https://github.com/syssecfsu/witty.git

  3. Go to the tls directory and create a self-signed cert

    # Generate a private key for a curve

    openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem

    # Create a self-signed certificate

    openssl req -new -x509 -key private-key.pem -out cert.pem -days 360

  4. Return to the root directory of the source code and build the program

    go build .

  5. Start the server and give it the command to run. The server listens on 8080, for example:

    ./witty htop or

    ./witty ssh <your_server_ip> -l <user_name>

  6. Connect to the server, for example

    https://your_ip_address:8080

The program has been tested on Linux, WSL2, Raspberry Pi 3B (Debian), and MacOSX using Google Chrome, Firefox, and Safari.

An Screencast featuring an older version of WiTTY

Here is a screencast for sshing into Raspberry Pi running pi-hole (./witty ssh 192.168.1.2 -l pi, WiTTY runs in a WSL2 VM on Windows):

Issues
Releases(v0.6.0)
  • v0.6.0(Jan 22, 2022)

  • v0.5.0(Jan 19, 2022)

    Major new feature: the replay control (range) can now be dragged. The terminal will update accordingly. To limit screen flicks, the event is rate-limited to twice per second.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Jan 18, 2022)

  • v0.4.0(Jan 17, 2022)

    Most changes are under the hood. This release adds asynchronous refresh of the index.html page, which lists the current live and save sessions. Index.html page generally does not know whether a live session ends or not. It thus pulls the server from time to time for this info. Previously, this is done through a forced whole-page refresh, which loses the current active tab, not good. Now, it fetches the page with ajax.

    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Jan 17, 2022)

  • v0.2.3(Jan 12, 2022)

  • v0.1.0(Jan 8, 2022)

Go implement for Genshin Gacha Export

README Build on Windows 执行命令 env GOOS=windows GOARCH=amd64 go build 测试在 windows 11 上通过 使用 确保在原神游戏中打开一次祈愿记录. 然后双击运行 GenshinGachaExport.exe. 它将会在当前目录下生成

Wang Zhenduo 0 Nov 26, 2021
Export Prometheus metrics from journald events using Prometheus Go client library

journald parser and Prometheus exporter Export Prometheus metrics from journald events using Prometheus Go client library. For demonstration purposes,

Mike Sgarbossa 0 Jan 3, 2022
Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using HPE Smart Storage Administrator tool

hpessa-exporter Overview Openshift's hpessa-exporter allows users to export SMART information of local storage devices as Prometheus metrics, by using

Shachar Sharon 0 Jan 17, 2022
webhook is a lightweight incoming webhook server to run shell commands

What is webhook? webhook is a lightweight configurable tool written in Go, that allows you to easily create HTTP endpoints (hooks) on your server, whi

Adnan Hajdarević 7.4k Jan 22, 2022
Shell script to download and set GO environmental paths to allow multiple versions.

gobrew gobrew lets you easily switch between multiple versions of go. It is based on rbenv and pyenv. Installation The automatic installer You can ins

Nick Robinson 186 Jan 1, 2022
Making it easy to write shell-like scripts in Go

import github.com/bitfield/script What is script? script is a Go library for doing the kind of tasks that shell scripts are good at: reading files, ex

John Arundel 2k Jan 10, 2022
Go version manager. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.

gobrew Go version manager Install or update With curl $ curl -sLk https://git.io/gobrew | sh - or with go $ go get -u github.com/kevincobain2000/gobre

Pulkit Kathuria 69 Jan 9, 2022
Censors or hides shell / Bash / console output based on defined patterns - great for hiding secrets in demos!

censor-shell Installation go install Usage Make the file ~/.censor-shell as an INI file with the following content: [nameofmyreplacement] pattern = b

Ian Mckay 34 Jan 4, 2022
Github Cloud Shell

GitHub Shell ghsh (or Github shell) is a command line tool available for windows, linux and macos that lets you use github as a shell. It is not anoth

Soubik Bhui 3 Jan 3, 2022
toghsh translates github actions workflows to shell scripts

togsh - extracts shell commands from github actions workflows toghsh is a helper tool to translate github action workflows into equivalent shell scrip

Francesco Romani 1 Nov 16, 2021
Execute multiple shell commands like Docker-Compose

parx parx is a simple tool to run multiple commands in parallel while having the output structured like Docker Compose does that. This is useful when

Tobias B. 6 Dec 24, 2021
Kubernetes OS Server - Kubernetes Extension API server exposing OS configuration like sysctl via Kubernetes API

KOSS is a Extension API Server which exposes OS properties and functionality using Kubernetes API, so it can be accessed using e.g. kubectl. At the moment this is highly experimental and only managing sysctl is supported. To make things actually usable, you must run KOSS binary as root on the machine you will be managing.

Mateusz Gozdek 3 May 19, 2021
Gemini server running on the dailybuild server

#dailybuild notice This is the titan2 repo for the dailybuild server. It the static binary is built in a GitHub runner and sent over to the dailybuild

null 0 Nov 26, 2021
Go-http-server-docker - Simple sample server using docker and go

go-http-server-docker Simple sample webserver using docker and go.

null 0 Jan 8, 2022
A web server for managing VirtualBox vms remotely(using VirtualBox CLI: vboxmanage)

VirtualBox-Manager A simple http server(using echo) and virtualbox wrapper for controlling virtualbox vms remotly. available commands: status on off s

Mohammad ebrahim Adibzadeh 6 Dec 26, 2021
Small and easy server for web-hooks to deploy software on push from gitlab/github/hg and so on

Deployment mini-service This mini web-server is made to deploy your code without yaml-files headache. If you just need to update your code somewhere a

Roman Usachev 9 Aug 31, 2021
A Go based deployment tool that allows the users to deploy the web application on the server using SSH information and pem file.

A Go based deployment tool that allows the users to deploy the web application on the server using SSH information and pem file. This application is intend for non tecnhincal users they can just open the GUI and given the server details just deploy.

Jobin Jose 1 Oct 16, 2021
Reporting tool for djobi: web server, email, prometheus

Generate report, of Djobi®© pipeline runs. Requirement go docker Usage Env. variables TINTIN_PIPELINES_URLS URL to pipelines definitions (git) TINTIN_

null 0 Dec 14, 2021
Amazeful web backend server for golang

Amazeful-Backend The all new Amazeful-Backend written in GoLang using Chi. To re

Amazeful 1 Jan 10, 2022