In the previous chapter, we had learned about Linux essentials for hackers
in detail.
In this chapter, we will dive into one of the hacker's secrets
weapons that are scripting. There is quite
a small difference between
programmers and hackers. Programmers use scripting to build systems
whereas hackers use scripting to exploit systems.
Without creating their
scripts, a novice hacker can never become a professional Hacker but will
remain as a script kiddie who just uses other tools to crack systems. Thus,
scripting knowledge is a must in the checklist for anyone trying to master
hacking. To help you out this chapter will introduce a lot of bash scripting
concepts with real-world coding examples. Let's
have fun with some
scripting now!
First of all, we need to know about the shell in detail.
What is a Shell?
A shell is that cursor you observe when you first connect to a server using a
password or when you make yourself connected to a system using remote
desktop tools like SSH. In other words, if you want it to look solely from a
programming point of view you would be delighted because it acts just as
an interpreter between the user and system just like how an operating
system does .
But it just sends the input advises from the
user to the Linux kernel and
sends the output that is the result back to the system user.
Types of shell
There are types of shells that exist according
to the Linux official
documents. Out of both the first one stands for a GUI whereas the second
one stands for CLI.
There are a lot of shells that have been manufactured with the Distros like
Bourne shell, C shell, korne shell, and Bash shell.
Out of all different types of shells that are present bash shell is one of the
most famous that ever existed. It is pre-installed
in almost all the famous
Linux Distros. It also acts as an interceptive language that helps the Linux
kernel understand the instructions we are giving logically. In the next
section, we will look at this in detail.