tutorial · bandit

Bandit Level 18

Use diff to extract the one changed line between passwords.old and passwords.new.
banditdifffiles
Optional narration
Marks this level complete in your browser.

Goal

Two files exist:

  • passwords.old
  • passwords.new

The next password is the only line that changed between them.

Hints

  • diff is designed for this.
  • You’re looking for lines prefixed by < and > in diff output.
Solution (click to reveal)
  1. SSH in:
ssh bandit18@bandit.labs.overthewire.org -p 2220
  1. Compare files:
diff passwords.old passwords.new

The line present only in passwords.new is the password for Level 19.

Notes

  • If you prefer a cleaner view:
diff -u passwords.old passwords.new