1 00:00:00,300 --> 00:00:06,480 Now, the next function, which you have to find here is get the end Saki's a letter in which you are 2 00:00:06,480 --> 00:00:11,400 passing three parameters Faustus and then the Guillem and the message. 3 00:00:11,700 --> 00:00:17,160 Now this returns every end the letter for each set of letters in the text. 4 00:00:17,460 --> 00:00:25,790 For example, if you pass one commentary and the ABC, ABC, ABC would return 80 or if you pass on it 5 00:00:25,800 --> 00:00:29,270 ends up this letter in package you pass to Komati again. 6 00:00:29,280 --> 00:00:31,790 ABC, NBC, ABC would return BBB. 7 00:00:32,190 --> 00:00:39,200 Similarly, if you say trigonometry, ABC, ABC, ABC will return the value of C.C.C. or if you see 8 00:00:39,660 --> 00:00:40,830 one Gomo five. 9 00:00:40,830 --> 00:00:43,470 The value of a b c d e f g h. 10 00:00:43,470 --> 00:00:50,910 I get the value of and if that is the first and the fifth now using a regular expression to move the 11 00:00:50,910 --> 00:00:57,420 normal letters from the message we are seeing, your message is equal to not let those underscore 14. 12 00:00:57,430 --> 00:00:59,730 sub black gamma message. 13 00:01:00,240 --> 00:01:08,460 Then, after which we are seeing that I is equal to and minus one letter that still is blank. 14 00:01:08,460 --> 00:01:14,340 And while I use less than the length of messager pending the value in letters still incrementing I plus's 15 00:01:14,340 --> 00:01:18,680 equal to the KB and returning the value of Lakotah still using join. 16 00:01:19,140 --> 00:01:24,120 Then we try to define another method that is attempt haak with the Guyland and which we are passing 17 00:01:24,120 --> 00:01:26,940 ciphertext and most likely kilim. 18 00:01:27,150 --> 00:01:31,910 Now here we are able to determine the most likely letters for each letter in the key. 19 00:01:32,250 --> 00:01:38,310 Hence we are saying ciphertext up is equal to ciphertext upper and then all the frequency, of course, 20 00:01:38,310 --> 00:01:41,240 is a list of most likely killens number of list. 21 00:01:41,460 --> 00:01:44,400 So these in our list are the frequency Schauder list. 22 00:01:44,610 --> 00:01:50,430 Hence we are saying all frequencies cause equal to black and four and in the range of one till the most 23 00:01:50,430 --> 00:01:51,900 likely guyland plus one. 24 00:01:52,140 --> 00:01:59,520 Use it and all it does is equal to call your get and subcu let us pass and most likely Guyland and the 25 00:01:59,530 --> 00:02:01,170 cipher text up. 26 00:02:01,650 --> 00:02:08,880 Then you have the frequency schools in the list of pupils like letters comma Ingomar Frequency column 27 00:02:08,880 --> 00:02:10,810 or automats or something like that. 28 00:02:10,840 --> 00:02:13,190 So this list is sorted by my score. 29 00:02:13,650 --> 00:02:15,570 Higher score means better match. 30 00:02:15,780 --> 00:02:21,780 So you can see the method that is English frequency math score and you can understand what I was trying 31 00:02:21,780 --> 00:02:22,390 to do there. 32 00:02:22,590 --> 00:02:29,010 So in this particular for loop, we are first creating a blank frequency scores, then saying for possible 33 00:02:29,310 --> 00:02:35,370 in letters calling your decrypted text is equal to from Virginia for the more we call the decrypt message, 34 00:02:35,370 --> 00:02:42,210 more function in which now here we have the decrypt message SDR function in which we are passing the 35 00:02:42,300 --> 00:02:45,630 possible keys and the end letters there. 36 00:02:46,050 --> 00:02:52,200 Then we have key frequency match from which we are seeing frequency analysis in which from which we 37 00:02:52,200 --> 00:02:54,440 are calling the English frequency math score. 38 00:02:54,750 --> 00:02:58,860 Now if we just open up the frequency analysis. 39 00:02:59,930 --> 00:03:06,090 And we just checked the matter that we have this English frequency med school. 40 00:03:07,280 --> 00:03:11,310 Similarly, if we just open the Virginia site for demo. 41 00:03:12,720 --> 00:03:20,460 And the message we have is decrypted message, estie, are so the same thing we pass here, and then 42 00:03:20,640 --> 00:03:23,880 in this we are passing the decrypted text, which we have created. 43 00:03:24,270 --> 00:03:32,100 Then we are seeing frequencies also dot up upend and we are trying to pass their vickki and on frequency 44 00:03:32,100 --> 00:03:33,080 match tuple. 45 00:03:33,630 --> 00:03:39,210 And then we try to sort by them at school by saying frequency scores dot sort. 46 00:03:39,390 --> 00:03:46,080 He is given Andrewartha to draw and all frequency schools start up and the value of frequencies goes 47 00:03:46,320 --> 00:03:46,710 numb. 48 00:03:46,770 --> 00:03:57,210 Most frequency letters then we are checking, if not the silent underscore Monastir then for I in the 49 00:03:57,210 --> 00:04:01,320 range of length of all four frequencies cause we are using it plus one. 50 00:04:01,430 --> 00:04:05,100 The first letter is not called the or zero the letter. 51 00:04:05,820 --> 00:04:09,650 Hence we are saying here I plus one in this case using the print. 52 00:04:09,750 --> 00:04:15,150 Then we say for the frequencies code in all the frequencies code words at the index of I will print 53 00:04:15,150 --> 00:04:19,390 the value of frequencies, go to the index zero and put in the new line this. 54 00:04:19,950 --> 00:04:27,420 Then we try every combination of the most likely letters for each position in the key, using this for 55 00:04:27,420 --> 00:04:35,430 loop, seeing for indexes in the total dot products in the bracket range of normal frequency letters 56 00:04:35,430 --> 00:04:38,080 and repeat equal to most likely hellenthal. 57 00:04:38,610 --> 00:04:44,850 Then we create a possibility from the letters of all frequencies close by, just saying possible equal 58 00:04:44,850 --> 00:04:52,380 to blank and for I in the range of the given most likely killed you increment possible equals two possible 59 00:04:52,590 --> 00:04:55,950 plus all the frequencies of the index of zero. 60 00:04:56,700 --> 00:05:02,760 Then we check if it is not in the silent Monastir we are printing, attempting to give it and the value 61 00:05:02,760 --> 00:05:03,720 of possibilities. 62 00:05:04,200 --> 00:05:09,930 Then from the decrypted text again, here we are sense of beginning as I for demo in which we are calling 63 00:05:10,290 --> 00:05:14,550 decrypt message and the name of the function is decrypt message. 64 00:05:14,580 --> 00:05:24,270 Start are bypassing the possibility and the ciphertext reject now is in the English file. 65 00:05:24,270 --> 00:05:29,040 If you just try to open your having the method as it is English check. 66 00:05:30,240 --> 00:05:33,680 So we use the same method, name and password. 67 00:05:33,900 --> 00:05:36,120 But Amaterasu decrypted text. 68 00:05:36,360 --> 00:05:42,180 Then we said we have to ciphertext to the original keesing by saying your original case is black. 69 00:05:42,180 --> 00:05:49,860 And for I in the range of length ciphertext converted to opponent appended to your decrypted text is 70 00:05:50,070 --> 00:05:55,470 converted to lower end of Joinet using the decrypted text. 71 00:05:55,770 --> 00:06:01,530 Then we are printing it over here that the possible encryption hack with the key is OK. 72 00:06:01,530 --> 00:06:05,190 If it is found, then reject the user to see if the key has been found. 73 00:06:05,520 --> 00:06:11,850 Then we print the first two hundred characters that print the blank line and as the input from the user, 74 00:06:11,880 --> 00:06:16,590 then, depending on the user's input, we are returning the value of decrypted text. 75 00:06:16,920 --> 00:06:21,600 If no English looking decryption was found, we are returning this none over here. 76 00:06:22,260 --> 00:06:25,470 The next thing we are having here is the define hack. 77 00:06:25,470 --> 00:06:28,770 Virginia functions now in this particular function. 78 00:06:29,680 --> 00:06:36,700 The first thing we are doing is we need to do the examination to figure out what the length of ciphertext 79 00:06:36,700 --> 00:06:43,210 encryption is, hence we are seeing all likely Killens is equal to the Kosaka examination function and 80 00:06:43,210 --> 00:06:49,780 in bracket passing ciphertext then, which is not the silent mode, we create a blank ealand a steer, 81 00:06:49,990 --> 00:06:57,220 and for the guyland in all likelihood Elance, we are incrementing the value of Guyland Ista and printing 82 00:06:57,220 --> 00:07:01,900 because aski examination results are the most likely killens out on the value of killens. 83 00:07:02,410 --> 00:07:09,640 Then we create a messages and for the Guillain in all likelihood Elance we are checking first if it 84 00:07:09,640 --> 00:07:16,270 is not in the silent mode and then printing off message here after we print the message we say hacked 85 00:07:16,300 --> 00:07:22,930 message is equal to the ATM tag with Glemp print the value of giving the ciphertext and checking if 86 00:07:22,930 --> 00:07:29,950 it is not equal to break it, or if none of the killens found using the examination, then start the 87 00:07:29,950 --> 00:07:31,600 brute forcing through the killer's hands. 88 00:07:31,630 --> 00:07:38,260 Then we are saying over here that if that message is equal to none and if not a silent Monastir, print 89 00:07:38,260 --> 00:07:44,020 the message and continue for Guyland in the range of one to the masculine plus one. 90 00:07:44,020 --> 00:07:45,220 Don't reject any. 91 00:07:45,220 --> 00:07:47,320 Killens already tried from kazatsky. 92 00:07:47,570 --> 00:07:54,490 So then we are checking here that if it is not in all the likely Egeland's and not in the silent mode, 93 00:07:54,820 --> 00:07:58,270 print the message and put the values of our time. 94 00:07:58,270 --> 00:08:02,980 Tag with Guyland in the hacked message is still after which we are checking again. 95 00:08:02,980 --> 00:08:09,070 If it is not not, we break it and finally return the value of hacked messages to the calling program. 96 00:08:09,310 --> 00:08:10,960 Then we just check. 97 00:08:10,960 --> 00:08:16,960 If Virginia hacker them over here is run by itself, then we are going to call the main method here. 98 00:08:17,230 --> 00:08:20,100 Otherwise call the main method from outside. 99 00:08:20,770 --> 00:08:26,500 Now, this particular example that we have done, we will see the execution and understand how in detail 100 00:08:26,500 --> 00:08:31,180 how this particular function or the particular file is working in the next session. 101 00:08:31,390 --> 00:08:33,100 So that's it from this session. 102 00:08:33,100 --> 00:08:34,060 Thank you very much.