For this task, you have to follow the instructions below and find the password to Secret-Scroll.pdf.
Note: All the tasks given below should be strictly implemented using Ubuntu terminal commands only.
-
Clone this GitHub repository to your device using
git clone https://github.com/gauthamk02/TerminalHunt.git
-
Create a new directory in the same repository named
solution
. -
The password has four different parts which will be found in different steps. For the first part, solve the questions below and save the answer in a file named
part1.txt
in thesolution
directory.- i. Multiply the smallest perfect number by 44
- ii. Find the element with atomic mass equal to the previous number.
- iii. Write the atomic number of that element in the file
part1.txt
.
-
The second part of the password is stored in a file which you need to find by using the below hints.
- i. Find the HCF of 336 and 702 and navigate to that numbered folder.
- ii. From that, copy the file with the name which is the fourth digit of Pi into the
solution
directory. - iii. Now rename the file as
part2.txt
.
-
You are halfway there💫, now let's start with a few git commands. For the next part of the password, the hint to find it is there in the commit log of the repository. Find the file and copy it to the
solution
directory. Dont forget to rename the file topart3.txt
. -
Commit the work that you did till now to the
main
branch. -
The file containing the fourth and last part of the password is present on a different branch😱. Don't worry we’ll help you with this one 😊. Run the command
git branch -a
to see all the local and remote branches of the repository. Typegit checkout <branch_name>
in the terminal to switch to the new branch where <branch_name> is the name of the largest continent. This will create a local copy of that branch and switch to it. -
Cool, now that you are in the new branch, let's find the file 🔍. For that, you can use the command
find . -name <file_name>.txt
where<file_name>
is the name of the city named after the Goddess of War from Greek mythology. -
Since we found the last file, let's combine all of them to find the password🥱. But wait, the
solution
directory is in themain
branch and it doesn't have the folder with the last file🗿. That's where merging comes in. This branch can be merged withmain
and the folder with the last file will be available on themain
branch. First, go back tomain
branch using the commandgit checkout main
and for merging the branch with the file intomain
usegit merge <branch_name>
where <branch_name> is the name of the branch with the file. Now, copy the file<file-name>.txt
into the solution directory and rename it topart4.txt
. -
Finally, all the parts of the password are in one place. Now we just need to combine them to get the password and store it in a new file called
password.txt
. Navigate to thesolutions
folder and concatenate all the contents of the file into a text file calledpassword.txt
. After concatenating delete all the files exceptpassword.txt
. -
Congrats🎉, you can now open the protected PDF with the password you found. Remove any space/new-line characters from the text in
password.txt
and use it to open the PDF. For the final part of the task, create a SOLUTION.md file in youramfoss-tasks
task directory and write detailed terminal commands which you have used in each step and keep the screenshot image of the PDF at the end of the file. Also, write the Git terminal commands that you will use to push all your work to youramfoss-tasks
GitHub repository.