0Pricing
Ethical Hacking Academy · Lesson

Script Basics

Variables and loops.

Why Bash for Security

Bash is the default shell on Linux and is everywhere a pentester goes. Scripting it lets you automate repetitive recon, chain tools, and process output without rewriting commands by hand.

This lesson covers the building blocks: shebang, variables, conditionals, and loops.

The Shebang

Every script starts with a shebang telling the system which interpreter to use. Then make the file executable and run it.

#!/bin/bash
echo 'Hello from a script'

# chmod +x script.sh
# ./script.sh

All lessons in this course

  1. Script Basics
  2. Automating Recon
  3. Parsing Output
  4. Building a Recon Tool
← Back to Ethical Hacking Academy