Today we’re covering TryHackMe’s first room in their Scripting For Pentesters series, Python Basics. In this room, we’ll be doing hands-on learning about the scripting programming language Python. Although programming isn’t required to succeed in security (or IT in general), it’s a solid skill to have in your arsenal. The purpose of the “Scripting for Pentesters” module is to show that being able to program allows you to create security tools and write quick scripts that will help aid in offensive security (as well as defending and analyzing).

In this room we’ll cover: Variables, Loops, Functions, Data Structures, If Statements, and Files, as well as write a few short scripts!

  • Facebook
  • Twitter
  • LinkedIn




Below I’m going to share with you my answers when going through the knowledge checks in the different tasks in the room. Definitely try to work through the problems as much as you can. Make sure to follow along in the video so you understand what you need to do to get the answers below. This particular room, the questions require you to do some type of coding in the code editor webpage.

Python Basics Task 2 – Hello World

  • Facebook
  • Twitter
  • LinkedIn

Python Basics Task 3 – Mathematical Operators

  • Facebook
  • Twitter
  • LinkedIn

Python Basics Task 4 – Variables and Data Types

  • Facebook
  • Twitter
  • LinkedIn

Python Basics Task 6 – (Shipping Project) Introduction to If Statements

  • Facebook
  • Twitter
  • LinkedIn

Python Basics Task 7 – Loops

  • Facebook
  • Twitter
  • LinkedIn

Python Basics Task 8 – Bitcoin Project Introduction to Functions

  • Facebook
  • Twitter
  • LinkedIn

Python Basics Task 9 – Files

  • Facebook
  • Twitter
  • LinkedIn

Network Knowledge Wrap Up

Keep an eye out as I continue to work through other TryHackMe rooms!

Here is the CompTIA Pentest+ training book bundle I used to pass my PenTest+. (Affiliate Link)

TryHackMe Python Basics room