💻
Ashish Khairnar
  • #whoami
  • Exam Reviews
    • Certified Red Team Professional Exam
  • OverTheWire
    • Bandit
      • Bandit Level 0
      • Bandit Level 0 → Level 1
      • Bandit Level 1 → Level 2
      • Bandit Level 2 → Level 3
      • Bandit Level 3 → Level 4
    • Natas
      • Natas Level 2 → Level 3
      • Natas Level 3 -> Level 4
      • Natas Level 4 -> Level 5
      • Natas Level 5 -> Level 6
      • Natas Level 6 -> Level 7
      • Natas Level 7 -> Level 8
      • Natas Level 8 -> Level 9
  • TryHackMe - Write-ups
    • TryHackMe - Vulnnet
  • HackTheBox - Writeups
    • HTB - ScriptKiddie
Powered by GitBook
On this page

Was this helpful?

  1. OverTheWire
  2. Bandit

Bandit Level 2 → Level 3

Skills: Reading filenames with spaces

#Login details:

Username - bandit2
Password - CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

#SSH Command:

ssh bandit2@bandit.labs.overthewire.org -p 2220

On login, we see following file -

bandit2@bandit:~$ ls
spaces in this filename <---- Output

Spaces in Linux and Windows are considered as a part of command. We can escape it by specifying file name in quotes or escape each space with backslash character.

bandit2@bandit:~$ cat spaces\ in\ this\ filename 
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

#OR

bandit2@bandit:~$ cat "spaces in this filename" 
UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK

PreviousBandit Level 1 → Level 2NextBandit Level 3 → Level 4

Last updated 4 years ago

Was this helpful?