Hello everybody and welcome to the Python crash course.
Now before we begin with actually coding our advanced backdoor in Python we need to cover some of the
basics that the that you need to know in order to begin coding your own programs.
Now this will not be a Python course since that would take too long.
What I will do is I will just briefly explain in a few videos the most important things that you need
to know in order to code in Python.
We will cover some of the basics and then after that we will go into decoding of our own backdoor.
So before we begin there are two things you will need.
If you actually skip to this part since maybe some people only got this course because of the coding
section.
So if you did that what you want to do is basically just insert a line.
We did that in the previous section in the system hacking section so you need to insert a line.
You need to have this path right here so see the route not whine.
And then if you type here unless you need to have this drive C installed right here in that drive C.
You also need to have the python.
So if you go to the drive C..
Let me just enlarge this and edit this or make this zoom in so you can see better.
You will see that right here I have Python 27 installed.
And with that Python 27 I also have installed the D pi installer module which we will use in our Kelvin
machine in order to make our programs executable and in order to make them be able to run on Windows.
So those are the things that you will need.
Basically that's the only thing that you need after that.
We will only code the program in simple nano command on air or in the Python interpreter.
So before we begin let's let me actually edit this a little bit.
So let me make this transparent background a little bit better so you can see the code better.
So if I just put it like this let's make it fully transparent and let's close this.
So what do you want to do.
Let us navigate to our directory first.
So before we actually code anything what you need to know is that there are actually Python interpreters
in terminal module or available in terminal.
So what you can do is just type your python and what this will do is it will open up the interpreter
for the python command prompt.
So here you can execute any python commands or any python program you want.
What we will use this for is basically in order to check out the syntax of a program.
So you don't have to go through the entire code in order to check out if there is some error in the
program.
What you can do is just basically just type you anything.
So a equals three which will say which will actually give the value of three to the eight.
But if you for example type A equals B it will give you an error saying name B is not defined.
So once you run our bigger code and you get for example an error it would be much easier in order to
run some of the commands right here in order to check if you specified the correct syntax for them.
So that is mostly what we will do for the Python interpreter and the programs to code will be coded
in a normal file not be y but before we begin let us actually start off with the simple instructions
or simple commands or simple basically scripts that will run in our interpreter in order to see what
we can do and what we can do.
So first thing we want to check out is the one that I already typed is actually giving a value to some
constants to some changeable.
So we gave the value to the eight equals three and if we just type your a it will give us that the value
of equals three.
But it will change the value of eight to five.
For example we type a once again APRA's now change the value of eight to five.
So this right here comment doesn't have its value anymore.
So next thing you can do is for example let me just exit this Curtis a little bit.
Make this a little bit larger and then run the Python interpreter.
Let's for example give the value to a equals five.
And value to be equals three.
So what you can do is perform any basically additions abstraction multiplication or whatever you want.
For example K plus B.
And it will give you the value of a place b or you can also type your C equals a plus b.
And what this will do is it will give the value of addition of these two numbers to value c.
So if we just type your C C has value of 8 which is the same as this command we just specified the result
of this command to be stored in this valuable so much you can also do is a divided by B which will give
you one since this is not a module.
This will only give you the times that B is consistent in a eight So five divided by three will give
you the one since three is only consistent in five one time but if you type here for example FLOAT
A equals B.
This will give you the same value but this will give you the point zero after that.
Now why this is why this does that is because it stores the value in decimal and it will give you the
same result just with the additional decimal number after it so float basically means if you just type
her any numbers and float a which would give the value of five it will print out 5.0 float to will print
out five value 3.0 or basically just three just it will add the additional dot 0 after it so that is
another thing you need to know what.
Yeah but you can do basically is also store a string so C doesn't have to be it doesn't have to be a
number for example since we specifies here that C equals A plus B which is a.
We can type here C equals.
And then we keep it a string.
So for example hello world.
And what this will do right now C won't be 8 anymore.
It will actually be a string which is hello world.
And if you just type your print c which is the command or print c it will print out the string that
is consistent in DC variable.
Now make sure to differentiate the syntax between Python 2 and Python 3.
Now they are very similar but for example for print c wouldn't really work in Python 3.
You would need to specify print and then open brackets and then C and then close brackets and then hello
world.
Now that will work in Python 2 but the syntax won't work in Python 3.
So what we will do is we will use Python 2 in this crash course.
So you can use the syntax for Python 3 I believe in python 2 both of those work.
But if you're using Python 3 Make sure to check out the correct syntax for a command that we run now.
Also some of the libraries that we need to use might not be available for Python 3 so also be aware
of that.
Now let's see what else we can do.
So we saw how we can actually add a value to a single variable.
We can add two variables and put in a third variable.
We can also check the float value of a variable.
We can also store a string in a variable but let's say for example we want to specify a value so let's
say C equals five.
Now we want to type that string equals so string is not very variable which will store a string.
This number is and then we specify the percent sign and then D and then we call the quotes.
Now what this will do is basically it will after we specify in the open brackets so-called the ports
open brackets on other percent sign and then c once you type right here whoops Let me see invalid syntax
String object is not callable
let's see
okay so.
And then we tap your string.
OK.
So just a little problem with the syntax.
What.
What this command right here will do is basically this will store a string with a value right here of
C..
So if Sievers for example 8 the string would be this number say if string what you see was three that
this b this number is three.
So this.
Percent D right here is referenced with D.
Percent see right here now.
Percent C is just referring to to put the value of c e instead of these two signs right here.
So if we were to change the value for C for example for any other value this string would be different.
So that's also another thing that you can do with python.
Now as I said before this would be just a simple crash course.
We will also cover functions and classes but we will only do them briefly so you can understand in basics
how things work.
If you want to fully understand everything you need to have some previous knowledge of python or if
you can just watch some other courses or tutorials that will teach you a little bit in depth of Python.
So let me just do a little quick right here so import os system
ops
clear.
I believe this is the command OS or it's always that system.
OK.
Just a little bit of command to clear your screen so let's see what else we can do right here.
Now there are also boolean values which can be either true or false.
But we will cover them in more detail in the next video where we actually do the loops since they are
mostly used in some of the loop parts of the code.
So we will do that in the next video.
But for now on.
Let's see how we can actually do the same previous command.
But just with string so in the previous command we saw the string equals C for just a few strings string
equals this number is then percent design.
And instead of percent D we specified to put the value of c but let's say if we want to type here for
example string 1 equals this or let's actually add our string equals.
This is a new value so let's add on normal string Hello World.
So if we just up here string these rules and put put the value of the inside of the string and what
we want to do right now you just type your string one equals and then our Quote Our string is then two
dots and then percent assign and then after that percent string.
So what this will do is same with the previous command just the percent S is referred to to a variable
that is storing a string.
So right now you can guess that the output of string 1 will be our string is hello world.
So if we just type your enter and just type your string one you will see that our string is hello world
so % D is referring to numbers and percentiles is referring to strings.
Percent F is referred to float numbers I believe.
Let me just type here so let's say the equals float or b equals 3.0 and then we type your string to
equals our number is and then percent F and then percent B.
And if you just type your string to this or print out the float no value of press of b value which will
actually add us as additional digits right here.
So make a difference between the %s percent s and percent D.
There are others as well but only for now on.
We need to know these three are basically we do not even it no default value.
We need to know the percent D and percent s so just make sure to remember that is this something that
we will use in our backdoor.
So that will be about it for these variables in this tutorial.
This is just something very simple We saw how we can actually add a value to a variable how we can print
something how we can store Strings to a variable and how we can actually print out the string with a
different variable.
So this is the example in the next video we'll cover some of the other basics for python.
Make sure that you stick with this part of the Python crash course if you don't have any previous knowledge
with Python or else you will really hardly follow the backdoor creation to do later on.
So that would be about it for this material.
I hope I see you in the next one and take care.
Bye.