1 00:00:00,150 --> 00:00:03,600 Hello everybody and welcome to the Python crash course. 2 00:00:03,600 --> 00:00:09,240 Now before we begin with actually coding our advanced backdoor in Python we need to cover some of the 3 00:00:09,240 --> 00:00:15,630 basics that the that you need to know in order to begin coding your own programs. 4 00:00:15,630 --> 00:00:19,650 Now this will not be a Python course since that would take too long. 5 00:00:19,650 --> 00:00:25,380 What I will do is I will just briefly explain in a few videos the most important things that you need 6 00:00:25,380 --> 00:00:27,510 to know in order to code in Python. 7 00:00:27,530 --> 00:00:33,820 We will cover some of the basics and then after that we will go into decoding of our own backdoor. 8 00:00:33,960 --> 00:00:37,440 So before we begin there are two things you will need. 9 00:00:37,450 --> 00:00:43,170 If you actually skip to this part since maybe some people only got this course because of the coding 10 00:00:43,170 --> 00:00:43,910 section. 11 00:00:44,040 --> 00:00:48,240 So if you did that what you want to do is basically just insert a line. 12 00:00:48,240 --> 00:00:52,910 We did that in the previous section in the system hacking section so you need to insert a line. 13 00:00:53,250 --> 00:00:59,370 You need to have this path right here so see the route not whine. 14 00:00:59,430 --> 00:01:04,590 And then if you type here unless you need to have this drive C installed right here in that drive C. 15 00:01:04,620 --> 00:01:06,800 You also need to have the python. 16 00:01:06,810 --> 00:01:08,520 So if you go to the drive C.. 17 00:01:08,850 --> 00:01:15,100 Let me just enlarge this and edit this or make this zoom in so you can see better. 18 00:01:15,180 --> 00:01:18,880 You will see that right here I have Python 27 installed. 19 00:01:19,020 --> 00:01:26,830 And with that Python 27 I also have installed the D pi installer module which we will use in our Kelvin 20 00:01:26,910 --> 00:01:33,680 machine in order to make our programs executable and in order to make them be able to run on Windows. 21 00:01:33,810 --> 00:01:36,730 So those are the things that you will need. 22 00:01:37,080 --> 00:01:39,270 Basically that's the only thing that you need after that. 23 00:01:39,300 --> 00:01:44,870 We will only code the program in simple nano command on air or in the Python interpreter. 24 00:01:45,000 --> 00:01:50,210 So before we begin let's let me actually edit this a little bit. 25 00:01:50,240 --> 00:01:55,350 So let me make this transparent background a little bit better so you can see the code better. 26 00:01:55,350 --> 00:02:06,880 So if I just put it like this let's make it fully transparent and let's close this. 27 00:02:08,240 --> 00:02:09,380 So what do you want to do. 28 00:02:09,380 --> 00:02:12,150 Let us navigate to our directory first. 29 00:02:12,230 --> 00:02:17,840 So before we actually code anything what you need to know is that there are actually Python interpreters 30 00:02:17,900 --> 00:02:21,270 in terminal module or available in terminal. 31 00:02:21,260 --> 00:02:28,640 So what you can do is just type your python and what this will do is it will open up the interpreter 32 00:02:28,640 --> 00:02:30,350 for the python command prompt. 33 00:02:30,380 --> 00:02:34,980 So here you can execute any python commands or any python program you want. 34 00:02:35,030 --> 00:02:39,050 What we will use this for is basically in order to check out the syntax of a program. 35 00:02:39,050 --> 00:02:44,660 So you don't have to go through the entire code in order to check out if there is some error in the 36 00:02:44,660 --> 00:02:45,650 program. 37 00:02:45,650 --> 00:02:48,060 What you can do is just basically just type you anything. 38 00:02:48,110 --> 00:02:54,820 So a equals three which will say which will actually give the value of three to the eight. 39 00:02:55,010 --> 00:03:01,400 But if you for example type A equals B it will give you an error saying name B is not defined. 40 00:03:01,430 --> 00:03:07,520 So once you run our bigger code and you get for example an error it would be much easier in order to 41 00:03:07,520 --> 00:03:12,250 run some of the commands right here in order to check if you specified the correct syntax for them. 42 00:03:12,260 --> 00:03:19,850 So that is mostly what we will do for the Python interpreter and the programs to code will be coded 43 00:03:19,880 --> 00:03:29,240 in a normal file not be y but before we begin let us actually start off with the simple instructions 44 00:03:29,240 --> 00:03:34,790 or simple commands or simple basically scripts that will run in our interpreter in order to see what 45 00:03:34,790 --> 00:03:36,650 we can do and what we can do. 46 00:03:36,650 --> 00:03:42,620 So first thing we want to check out is the one that I already typed is actually giving a value to some 47 00:03:42,620 --> 00:03:45,430 constants to some changeable. 48 00:03:45,440 --> 00:03:51,170 So we gave the value to the eight equals three and if we just type your a it will give us that the value 49 00:03:51,170 --> 00:03:52,510 of equals three. 50 00:03:52,610 --> 00:03:55,310 But it will change the value of eight to five. 51 00:03:55,310 --> 00:04:00,110 For example we type a once again APRA's now change the value of eight to five. 52 00:04:00,140 --> 00:04:03,840 So this right here comment doesn't have its value anymore. 53 00:04:03,920 --> 00:04:13,250 So next thing you can do is for example let me just exit this Curtis a little bit. 54 00:04:13,250 --> 00:04:17,270 Make this a little bit larger and then run the Python interpreter. 55 00:04:17,720 --> 00:04:21,070 Let's for example give the value to a equals five. 56 00:04:21,070 --> 00:04:23,050 And value to be equals three. 57 00:04:23,060 --> 00:04:28,940 So what you can do is perform any basically additions abstraction multiplication or whatever you want. 58 00:04:28,940 --> 00:04:31,420 For example K plus B. 59 00:04:31,820 --> 00:04:37,070 And it will give you the value of a place b or you can also type your C equals a plus b. 60 00:04:37,250 --> 00:04:42,100 And what this will do is it will give the value of addition of these two numbers to value c. 61 00:04:42,130 --> 00:04:49,340 So if we just type your C C has value of 8 which is the same as this command we just specified the result 62 00:04:49,340 --> 00:04:56,900 of this command to be stored in this valuable so much you can also do is a divided by B which will give 63 00:04:56,900 --> 00:04:59,250 you one since this is not a module. 64 00:04:59,250 --> 00:05:05,060 This will only give you the times that B is consistent in a eight So five divided by three will give 65 00:05:05,060 --> 00:05:12,410 you the one since three is only consistent in five one time but if you type here for example FLOAT 66 00:05:15,230 --> 00:05:17,110 A equals B. 67 00:05:17,360 --> 00:05:23,570 This will give you the same value but this will give you the point zero after that. 68 00:05:23,570 --> 00:05:29,120 Now why this is why this does that is because it stores the value in decimal and it will give you the 69 00:05:29,120 --> 00:05:38,150 same result just with the additional decimal number after it so float basically means if you just type 70 00:05:38,150 --> 00:05:45,620 her any numbers and float a which would give the value of five it will print out 5.0 float to will print 71 00:05:45,620 --> 00:05:54,620 out five value 3.0 or basically just three just it will add the additional dot 0 after it so that is 72 00:05:54,650 --> 00:05:56,850 another thing you need to know what. 73 00:05:56,950 --> 00:06:06,520 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 74 00:06:06,520 --> 00:06:11,510 number for example since we specifies here that C equals A plus B which is a. 75 00:06:11,770 --> 00:06:14,100 We can type here C equals. 76 00:06:15,190 --> 00:06:16,740 And then we keep it a string. 77 00:06:16,740 --> 00:06:21,660 So for example hello world. 78 00:06:22,210 --> 00:06:25,630 And what this will do right now C won't be 8 anymore. 79 00:06:25,630 --> 00:06:28,110 It will actually be a string which is hello world. 80 00:06:28,120 --> 00:06:35,830 And if you just type your print c which is the command or print c it will print out the string that 81 00:06:35,830 --> 00:06:38,790 is consistent in DC variable. 82 00:06:38,860 --> 00:06:46,320 Now make sure to differentiate the syntax between Python 2 and Python 3. 83 00:06:46,320 --> 00:06:51,690 Now they are very similar but for example for print c wouldn't really work in Python 3. 84 00:06:51,760 --> 00:06:57,880 You would need to specify print and then open brackets and then C and then close brackets and then hello 85 00:06:57,880 --> 00:06:58,630 world. 86 00:06:58,630 --> 00:07:03,070 Now that will work in Python 2 but the syntax won't work in Python 3. 87 00:07:03,280 --> 00:07:08,470 So what we will do is we will use Python 2 in this crash course. 88 00:07:08,470 --> 00:07:15,380 So you can use the syntax for Python 3 I believe in python 2 both of those work. 89 00:07:15,540 --> 00:07:21,260 But if you're using Python 3 Make sure to check out the correct syntax for a command that we run now. 90 00:07:21,270 --> 00:07:27,840 Also some of the libraries that we need to use might not be available for Python 3 so also be aware 91 00:07:27,840 --> 00:07:28,970 of that. 92 00:07:29,010 --> 00:07:31,400 Now let's see what else we can do. 93 00:07:31,410 --> 00:07:36,710 So we saw how we can actually add a value to a single variable. 94 00:07:36,750 --> 00:07:40,380 We can add two variables and put in a third variable. 95 00:07:40,380 --> 00:07:43,380 We can also check the float value of a variable. 96 00:07:43,380 --> 00:07:51,330 We can also store a string in a variable but let's say for example we want to specify a value so let's 97 00:07:51,330 --> 00:07:53,100 say C equals five. 98 00:07:53,290 --> 00:08:01,450 Now we want to type that string equals so string is not very variable which will store a string. 99 00:08:01,500 --> 00:08:09,450 This number is and then we specify the percent sign and then D and then we call the quotes. 100 00:08:09,450 --> 00:08:14,880 Now what this will do is basically it will after we specify in the open brackets so-called the ports 101 00:08:14,970 --> 00:08:22,860 open brackets on other percent sign and then c once you type right here whoops Let me see invalid syntax 102 00:08:25,320 --> 00:08:27,120 String object is not callable 103 00:08:34,070 --> 00:08:35,010 let's see 104 00:08:38,100 --> 00:08:38,880 okay so. 105 00:08:38,880 --> 00:08:40,300 And then we tap your string. 106 00:08:40,750 --> 00:08:41,100 OK. 107 00:08:41,110 --> 00:08:43,480 So just a little problem with the syntax. 108 00:08:43,500 --> 00:08:43,880 What. 109 00:08:43,930 --> 00:08:51,510 What this command right here will do is basically this will store a string with a value right here of 110 00:08:51,510 --> 00:08:51,920 C.. 111 00:08:52,300 --> 00:08:58,530 So if Sievers for example 8 the string would be this number say if string what you see was three that 112 00:08:58,680 --> 00:09:00,960 this b this number is three. 113 00:09:00,990 --> 00:09:02,300 So this. 114 00:09:02,340 --> 00:09:05,190 Percent D right here is referenced with D. 115 00:09:05,190 --> 00:09:06,650 Percent see right here now. 116 00:09:06,710 --> 00:09:15,020 Percent C is just referring to to put the value of c e instead of these two signs right here. 117 00:09:15,090 --> 00:09:21,790 So if we were to change the value for C for example for any other value this string would be different. 118 00:09:21,810 --> 00:09:26,590 So that's also another thing that you can do with python. 119 00:09:26,640 --> 00:09:30,220 Now as I said before this would be just a simple crash course. 120 00:09:30,360 --> 00:09:39,160 We will also cover functions and classes but we will only do them briefly so you can understand in basics 121 00:09:39,160 --> 00:09:40,660 how things work. 122 00:09:40,810 --> 00:09:45,850 If you want to fully understand everything you need to have some previous knowledge of python or if 123 00:09:45,970 --> 00:09:51,160 you can just watch some other courses or tutorials that will teach you a little bit in depth of Python. 124 00:09:51,190 --> 00:09:57,510 So let me just do a little quick right here so import os system 125 00:10:00,400 --> 00:10:01,100 ops 126 00:10:03,600 --> 00:10:05,100 clear. 127 00:10:05,290 --> 00:10:10,640 I believe this is the command OS or it's always that system. 128 00:10:11,470 --> 00:10:12,380 OK. 129 00:10:12,810 --> 00:10:18,950 Just a little bit of command to clear your screen so let's see what else we can do right here. 130 00:10:19,090 --> 00:10:24,100 Now there are also boolean values which can be either true or false. 131 00:10:24,130 --> 00:10:29,230 But we will cover them in more detail in the next video where we actually do the loops since they are 132 00:10:29,230 --> 00:10:34,320 mostly used in some of the loop parts of the code. 133 00:10:34,330 --> 00:10:36,280 So we will do that in the next video. 134 00:10:36,940 --> 00:10:37,790 But for now on. 135 00:10:37,840 --> 00:10:40,510 Let's see how we can actually do the same previous command. 136 00:10:40,510 --> 00:10:46,810 But just with string so in the previous command we saw the string equals C for just a few strings string 137 00:10:46,810 --> 00:10:49,810 equals this number is then percent design. 138 00:10:50,140 --> 00:10:56,260 And instead of percent D we specified to put the value of c but let's say if we want to type here for 139 00:10:56,260 --> 00:11:04,890 example string 1 equals this or let's actually add our string equals. 140 00:11:04,960 --> 00:11:09,850 This is a new value so let's add on normal string Hello World. 141 00:11:10,960 --> 00:11:17,710 So if we just up here string these rules and put put the value of the inside of the string and what 142 00:11:17,710 --> 00:11:26,210 we want to do right now you just type your string one equals and then our Quote Our string is then two 143 00:11:26,210 --> 00:11:32,660 dots and then percent assign and then after that percent string. 144 00:11:32,660 --> 00:11:38,990 So what this will do is same with the previous command just the percent S is referred to to a variable 145 00:11:39,020 --> 00:11:40,550 that is storing a string. 146 00:11:40,550 --> 00:11:45,620 So right now you can guess that the output of string 1 will be our string is hello world. 147 00:11:45,650 --> 00:11:53,120 So if we just type your enter and just type your string one you will see that our string is hello world 148 00:11:53,480 --> 00:11:58,640 so % D is referring to numbers and percentiles is referring to strings. 149 00:11:58,760 --> 00:12:01,520 Percent F is referred to float numbers I believe. 150 00:12:01,520 --> 00:12:11,690 Let me just type here so let's say the equals float or b equals 3.0 and then we type your string to 151 00:12:12,650 --> 00:12:20,430 equals our number is and then percent F and then percent B. 152 00:12:20,440 --> 00:12:27,830 And if you just type your string to this or print out the float no value of press of b value which will 153 00:12:27,890 --> 00:12:31,130 actually add us as additional digits right here. 154 00:12:31,130 --> 00:12:36,470 So make a difference between the %s percent s and percent D. 155 00:12:36,520 --> 00:12:39,400 There are others as well but only for now on. 156 00:12:39,410 --> 00:12:44,990 We need to know these three are basically we do not even it no default value. 157 00:12:45,200 --> 00:12:53,000 We need to know the percent D and percent s so just make sure to remember that is this something that 158 00:12:53,000 --> 00:12:54,950 we will use in our backdoor. 159 00:12:55,040 --> 00:12:59,870 So that will be about it for these variables in this tutorial. 160 00:12:59,870 --> 00:13:06,380 This is just something very simple We saw how we can actually add a value to a variable how we can print 161 00:13:06,380 --> 00:13:13,220 something how we can store Strings to a variable and how we can actually print out the string with a 162 00:13:13,220 --> 00:13:14,730 different variable. 163 00:13:14,780 --> 00:13:21,920 So this is the example in the next video we'll cover some of the other basics for python. 164 00:13:21,950 --> 00:13:27,470 Make sure that you stick with this part of the Python crash course if you don't have any previous knowledge 165 00:13:27,470 --> 00:13:34,400 with Python or else you will really hardly follow the backdoor creation to do later on. 166 00:13:34,400 --> 00:13:37,310 So that would be about it for this material. 167 00:13:37,310 --> 00:13:39,670 I hope I see you in the next one and take care. 168 00:13:39,770 --> 00:13:40,040 Bye.