1 00:00:00,300 --> 00:00:07,820 So now let's continue and see how the mapping function vocal now that we have defined a lot of mapping 2 00:00:07,820 --> 00:00:14,310 can function, let us try using them in an interactive shell of Python to better understand how they 3 00:00:14,310 --> 00:00:15,070 work together. 4 00:00:15,570 --> 00:00:20,390 For this, let's create an interactive Saiful map for the ciphertext. 5 00:00:21,180 --> 00:00:28,110 We will create your order to open up a new file and we would use this for later. 6 00:00:28,140 --> 00:00:29,570 Mapping for ciphertext. 7 00:00:30,360 --> 00:00:45,990 Put it in capital so all q i edg x i r c p g and it stays sibylle q are set. 8 00:00:47,480 --> 00:01:02,480 Gave me and said the space m b b ss i p l would close the single quotation now, which this particular 9 00:01:02,540 --> 00:01:06,190 ciphertext contains just three Saiful votes. 10 00:01:06,440 --> 00:01:12,800 So we'll do this by basically creating a mapping for each word and then combining the mappings. 11 00:01:13,010 --> 00:01:18,660 So for that the first thing will have to import here is the hacker function that we have created. 12 00:01:18,920 --> 00:01:25,320 So if we go to over python hacking advanceable course, the name of the Hackl function, we have created 13 00:01:25,320 --> 00:01:27,690 this simple sub hacker. 14 00:01:28,160 --> 00:01:36,410 So if we go back here, we see in Fort C, simple sub 15 00:01:39,920 --> 00:01:40,430 heckel. 16 00:01:42,290 --> 00:01:47,030 OK, let's open up the. 17 00:01:48,410 --> 00:02:00,420 Fine doctors in each drive samples of hacker and letters from the module once and once this is done. 18 00:02:00,590 --> 00:02:05,610 Now let's give import a simple sample. 19 00:02:09,140 --> 00:02:09,940 Now it's done. 20 00:02:09,950 --> 00:02:12,410 So let's close this particular file. 21 00:02:12,860 --> 00:02:17,090 Now, once the import is done next, we will call the function. 22 00:02:17,330 --> 00:02:24,700 Now, let us just keep the file open so that we are able to understand the functions that we have. 23 00:02:24,710 --> 00:02:33,150 So we'll go back to our E drive by them hacking advanced level and this particular function. 24 00:02:33,440 --> 00:02:37,680 So now you'll we need to call up the functions that get Blanky Falletta mappings. 25 00:02:38,030 --> 00:02:41,760 So if we look at it, we are having this function here. 26 00:02:42,200 --> 00:02:42,710 So. 27 00:02:44,310 --> 00:02:54,600 Let us see here one object say, let the mapping last year, one is equal to we are seeing simple sub 28 00:02:55,560 --> 00:02:57,120 hackle dot. 29 00:02:58,150 --> 00:03:07,480 Segert blank, Saifullah, maybe one, and then if we try to print the letter mapping SDR one, you 30 00:03:08,020 --> 00:03:10,230 will get everything initially blank. 31 00:03:10,450 --> 00:03:15,320 So let's start hacking the first cyberwar vote that we have now. 32 00:03:15,460 --> 00:03:19,130 What is the foresightful war that we have if we check in on NPR? 33 00:03:19,160 --> 00:03:22,450 This is our first Saiful vote that we want to happen. 34 00:03:22,810 --> 00:03:27,960 Now, to have this will have to force me to get the vote battle for the Saiful vote. 35 00:03:28,270 --> 00:03:33,890 So we'll have to call the makework party module in that thing may get verbatim function. 36 00:03:34,270 --> 00:03:40,570 So if we go back to over hacking program, we have this make war button one. 37 00:03:40,990 --> 00:03:50,950 If we try to open up this in just for our reference we're having it, does us get one button SGA for 38 00:03:50,950 --> 00:03:52,980 this function we're supposed to call. 39 00:03:53,080 --> 00:03:59,500 OK, so let's cooperate on this and the final word, button one. 40 00:03:59,650 --> 00:04:12,070 So if we go back here in the Biton, shall we say import same week war button one, it does make war. 41 00:04:14,750 --> 00:04:27,890 But don't these capital sorry, import for me, go button one, OK, and after this we will see our 42 00:04:28,310 --> 00:04:40,630 make war button one does not get the word button to steal and let us go down this road here, OK? 43 00:04:40,670 --> 00:04:42,270 And let's press enter. 44 00:04:42,530 --> 00:04:50,660 So this is how we are getting the world bottom right now to figure out which English word in the dictionary 45 00:04:50,660 --> 00:04:52,150 have this water bottle. 46 00:04:52,590 --> 00:04:58,280 OK, now we need to import for this the Warburton module and we have to look up for this particular 47 00:04:58,290 --> 00:04:58,810 pattern. 48 00:04:59,240 --> 00:05:07,160 So now if we go back to our program where we have the vote patterns one, so we'll have to see the import 49 00:05:07,560 --> 00:05:08,480 Savol 50 00:05:11,090 --> 00:05:12,200 patterns one. 51 00:05:12,860 --> 00:05:17,450 And after this import, we create three candidates. 52 00:05:17,450 --> 00:05:27,890 SDR is equal to four, Batten's one, what we call here, all buttons. 53 00:05:28,280 --> 00:05:30,950 And in this, we pass this pattern. 54 00:05:31,820 --> 00:05:37,970 Just copy this, paste it here in single quotation marks. 55 00:05:38,180 --> 00:05:43,520 And after that, if you try to get candidate SDR, you try to print this. 56 00:05:43,850 --> 00:05:47,740 You are getting the dual pattern and this one is uncomfortable. 57 00:05:47,750 --> 00:05:50,000 One is uncomfortably so. 58 00:05:50,000 --> 00:05:53,210 Two English votes match the given verbatim. 59 00:05:53,210 --> 00:05:59,330 Therefore, the only two votes in the full Saiful vote could describe to us either uncomfortable or 60 00:05:59,330 --> 00:06:00,300 uncomfortable. 61 00:06:00,680 --> 00:06:07,100 So these words are our candidate is to restore them in the variable as we have done here. 62 00:06:07,370 --> 00:06:13,940 Now next we need to map their letters to our Saiful Vote letter using the add letters to the mapping 63 00:06:13,940 --> 00:06:14,460 function. 64 00:06:14,930 --> 00:06:21,990 So first of all, we will map the uncomfortable by accessing the first member of the candidate list. 65 00:06:22,400 --> 00:06:30,940 So over here we would see, for example, a little map and one is equal to now. 66 00:06:30,950 --> 00:06:36,630 We are having a simple sub hackle that dot. 67 00:06:36,950 --> 00:06:47,600 Now let us open the symbols of Zakarin, but just to see the method that we have is and let those two 68 00:06:47,720 --> 00:06:48,370 mappings. 69 00:06:48,740 --> 00:06:51,380 So let's go on this and go back to my. 70 00:06:52,340 --> 00:06:59,710 And here we are going to pass the letter mapping one comma. 71 00:07:00,500 --> 00:07:09,350 Now the let up map and one here we are passing this law in single quotation marks and with that we are 72 00:07:09,350 --> 00:07:12,170 passing the candidate SDR. 73 00:07:12,180 --> 00:07:13,370 What are the index? 74 00:07:13,550 --> 00:07:15,260 Zero and. 75 00:07:16,980 --> 00:07:26,430 Dumping one is not defined or are seeing your letter, mapping one is equal to. 76 00:07:27,810 --> 00:07:38,160 The function don't add letters to Muffin one because they're the little mopping one, the value for 77 00:07:38,160 --> 00:07:41,520 it and the value of candidates. 78 00:07:43,170 --> 00:07:49,080 OK, here we are having this baby a little mopping Aschiana. 79 00:07:49,680 --> 00:07:52,380 So if you're we are seeing the 80 00:07:55,350 --> 00:08:06,890 later mopping one is equal to three symbols of Hackl Dot C and letters to my being one. 81 00:08:07,230 --> 00:08:14,350 Here we are supposed to pass C letter mapping SDR, one which we have created here. 82 00:08:15,870 --> 00:08:29,190 So this one will be passed here after which we need to pass the first to vote from our text and then 83 00:08:29,190 --> 00:08:30,180 we will pass. 84 00:08:32,780 --> 00:08:36,500 Candidate is still at the index zero. 85 00:08:36,710 --> 00:08:36,950 OK.