LEVEL 5 : -file
Introduction:
Welcome to my series of wargames challenges, I am basically going through the Bandit challenge on OverTheWire and posting all the levels here. The goal on each level is usually to get the password for the next level.
Astonishment! 5 levels was what it took for OverTheWire to Stump me. A computer besting me? This just doesn’t sit well, how did a bunch of bipolar silicon chips get the better of a seasoned university student. The oxymorons dont stop and this challenge has proved that neither do morons.
Problem:
This challenge right here made no sense to me. I had no clue whether human-readable meant what it sounds like or whether there was a technical file type for it.
My approach:
The best thing I did, I think, was to just dive into bandit4 to figure out the situation. I encountered some dubious filenames...
So, I tried opening them anyways with cat but it didn’t work.
After a bit of browsing, I figured out to use the ‘file’ command to figure out whether these files are indeed readable (i.e. text based files)
Why did this work? What does the file command even do? *Refer to the next section*
Post Lab:
The main thing that I needed to know was, what is this ‘file’command. I mean, it clearly shows you the type of file that a given file is, but is that really what it does?
So I went to the counsel of ‘man pages’. File is a command that identifies the type of all files provided as an input to the command. Any type with the word text in it is a human readable file. The ‘data’ files are ones that were not recognisable by the function.
Also quick note:
The presence of the ‘-’ before the filename complicates how you can provide it as an input to the ‘cat’ command. Here are the examples that did or didn’t work. *Refer to level 2 and 3 for explanations*







