Skip to main content

Settings

Color Mode

Theme Skin

Background

Appearance preferences are saved in this browser only.

Environment

Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links

Theme & Build

Jekyll v3.10.0
Last BuildNov 24, 17:25

Page Location

Page Info

Layout default
Collection wargames
Path _wargames/leviathan/leviathan6.md
URL /wargames/leviathan/leviathan6/
Date 2026-04-07

Leviathan Level 6

Leviathan Level 6 — a program wants a four-digit code; learn to brute-force a small secret with a shell loop.

Table of Contents

Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.

There is no information for this level, intentionally.

Study guide

Level map: logged in as leviathan6, find the password for leviathan7.

What this level teaches

Automating a guessing attack on a small search space.

Key ideas

  • Search space. A four-digit code has only 10,000 possibilities.
  • Loops. A for loop with seq and printf can generate every candidate, including leading zeros.
  • Detecting success. The program behaves differently on a wrong and a right code, so your loop can stop when the output changes.

How to approach it

  1. Run the program once by hand to learn its arguments and failure behaviour.
  2. Write a loop that tries each value and prints only the interesting result.

Why it matters

It shows why short numeric codes need rate limiting, and gives you practice with shell automation for later games.