Scripting Basics: Read and Change a Short Script
Read a short bash script and a short Python script that count failed logins in a log file, change one value in each, and predict what changes.
By the end of this lesson you can explain what a script is, read the shebang line, read variables, if and a loop in bash and in Python, change one value and predict the new output, and follow the one habit that keeps you safe: read a script before you run it. There is no lab in this lesson: every command is shown together with the exact result it prints. The scripts do a defender's job, counting failed logins in a small practice log file, and the only changes made are to the learner's own copies in their own home folder.
Part of these paths
Ready to start hacking?
Launch the lab in your browser. Real Kali, Ubuntu and Windows targets, guided step by step. No setup, no VM downloads.
Updated 2026-11-01