Skip to content

YoussefMAbbas/otw-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OverTheWire Banner

OverTheWire CLI a cooler way to connect to wargames

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 ssh_preview gif WEB Based Games web_preview gif

📑 Table of Contents


📌 About OTW-CLI

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.

Features

  • 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 imgcat or jp2a
  • Minimal dependencies and portable POSIX-style shell workflow

📋 Prerequisites

You should have:

  • bash
  • ssh
  • sshpass required for wargame password authentication
  • jq used to fetch and parse game data from JSON
  • $BROWSER environment variable pointing to your preferred browser (used by the Natas and BlackSun wargames)
  • Optional: imgcat (recommended) or jp2a for rendering a nicer banner in the terminal

🚀 Usage Example

Launch the OverTheWire helper script:

./otw

Example 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:

For a web-based games

* Enter game name: natas
* Enter level (0-34): 5

This automatically opens:

http://natas5.natas.labs.overthewire.org

🤝 Contributing

If you have:

  • Optimization suggestions
  • Additional features

Feel free to open an issue or submit a pull request.


💬 Connect With Me

If you're also working on scripts or interested in CTFs, feel free to connect.

Medium LinkedIn Protonmail


⭐ Why This Repository Exists

This project serves as:

  • A fast and easy way to connect to games through the terminal
  • Makes the CTFs more fun this way

About

A Bash script that connects users to OverTheWire CTF games directly from the terminal. Fetches and parses game data from the site API to list available wargames, levels, and updates in a fast, terminal-friendly interface.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages