TryHackMe Write-up: Intro to Python


This is my write up for TryHackMe’s Intro To Python. Unlike other rooms I have written about, this is actually an introductory tutorial on Python. With that being said, this room is composed of reading materials and quiz type questions. Given this, we will be tackling “Tasks” with questions.

[Task 3] Mathematical Operators

This task discusses the math operators and symbols commonly used in Python. Answers for this task can be solved simply by reading the accompanying reading material.

[Task 5] Variables and Data Types

This task discusses the variables and the common data types variables can be specified as. Just like Task 3, the answers for this task can be solved by understanding the reading material.

[Task 12] Challenge Time!

As the name implies, this task is where we get to apply everything taught in the earlier tasks.

Reading the above task, we determine the following facts:

  1. We need to use python’s base64 library to decode the contents of the file “encoded_flag.txt”.
  2. The original (non-encoded/readable) data was encoded 15 times before it was written to the file.

Given this, we need to do the following:

  1. Open the file.
  2. Read the file contents.
  3. Decode the contents.
  4. Print the decoded data.

In order to decode, we need to do decode by following how it encoding was done, but in reverse. So the decoding order should be:

  1. Base 16 decode 5 times
  2. Base 32 decode 5 times
  3. Base 64 decode 5 times

Given that the earlier tasks discussed Python3, we will use Python3 for the decoder script.

Running the script, we are able to get the decoded message:




I like breaking stuff.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Network Configuration: What is this and it’s Importance?

how to code like a navy seal and be result oriented.

How Much Does it Cost to Develop an App: The Definitive Guide


Keep3r is Now Listed on Poloniex

Intro to Robotic Process Automation

Using Terraform to enable automatic tuning mode in an individual Azure SQL Database

How to set up multi-broker Kafka cluster on AWS EC2

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I like breaking stuff.

More from Medium

picoCTF: Python Wrangling

Python for Pentesters-TryHackMe Write-Up

AgentSudo Write-Up: TryHackMe Machine Walk-through

Pickle Rick TryHackMe