Writeups OverTheWireBanditLinux

Bandit 1 Writeup - OverTheWire

Writeup for Bandit level 1 from OverTheWire: reading a file named '-'.

Contents

Wargame: Bandit

Level: 1

Category: Linux Fundamentals

Description

The password is in a file named - in the home directory. Reading it with cat - does not work because - is interpreted as stdin.

Overview

Solution

channel = connect.system("cat < -")
result = channel.recv().decode().strip()

Password

rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi

← Back to Blog