Bash Scripting
Get introduced to Bash scripting, which is an essential skill for a pentester.
We'll cover the following
Introduction to Bash scripting
Every hacker, pentester, or system administrator must be able to write scripts that can be used in the automation of the different tasks.
The shell is an application interface between an operating system and the user. It enables the user to run commands to control the different programs in the Linux operating system. It’s also a scripting language interpreter.
For the successful creation and running of shell scripts, we need to keep in mind the following general steps:
-
Write a script as ordinary text files. Ensure that they have the
.sh
extension. Complicated and long scripts will require the use of an editor like Vim, which we discussed in a previous lesson. -
Make the script file executable by giving permissions to allow execution. This can be accomplished by using
chmod
. -
Ensure that other necessary files and dependencies are available with the proper paths.
-
Execute the script and enjoy your free time. Or read the logs.
Get hands-on with 1400+ tech skills courses.