1 00:00:00,510 --> 00:00:06,840 Welcome to The Next Session by Tom Hacking Course, that is about Cesar Saiful. 2 00:00:07,320 --> 00:00:15,570 Now the Cesar Saiful basically uses the keys, which encrypt a particular message differently, depending 3 00:00:15,570 --> 00:00:17,470 on which he is used. 4 00:00:18,150 --> 00:00:24,590 Now, the key for this is also for basically individuals from zero to twenty five. 5 00:00:25,050 --> 00:00:31,860 Now, even if a cryptanalysis knows the Cesar Saiful was used, that alone doesn't give them enough 6 00:00:31,860 --> 00:00:33,720 information to break the cycle. 7 00:00:34,290 --> 00:00:40,830 Now in this particular session, we would be covering the import statement, how to use it, how to 8 00:00:40,830 --> 00:00:48,390 use constants before loop the effects and details of statements, the in and out in operators and also 9 00:00:48,390 --> 00:00:50,820 the find method of the string method. 10 00:00:51,270 --> 00:00:59,400 Now we would be creating a Caesar cipher program for us in the new window and we would be saving it 11 00:00:59,400 --> 00:01:00,420 by a particular means. 12 00:01:00,420 --> 00:01:07,680 This is a cipher, but for this particular program we would need to download the paperclip via modu 13 00:01:08,010 --> 00:01:10,020 and pasted in the same directory. 14 00:01:10,440 --> 00:01:18,960 So we will import that particular module indices for the Python program and then later on we'll see 15 00:01:18,960 --> 00:01:20,310 how to execute it. 16 00:01:20,910 --> 00:01:26,070 So we will first start by creating the program now or just for your understanding, I will show you 17 00:01:26,070 --> 00:01:32,400 that we have already downloaded this paperclip, Lopevi, which is a python file, and this file will 18 00:01:32,400 --> 00:01:35,790 want to import in our currency for the Python program. 19 00:01:36,270 --> 00:01:39,260 So over here will go for a new file. 20 00:01:39,690 --> 00:01:43,530 And in this particular file, we will first start by C. 21 00:01:45,600 --> 00:01:52,140 Import paper clip now is not necessary as it is a Python program itself. 22 00:01:52,800 --> 00:02:00,630 Now, after this, we would create a string variable which will have a particular message store into 23 00:02:00,660 --> 00:02:04,630 it, which can be encrypted or the same can be decrypted. 24 00:02:05,010 --> 00:02:15,000 So we will take the variable name as same as G String, and that's equal to we will give said this is. 25 00:02:17,680 --> 00:02:29,710 Cesar Saiful program, and this is our message now after this. 26 00:02:29,770 --> 00:02:35,500 We will give or take, which will be also used for encryption also and for decryption also. 27 00:02:35,800 --> 00:02:42,630 So let us give you a key code that's equal to we give, for example, 30. 28 00:02:43,420 --> 00:02:47,570 Now, we will give your whether the program will encrypt or decrypt. 29 00:02:47,860 --> 00:02:48,670 So here we are. 30 00:02:48,670 --> 00:02:53,310 Giving more type is equal to in single code. 31 00:02:53,320 --> 00:02:56,710 We are giving the text as encrypted. 32 00:02:57,310 --> 00:03:07,720 Now this you can either separate are putting it in a comment that says send it to wipe, encrypt or 33 00:03:08,350 --> 00:03:08,950 decrypt. 34 00:03:08,980 --> 00:03:10,890 So depending what do you wish to do? 35 00:03:11,230 --> 00:03:16,360 You you the particular given text in the variable mode type. 36 00:03:16,900 --> 00:03:21,190 Now after this, we are creating one simple variable. 37 00:03:21,190 --> 00:03:28,450 We just want to store all these symbols, capital, small keys and numbers, so we will create your 38 00:03:28,870 --> 00:03:37,300 SI symbols type and that will do anything because we will save 39 00:03:42,190 --> 00:03:53,830 Popy to our eyes to u, v, w, x, y, z, all in capital Novogen and small for a b c d e f g h i j 40 00:03:54,340 --> 00:03:55,640 k l m n. 41 00:03:56,410 --> 00:04:05,470 You are still using w, x, y, z and now one, two, three, four, five six seven eight nine zero 42 00:04:05,860 --> 00:04:12,130 will give you an exclamation mark, question mark or dot and, and the semicolon. 43 00:04:12,820 --> 00:04:20,410 OK, so after we have given all the values here now the next thing is we will store the encrypted, 44 00:04:20,410 --> 00:04:23,210 all the decrypted form of the message and another variable. 45 00:04:23,440 --> 00:04:31,240 So for that, we will take your said translater SDR, which is initially to blank. 46 00:04:31,240 --> 00:04:33,870 We are not storing there any values initially. 47 00:04:34,450 --> 00:04:40,780 Now for the symbol in a particular message, we will run the particular loop and we will check. 48 00:04:41,050 --> 00:04:51,120 So now here we will run for C, so here will be using the SVM in our MSG string. 49 00:04:51,910 --> 00:04:54,420 Put the semicolons over for loop starts here. 50 00:04:54,730 --> 00:05:04,150 Now in this we will check the if condition that if the SVM in our symbols type. 51 00:05:05,480 --> 00:05:12,560 Another condition over here now we want to create here the volume index and is a single index is equal 52 00:05:12,560 --> 00:05:12,800 to. 53 00:05:15,370 --> 00:05:26,120 Symbols type dot find in the as if I am OK now we will perform the encryption or decryption option. 54 00:05:26,470 --> 00:05:30,550 So over here, so just below this, we will check. 55 00:05:30,550 --> 00:05:35,050 If so, let's take our more type. 56 00:05:35,350 --> 00:05:41,440 If that is equal, this is double because I want to check for the equality that if we value in that 57 00:05:41,440 --> 00:05:43,320 more type, is equal to encrypt. 58 00:05:43,810 --> 00:05:51,400 If it is encrypted, then we are going to see the translated so translated into X. 59 00:05:51,850 --> 00:05:55,680 Now that's equal to the owner faqir c. 60 00:05:55,690 --> 00:06:00,160 S I m index plus the value of. 61 00:06:02,920 --> 00:06:03,420 Kiko. 62 00:06:04,540 --> 00:06:08,240 Now, after this, we'll go one step back and go for it. 63 00:06:08,440 --> 00:06:17,770 If that if the mood type is not equal to encrypt, but it is equal to the decrypt, OK, then we are 64 00:06:17,770 --> 00:06:27,010 going to see translated into X is equal to our volume index, minus the key. 65 00:06:27,880 --> 00:06:31,910 OK, now we will handle your wrap around if needed. 66 00:06:32,260 --> 00:06:41,620 So over here we will go again one step back and will check if over translated into X if it is more than 67 00:06:41,620 --> 00:06:47,830 equal to the level of using your symbols type. 68 00:06:49,650 --> 00:06:56,730 Then we will see the translated X is equal to. 69 00:06:58,430 --> 00:07:14,280 Translated into X minus the lenhoff symbols type, and again, it is if but if you're translated IDEX, 70 00:07:14,750 --> 00:07:22,130 that is less than zero, then we will see translated into X is equal to. 71 00:07:23,430 --> 00:07:27,960 Translated IDEX plus Willendorf. 72 00:07:29,800 --> 00:07:30,430 Symbol's. 73 00:07:31,330 --> 00:07:34,270 Type, so after this, we will. 74 00:07:35,730 --> 00:07:48,960 Wants one step back and see translated as is equal to translated are plus symbols type. 75 00:07:50,440 --> 00:07:58,360 And in bracket, we will give here the index as translated idiots. 76 00:07:59,410 --> 00:08:03,950 Now, we'll go for the if else, but for the upper if condition. 77 00:08:04,390 --> 00:08:09,040 And over here we will append the symbol without encrypting or decrypting it. 78 00:08:09,430 --> 00:08:10,470 So here we'll see. 79 00:08:11,560 --> 00:08:22,200 Translated as is equal to translated SDR plus the value of your SVM. 80 00:08:22,900 --> 00:08:30,880 And once we have done this, let's go directly here and we will give your print command and then print. 81 00:08:30,880 --> 00:08:34,900 We will print the value of translated SDR. 82 00:08:35,390 --> 00:08:43,750 Now we'll use your paper clip that we use to copy Matau and also be put translated ASDF. 83 00:08:44,290 --> 00:08:46,390 Now let us save this. 84 00:08:46,390 --> 00:08:47,620 We will save it as. 85 00:08:50,410 --> 00:08:56,770 Cesar Saiful thought be right in the. 86 00:08:57,690 --> 00:09:01,700 Program that is an easy drive, hacking and save it. 87 00:09:02,070 --> 00:09:06,280 OK, so now to run, this will directly go to run and see run module. 88 00:09:07,500 --> 00:09:14,180 So this is what we are getting at the encrypted string as when you run the particular program, whatever 89 00:09:14,190 --> 00:09:17,060 text you have written, it is basically encrypted. 90 00:09:17,070 --> 00:09:24,150 So the output of the string that is this is a cipher program and this is our message of this particular 91 00:09:24,150 --> 00:09:24,680 text. 92 00:09:25,260 --> 00:09:27,930 We are basically encrypting using the key. 93 00:09:28,950 --> 00:09:30,630 So this is a cipher program. 94 00:09:30,630 --> 00:09:36,810 Just run automatically copies this encrypted string to the clipboard and you can place it in your email 95 00:09:36,810 --> 00:09:38,390 or the text file also. 96 00:09:38,850 --> 00:09:45,090 So as a result, you can easily send encrypted output from a particular program to another program also. 97 00:09:45,810 --> 00:09:54,240 So now basically to decrypt the message, you can just based the same message that is encrypted over 98 00:09:54,240 --> 00:09:56,790 here, see in this particular part. 99 00:09:59,610 --> 00:10:08,430 Let's remove this bastard here, save it, and now we run the model of what mistake did we do? 100 00:10:08,850 --> 00:10:18,270 We have our mistake and basically we do this or we did not change here from encrypt to the clip, OK? 101 00:10:18,390 --> 00:10:21,040 Only when we say to decrypt, it will be decrypted. 102 00:10:21,060 --> 00:10:26,090 So now, if you say decrypt, it is a cipher program and this is our message. 103 00:10:26,100 --> 00:10:34,490 This is what output we get when we change the value of the message, our variable and the type change 104 00:10:34,530 --> 00:10:35,840 it to decrypt. 105 00:10:35,850 --> 00:10:36,230 Right. 106 00:10:36,540 --> 00:10:41,730 So now basically we come to the importing of module and setting up some variables. 107 00:10:42,000 --> 00:10:48,840 Now we already have some built-In functions and bitin now some function exist in separate programs called 108 00:10:49,050 --> 00:10:49,710 modules. 109 00:10:50,370 --> 00:10:54,600 Modules are basically also your python program that contains additional functions. 110 00:10:54,600 --> 00:11:00,810 Which program can automatically use them so we can import those modules with an appropriate name. 111 00:11:01,050 --> 00:11:05,870 That is an import statement which consist of the import keyword, followed by the module. 112 00:11:06,510 --> 00:11:11,400 Like in this case here we have all that import and the module that is paperclip. 113 00:11:11,880 --> 00:11:12,280 Right. 114 00:11:12,420 --> 00:11:18,060 So now over here we are importing this module so that we can call the paperclip taught copy function 115 00:11:18,060 --> 00:11:19,310 in the particular program. 116 00:11:19,710 --> 00:11:27,300 So as we are using this code copy, if we don't import this, we are not authorized to use this particular 117 00:11:27,390 --> 00:11:28,290 statement here.