Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line




Download 6,34 Mb.
Pdf ko'rish
bet167/203
Sana10.01.2024
Hajmi6,34 Mb.
#134102
1   ...   163   164   165   166   167   168   169   170   ...   203
Bog'liq
Linux This Book Includes 4 Manuscripts The Underground Bible

5) Declaring variables
Variables are classic programming declarations. They are usually used to
declare a position for the data. Variables also have a type declaration known
as data types. With this, we can easily assign the type they are ought to use.
There are many data types such as int, float, string. We will discuss all of
these programming concepts in detail in the next section with examples.
6) Break
Scripting languages usually include Conditionals and loops that are used for
repetitive and logical tasks. They can be used for both of them aligned.
While doing repetitive tasks it is obvious that there should be some
endpoints for better interaction and processing. 
For this reason, shell language uses a statement called break that will stop
the task of the logic it has provided satisfies. Break statements can also be
used to print the statements using the echo command. 
Here is an example for break command:
example@ linuxwar : beep.sh
for(i=0)
x>1
y>2
if(b>2)
break:
7) Continue


In loops where a break can stop the loop at once, there is a statement called
continue that can help to switch the available loops. Suppose if there are
five loop statements in the shellcode by using continue the loops can be
interchanged. This will help to create a detailed exploiting code that can
compromise systems and do multiple cross re-checks. 
Below is an example of the continue statement: 
example@ linuxwar : beep.sh
for(i=0)
x>1
y>2
if(b>2)
continue:
8) Eval
Linux and shellcode usually consist of a lot of arguments that need to be
processed. There will be a lot of problems if strings and variables are parsed
in the same way. For this reason, a command called eval is introduced in the
bash shell. 
eval command replaces the arguments that are present with the variables
that are pointed out. You can even use eval command to parse strings into
commands for execution as shown below. 
example@ linuxwar : eval beep.s h
9) Exec
Execution is a process that is said to start the task. Every installation file is
an execution format because it starts a new system shell in the background.
Hackers should be aware of execution shells because they perform a lot of
initiation and analysis tasks. 
When the exec command is entered in the Linux command shell the screen
or the interface that we are working on refreshes out. Exec can also be used


in script files to start dependency installations as we used in the first chapter
to install kali Linux. 
This is the command that explains exec command in detail:
example@ linuxwar : exec beep.sh

Download 6,34 Mb.
1   ...   163   164   165   166   167   168   169   170   ...   203




Download 6,34 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line

Download 6,34 Mb.
Pdf ko'rish