So now in this particular program, we are trying for a particular and that is there because we're told
the program returns little snippet of the decrypted message for the user to confirm that it has found
the right.
OK, now, in this example, the message looks promising.
And when the user confirmed the description is correct by entering the the program, then return the
entire hack the message.
OK, now you can also see it by the biographical note about OK that we have.
Well, we basically get the four percent.
And if the decryption is false positive, the user can press anything else and the program will still
continue to try for other keys.
OK, now the program again runs and skips the correct decryption, replacing anything other than the
the program assumes that it did not find the correct decryption continues its brute force approach to
the other possibilities available.
So eventually the program runs through all the possibilities and then gives up informing the user that
it was unable to have the ciphertext.
OK, now let us take a closer look at the source code that we have used for creating this program.
OK, so the first thing we have done is importing the modules in the first line of the code would tell
the user, what about this program?
We basically do OK.
We are importing several modules that we have written or seen in the previous session that is of a paperclip,
checking them all 16.
Now, the transposition cycle Hackl program containing approximately some lines of code is fairly short
because of it.
Much of it basically exists in other programs that we are using as the module.
So using a multiline string with triple codes like if Ifill's use instead of the single quotation marks,
if you use this triple line or triple double code that is known as our multiple multiline string using
the Republicans.
OK.
Now notice that if you are having a very long string, then triple code strings.
We also call them as multiline strings because the span multiple lines and can contain some line breaks
within the Somali line.
Strings are basically useful for putting a large string into a program for support.
And because single and double codes don't need to be escaped within them, we can see an example of
this multiline string by entering some following text in the interactive shell.
So if we go back here and we try to endorsee SDR is equal to, we give you a double quotation marks.
Sadiel, John Placentals.
We say, why did you dress up my hamster
in doll clothing?
Then say, I look at Mr. ABC and think that I know this was John's doing and then give thanking you
see Elliman and then we end this quotation mark.
Now we give here again, say, in bracket STF, so we get the same text in the same format.
But OK, notice that this particular string value like of a ciphertext string expands multiple lines.
Everything after the opening triple code will be interpreted as part of the string until the program
reaches the course, ending it.
OK, so you can make a multiline string using either for like three double chords, characters or three
singlehood.
So even doing the three and ending it with three single chords will also be possible or do it with double
quotation marks.
OK, anyways, as you wish to do now, let us go back to our program here.
Now come to displaying the results of the hacking, the particular message.
So the ciphertext hacking code exists inside of a particular method that is hack transposition, astar
function vacay, which we are calling it over here and storing the value which is written by this function
in the variable hacked message is for this function will take one string argument, the encrypted ciphertext
message that we are trying to hack.
And if the function can hack this hypertext, it returns a string of the decrypted Asgeir, otherwise
it returns the value that is none.
So if you look at over here, we are saying hacked message Asgeir is equal to calling the method, passing
the parameter, checking if it is equal to non-veteran fail to hack encryption is if it is not equal
to null, then you're saying copying the hack message to avoid printing the hack message and then using
good copy to copy them is OK.
So over here I'm calling the function to return the hacked message.
If the attempt is a.
Facebook or the non-value is an attempt, is unsuccessful, then it stores the returned value in the
message hack is gesture and the next line tells the program what to do if the function is unable to
have deciphered.
So if none was stolen, the variable hacked and the program lets the user know by printing that it was
unable to break the encryption.
And the next lines after that shows what the program does of the function is able to hack the ciphertext.
That is the if part in the as we print the decrypted message to the clipboard and for this code to work,
we also need to define the hack transposition function, which we going to do after the next line of
copying it to the.