A Bash script that connects users to OverTheWire CTF games directly from the terminal. Fetches and parses game data from JSON to list available wargames, levels, and updates in a fast, terminal-friendly interface.
| SSH Based Games |
|
WEB Based Games |
|
|---|
otw is a lightweight shell script that streamlines access to the OverTheWire wargames platform.
It provides an interactive terminal interface for selecting games and levels, automatically handling SSH connections, browser launches, and game metadata retrieval.
Designed for convenience and speed, the script supports both terminal-based and web-based wargames such as Bandit, Leviathan, Natas, and more all from a single command.
- Interactive game and level selection
- Automatic SSH login using
sshpass - Browser integration for web wargames
- Dynamic game list fetched from OverTheWire
- Optional terminal image/banner rendering with
imgcatorjp2a - Minimal dependencies and portable POSIX-style shell workflow
You should have:
bashsshsshpassrequired for wargame password authenticationjqused to fetch and parse game data from JSON$BROWSERenvironment variable pointing to your preferred browser (used by theNatasandBlackSunwargames)- Optional:
imgcat(recommended) orjp2afor rendering a nicer banner in the terminal
Launch the OverTheWire helper script:
./otwExample session:
$ ./otw
============================
: Pick Your Poison :
00 - bandit
01 - krypton
02 - leviathan
03 - natas
04 - vortex
============================
* Enter game name: bandit
: Getting game info :
* Enter level (0-34): 0
* Enter level password:
Connecting to the game...
bandit0@bandit.labs.overthewire.org's password:
* Enter game name: natas
* Enter level (0-34): 5
This automatically opens:
http://natas5.natas.labs.overthewire.org
If you have:
- Optimization suggestions
- Additional features
Feel free to open an issue or submit a pull request.
If you're also working on scripts or interested in CTFs, feel free to connect.
This project serves as:
- A fast and easy way to connect to games through the terminal
- Makes the CTFs more fun this way


