1 00:00:00,790 --> 00:00:01,500 Welcome back. 2 00:00:02,160 --> 00:00:16,020 In this video, we show you how to analyze the binary, so you click on this to open the C1 binary and 3 00:00:16,030 --> 00:00:25,620 you show you the browser, go to the functions for the military and scroll down and never click on the. 4 00:00:27,430 --> 00:00:36,760 So now you can drink this anglicised so that we can have a better view and you can see from here that 5 00:00:36,760 --> 00:00:40,620 this is the mean signature for the main function of a C program. 6 00:00:42,920 --> 00:00:51,380 I mean, anywhere except to carry this oxy, and that would be me, just refresh your memory. 7 00:00:52,160 --> 00:01:04,010 Well, see program, this is how I mean, it looks like the first barometer he's oxy. 8 00:01:04,580 --> 00:01:07,370 Oxy means how many parameters are they? 9 00:01:08,930 --> 00:01:13,190 For example, if you were to run this program. 10 00:01:13,940 --> 00:01:19,030 You can click on the map here from the window, say, initially open. 11 00:01:20,660 --> 00:01:23,690 So when we run this program, they see one. 12 00:01:25,100 --> 00:01:26,480 There are two arguments. 13 00:01:26,810 --> 00:01:31,890 This one is for argument and parameter is the second argument. 14 00:01:32,150 --> 00:01:38,380 So access to that is the meaning of oxy. 15 00:01:39,170 --> 00:01:46,340 The second parameter is this string so that the EU contains a list of the arguments. 16 00:01:47,120 --> 00:01:55,490 So in this case, example here, the first argument is the name of the binary, which is Alvie zero 17 00:01:56,270 --> 00:02:05,090 and the second parameter name of the first parameter to the argument to the binary cell. 18 00:02:05,960 --> 00:02:10,190 So if you were to use these people just now, Hoxsey nanva. 19 00:02:15,780 --> 00:02:22,250 V0 will be see one Hungwe one would be tree to tree to tree. 20 00:02:25,450 --> 00:02:25,750 OK. 21 00:02:29,230 --> 00:02:30,350 So this is how it works. 22 00:02:30,940 --> 00:02:33,710 So over here, you can see that the signature is wrong. 23 00:02:34,360 --> 00:02:38,880 It's supposed to be like this, so we have to change it. 24 00:02:40,030 --> 00:02:47,130 Just click on this edit function signature and you can change the signature that actually. 25 00:02:48,470 --> 00:02:51,350 To see how you come. 26 00:02:53,160 --> 00:02:56,790 And for the second one, we will change it to. 27 00:03:00,140 --> 00:03:00,620 Char. 28 00:03:04,350 --> 00:03:05,180 Out the. 29 00:03:07,150 --> 00:03:15,870 So the two stars they missed and this is an array of strings to correspond to this, so these two are 30 00:03:15,880 --> 00:03:21,490 equal and you can use the square bracket in the in here. 31 00:03:21,580 --> 00:03:24,250 So we need to put to stock here. 32 00:03:27,050 --> 00:03:37,210 So a nice guy he didn't to clock and you can see now he's coming and going over here, so you notice 33 00:03:37,220 --> 00:03:39,910 some other changes that reflect this thing. 34 00:03:42,290 --> 00:03:47,240 Now, if I do this, you can do it by Control Z. 35 00:03:50,310 --> 00:03:54,450 You can also undo here and redo here. 36 00:03:55,160 --> 00:04:08,070 So before I rename the signature, he was like, this hardly makes no sense when I mean, he added the 37 00:04:08,080 --> 00:04:14,160 signature to become the correct means preventing each of these things make sense. 38 00:04:14,940 --> 00:04:21,300 So you can see here the program here is comparing where they are to arguments. 39 00:04:22,810 --> 00:04:32,120 Right, if there are two arguments, then you enter the loop, enter the block here in the first thing 40 00:04:32,120 --> 00:04:36,180 and you to get the length, get the length of the password. 41 00:04:36,310 --> 00:04:38,470 This is a password that it is looking for. 42 00:04:39,550 --> 00:04:42,030 So we know that it is linked. 43 00:04:42,610 --> 00:04:44,940 So we rename it correctly. 44 00:04:46,210 --> 00:04:50,190 We numerable to Shaherkani Elche. 45 00:04:51,460 --> 00:04:52,840 Maybe I can remember something. 46 00:04:57,420 --> 00:05:04,620 So now it's easier to read then today, once he's got the line, he's going to do a string and compare. 47 00:05:06,870 --> 00:05:14,460 Strong and compact, so if you don't know what this means, you can always refer to the Gitanes point, 48 00:05:15,450 --> 00:05:17,130 a search. 49 00:05:18,430 --> 00:05:21,250 String compay. 50 00:05:24,640 --> 00:05:33,310 And you can click on the first rizza and you can read all about it and compare compares to swing swing 51 00:05:33,310 --> 00:05:38,480 on a swing to get up to the number of characters. 52 00:05:39,220 --> 00:05:43,270 So if you specify three characters, you to compare three characters here. 53 00:05:43,280 --> 00:05:46,420 And here is an example. 54 00:05:47,350 --> 00:05:54,100 So in this case, you have to string a string when it's trying to string one is lowercase A, B, C, 55 00:05:54,100 --> 00:05:56,980 D, E, F, string two is a case. 56 00:05:58,090 --> 00:06:04,930 So when you call string and compare is comparing the first four characters, string one, extreme two. 57 00:06:06,190 --> 00:06:17,380 So it is comparing A, B, C, D from here with A, B, C, D from here and returning the result even 58 00:06:17,530 --> 00:06:22,360 to the two strings matches, he will return zero as a result. 59 00:06:23,680 --> 00:06:26,260 So zero means the strings are identical. 60 00:06:28,500 --> 00:06:33,570 If the streets are not the same, either return less than zero, I'll be gone in zero. 61 00:06:34,740 --> 00:06:43,980 So this is how Street and Compare works now applying this knowledge to and then it is the street and 62 00:06:43,980 --> 00:06:52,550 convey here is comparing the user input, how everyone feels that way and is comparing for the length. 63 00:06:53,520 --> 00:06:58,050 So the line of this person is provided by Swingline. 64 00:06:58,830 --> 00:07:05,700 So the line should be one, two, three, four, five, six, seven, eight, nine, nine to nine. 65 00:07:06,390 --> 00:07:10,740 So you regret the first nine character of your input. 66 00:07:11,490 --> 00:07:16,710 How P1 and comparing it to nine characters from Hecate. 67 00:07:16,710 --> 00:07:21,280 You if they're identical, then the result will be zero. 68 00:07:22,620 --> 00:07:29,970 So we know that is the result of the extreme compay we can reliably by clicking and we need. 69 00:07:31,730 --> 00:07:33,410 Maybe you can call it a. 70 00:07:35,500 --> 00:07:43,220 Should it be easier to read and if there is zero, there is a user that they cannot possibly and so 71 00:07:43,240 --> 00:07:45,040 you would be incorrect, that password. 72 00:07:45,170 --> 00:07:46,840 Was this the whole time? 73 00:07:48,280 --> 00:07:55,630 All right, this is a format specified in C language, so whenever you see percentages, he means that 74 00:07:55,750 --> 00:08:03,650 he will substitute this variable inside here and print the original parts of it in here. 75 00:08:04,480 --> 00:08:07,270 So let's try it out now so we know the password must be this. 76 00:08:07,940 --> 00:08:10,930 So let's go to our terminal, Insana. 77 00:08:15,840 --> 00:08:19,170 So now we're going into this massive Hecate you. 78 00:08:21,030 --> 00:08:31,710 Hey, uh, did you hit enter and he correct that was you this whole time, so this string is coming 79 00:08:31,710 --> 00:08:33,730 from here and. 80 00:08:34,290 --> 00:08:36,170 Yes, he's coming from here. 81 00:08:36,750 --> 00:08:41,700 So this percentage has seized the passport itself, which is how we won. 82 00:08:41,960 --> 00:08:47,310 We ended up here, so we won and we won. 83 00:08:47,850 --> 00:08:56,330 His argument to the binary how V0 is the name of the binary. 84 00:08:56,340 --> 00:09:04,380 So if you had two parameters, then the second argument would be at we to be zero. 85 00:09:04,710 --> 00:09:05,520 I'll be one. 86 00:09:05,850 --> 00:09:13,500 How we do this is how the second barometer works, right? 87 00:09:14,190 --> 00:09:22,160 So now we saw Quami One and this is basically the technical analysis, Hindiya. 88 00:09:23,010 --> 00:09:30,930 We will try to analyze the computer code and rename the labels until it makes sense. 89 00:09:31,800 --> 00:09:41,090 So in our view, it's almost like the original lead compact of the original C program itself and is 90 00:09:41,100 --> 00:09:44,730 much easier to read than the assembly version. 91 00:09:45,510 --> 00:09:49,350 And so that's all for this video. 92 00:09:50,310 --> 00:09:56,880 Before you close on C, on C, Sehar. 93 00:09:59,800 --> 00:10:09,340 OK, so when you close this in reopening in all you relabel items are still the. 94 00:10:12,370 --> 00:10:20,750 We have not lost it, so if you go back to the functions main and reopen me, you will see that the 95 00:10:20,750 --> 00:10:22,660 reading labels are intact. 96 00:10:25,070 --> 00:10:25,550 Right. 97 00:10:25,580 --> 00:10:27,860 So this one has you in the next one. 98 00:10:27,890 --> 00:10:28,970 Thank you for watching.