# Bandit Level 12 → Level 13

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FHdAUE8iRxJHOfMpCG293%2Fimage.png?alt=media&#x26;token=8ffa579f-164c-4b26-ba20-a1a0a45b66e8" alt=""><figcaption></figcaption></figure>

Lets see what is inside that data.txt file:

```bash
ls
```

```bash
cat data.txt
```

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FL8JsDbZFL8lI8bTnHigr%2Fimage.png?alt=media&#x26;token=86a8b458-60a4-46e5-9f93-acfa99e0c83c" alt=""><figcaption></figcaption></figure>

It is HexDump data, we can convert it to its original shape with a tool called `xxd`, but before that we will create a new directory in the tmp directory, and copy that data.txt file to it:

```bash
mkdir /tmp/Caesar3
```

```bash
cd /tmp/Caesar3
```

```bash
cp ~/data.txt .
```

```bash
xxd -r data.txt
```

* `-r`: Revert hexdump to binary.

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2Fdx7kkQqh8FlchvKblFUR%2Fimage.png?alt=media&#x26;token=a61affd3-c077-4ce0-ba32-8f20d49bb409" alt=""><figcaption></figcaption></figure>

We redirect the output to a file, and check the type of that file:

```bash
xxd -r data.txt > file
```

```bash
file file
```

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2Fw11GBm6bRCBCy2tbYppB%2Fimage.png?alt=media&#x26;token=2f24dfb9-5e87-4343-967d-e0348e678877" alt=""><figcaption></figcaption></figure>

As we can see it is compressed with gzip, lets change the file extension to gz and decompress it, then check the file type of that file:

```bash
mv file file.gz
```

```bash
gzip -d file.gz
```

* `-d`: Decompress.

```bash
ls
```

```bash
file file
```

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2Fvijnm6gXQWlzm7Dz9I7C%2Fimage.png?alt=media&#x26;token=621fb05a-5779-4023-b7c7-aaccb440831b" alt=""><figcaption></figcaption></figure>

It is compressed with bzip2, lets change the file extension to bz2, and decompress it and check its type:

```bash
mv file file.bz2
```

```bash
bzip2 -d file.bz2
```

* `-d`: Decompress.

```bash
ls
```

```bash
file file
```

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FkydSuI8LB9x18SHIWdZD%2Fimage.png?alt=media&#x26;token=b444c1c0-d490-486e-a300-66a6e4fbf983" alt=""><figcaption></figcaption></figure>

Its again compressed with gzip, lets redo what we did above:

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FuoT8WzxhwfYLurqh4AQ8%2Fimage.png?alt=media&#x26;token=64a137f0-79a1-44d2-8d48-f015d616bd2c" alt=""><figcaption></figcaption></figure>

Now its tar archive, we can just do:

```bash
tar -xvf file
```

* `x`: Extract.
* `v`: Verbose.
* `f`: File Name.

```bash
file data5.bin
```

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FNfcxF4qhSuftKOEQHsL0%2Fimage.png?alt=media&#x26;token=e70f4a52-dd2b-40b2-b1cb-234813858002" alt=""><figcaption></figcaption></figure>

It is another tar file, so redo the previous process:

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FL1MHEUSWg0CP4OwagBUS%2Fimage.png?alt=media&#x26;token=34eb18d4-5671-4984-bc08-b92e32c72973" alt=""><figcaption></figcaption></figure>

Bzip2 again:

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FaSWKdDkkZxJcshgHcAvp%2Fimage.png?alt=media&#x26;token=5b41a3da-32a8-4323-a6db-c51f439c8aea" alt=""><figcaption></figcaption></figure>

Another tar:

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FxDQA1If5uoTMytyxGWuE%2Fimage.png?alt=media&#x26;token=ec32d596-4e45-4714-8388-7913e3b5e103" alt=""><figcaption></figcaption></figure>

Gzip:

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FheS9ntbC3IYElAPFmSWS%2Fimage.png?alt=media&#x26;token=e71fe2ba-983f-4681-ae06-5a18591bd157" alt=""><figcaption></figcaption></figure>

Finally text file, lets read it:

```bash
cat file
```

<figure><img src="https://1100854798-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F94YmDHMJbD21F4uOcvHm%2Fuploads%2FNLp1jOtqkBsRUCpgs4yR%2Fimage.png?alt=media&#x26;token=5f6bf7c9-7661-4737-b395-d4f1c1627824" alt=""><figcaption></figcaption></figure>

Here is the password for the next user.
