DAY 1 · MODULE 4

Python for Cyber Security

Learn the Python basics needed to automate security analysis.

60 minBrowser Python codingIn Progress
01 · LEARN

Understand the concept

Variables
Conditions
Loops
Functions
Lists and dictionaries
File handling
Exceptions
Modules
Why this matters

Python lets students automate repeated security-analysis tasks and understand how security tools process data.

02 · VISUALIZE

See what happens internally

Interactive visualization loads here.
03 · PRACTICAL

Perform the activity

  1. Open the browser Python lab.
  2. Modify variables and conditions.
  3. Loop over a list of ports.
  4. Print a simple service classification.
Workshop safety: Activities involving scanning, web vulnerabilities or security testing must be performed only on the assigned training target or intentionally vulnerable lab.
04 · CODE / COMMANDS

Read and understand the working example

ports = [22, 80, 443]
for port in ports:
    print(port)
Open in Browser Code Lab
05 · CHALLENGE

Prove your understanding

Modify the starter program so port 22 prints SSH, port 80 prints HTTP and port 443 prints HTTPS.

Login to Save Progress