Wargame: Bandit
Level: 7
Category: Linux Fundamentals
Description
The password is in data.txt next to the word millionth. The file contains millions of lines.
Overview
grepsearches for a pattern across input and prints matching lines.- Piping
grep millionth data.txtisolates the single relevant line. - The password is the second field on that line.
Solution
channel = connect.system("grep millionth data.txt")
output = channel.recv().decode().strip().split()
result = output[1]
Password
TESKZC0XvTetK0S9xNwm25STk5iWrBvP