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.shAll lessons in this course
- Script Basics
- Automating Recon
- Parsing Output
- Building a Recon Tool