Tags: misc invaders zip mj0ln1r 

Rating:

# pits-of-tartarus
This tar is a hundrends of recompressions of tar.gz

So, I run this command to loop over all the compressions in it and extract the files.

```sh
mj0ln1r@Linux:~/misc$ for i in {834..1}; do tar -xf file$i.tar.gz; rm file$i.tar.gz; done
mj0ln1r@Linux:~/misc$ ls
file0.tar.gz
```
The above command will extract the zips and deletes it prior zip to make directory clean. As we can see now `file0.tar.gz` is the last one left.

Again this `file0.tar.gz` contains zips from file-1.tar.gz, and so on. So i extracted file0.tar.gz just one time then modified above command lil bit to extract this sequece of tars.

```sh
mj0ln1r@Linux:~/misc$ tar -xf file0.tar.gz
mj0ln1r@Linux:~/misc$ ls
file-1.tar.gz
mj0ln1r@Linux:~/misc$ for i in {1..833}; do tar -xf file-$i.tar.gz; rm file-$i.tar.gz; done
tar: file-390.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
mj0ln1r@Linux:~/misc$ ls
file.txt
mj0ln1r@Linux:~/misc$ cat file.txt
jctf{N0t_$tuck_in_tHe_t@r}
```
I assumed that there will be again 834 zips so I tried the above loop. But actually there were only `389` tars. Eventhough the above command extracted the file that we want but returned some error. The flag is present in `file.txt`

> `Flag : jctf{N0t_$tuck_in_tHe_t@r}`

## [Original Writeup](https://themj0ln1r.github.io/posts/jerseyctf23)

Original writeup (https://themj0ln1r.github.io/posts/jerseyctf23).