BigZip-General Skills-picoCTF WriteUp
Now yet again Pico CTF wants us to play with Linux commands. And it is getting quite interesting. Why? Because now we are going to learn how to deal with tons of files. You can't just go to each file and see what does it contain if there are hundreds of it. There must be a way to find it. And we know our old friend right? Greppy Grep.
Let us call that friend for help.
So we know how to grep a text from a output using a pipe operator. Now we will learn how to grep a text in the list of files in a directory.
Let us see the problem statement.
Unzip this archive and find the flag.
Download zip file
So the problem statement seems quite simple but surely you will be overwhelmed by the number of files it has. Extract it.
So the command we are going to use is a generic command which we must remember when we are dealing with large number of files.
We know our flag has a format of picoCTF{
Let us grep it.
└──╼ $grep -r "picoCTF"
folder_pmbymkjcya/folder_cawigcwvgv/folder_ltdayfmktr/folder_fnpfclfyee/whzxrpivpqld.txt:information on the record will last a billion years. Genes and brains and books encode picoCTF{gr3p_15_m4g1c_ef8790dc}
So here it is. What we are trying to do is using grep command with a recursive option to search this particular text which i want to fund in all the files present in the directory and all directories within recursively.
So yeah, this is indeed a magic of grep as our flag also




