0

I'm doing a hacking war game called Over The Wire, here it is:

http://overthewire.org/wargames/bandit/bandit6.html

Now I got stuck, I don't think it's possible to complete that section with only the commands they give. If it's possible, please let me know. I looked up the answers for help and I'm still a little lost. What does ./-* do?

enter image description here

Even though I have the answers there, I refuse to move on until I understand it fully.

  • You are using regular expression. Go through a short regular expression tutorial and you will understand it. – g_p Sep 29 '16 at 5:18
7

Basically you are trying to know file format using file command.

file ./-*

Here, ./-* this shell glob will pick up the all files which starts from - (minus sign) and it will print the file format of the file.

In your case you are running this command to find the human readable file so that you can read password from it. You can read ASCII text file content.

More about file command:

NAME
     file — determine file type

SYNOPSIS
     file [-bcEhiklLNnprsvzZ0] [--apple] [--extension] [--mime-encoding]
          [--mime-type] [-e testname] [-F separator] [-f namefile]
          [-m magicfiles] [-P name=value] file ...
     file -C [-m magicfiles]
     file [--help]

DESCRIPTION
     This manual page documents version 5.25 of the file command.

     file tests each argument in an attempt to classify it.  There are three
     sets of tests, performed in this order: filesystem tests, magic tests,
     and language tests.  The first test that succeeds causes the file type to
     be printed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.