WEBVTT

00:01.880 --> 00:04.920
Uh, okay, let's go back here.

00:04.920 --> 00:07.800
We have package copy the raw load.

00:08.000 --> 00:12.360
I think this has a little very small weakness.

00:13.280 --> 00:14.840
Let me come right in here.

00:17.200 --> 00:21.720
Let's re-execute the program.

00:21.720 --> 00:27.200
And here, you know that while I hit log in, it will capture the data.

00:28.040 --> 00:28.400
Okay?

00:28.440 --> 00:30.400
Only username and password.

00:32.480 --> 00:33.080
Okay.

00:35.960 --> 00:36.600
Something.

00:36.600 --> 00:37.840
Some big data.

00:37.880 --> 00:39.000
Hit login.

00:39.040 --> 00:41.960
Do not save it here.

00:41.960 --> 00:42.480
You see.

00:42.520 --> 00:42.800
Okay.

00:42.840 --> 00:43.400
It is.

00:43.440 --> 00:44.960
It did capture that.

00:44.960 --> 00:45.400
Okay.

00:46.920 --> 00:52.840
But while I am here, for example, I hit this dictionary something.

00:53.040 --> 00:54.480
Let's go back here.

00:56.600 --> 00:58.520
It's not capturing anything.

01:02.040 --> 01:02.980
Oh my God.

01:04.500 --> 01:04.820
Okay.

01:04.860 --> 01:05.740
It does capture.

01:05.780 --> 01:06.140
Okay.

01:07.100 --> 01:09.500
It is capturing other data as well.

01:10.580 --> 01:18.140
And this is one of the weakness of our program that instead of printing this here, we need to search

01:18.180 --> 01:27.260
inside a list or from a dictionary or something that if a specific word or keyword exists into the list,

01:27.260 --> 01:28.340
then print that for me.

01:28.340 --> 01:30.980
If not, that is not then okay.

01:32.340 --> 01:32.580
So.

01:34.660 --> 01:44.060
Uh, for that, instead of printing this, I need to do another thing that is, uh, I need to save

01:44.060 --> 01:45.420
this into a variable.

01:45.460 --> 01:45.900
Okay.

01:48.540 --> 01:51.140
Let's name it load.

01:51.460 --> 01:53.260
So this load is equal to this.

01:53.700 --> 01:54.140
Okay.

01:54.420 --> 01:56.220
Now I have all the packs.

01:56.260 --> 01:58.460
All data that belongs to load.

01:58.460 --> 02:00.420
Raw is inside load.

02:01.020 --> 02:04.030
Uh, word okay or Your word.

02:04.070 --> 02:09.510
Okay, now I have another thing called keywords.

02:09.550 --> 02:09.750
Okay.

02:09.790 --> 02:11.110
It is going to be a list.

02:11.990 --> 02:18.030
So here let's use username.

02:18.030 --> 02:20.070
One of those thing is going to be username.

02:20.070 --> 02:22.190
The other one is going to be user.

02:22.230 --> 02:23.790
And let me show you that here.

02:24.030 --> 02:28.110
For example you see we have username is equal to admin.

02:28.110 --> 02:30.030
Password is equal to something like this.

02:30.350 --> 02:34.390
Now I'm searching I'm adding this username into my list.

02:34.670 --> 02:42.950
Sometimes some other programmer may name their variable user or someone may call it something else.

02:43.030 --> 02:44.790
So I am giving those things here.

02:44.790 --> 02:53.230
For example, someone is going to give login or someone may give pass or even password okay.

02:54.550 --> 02:56.550
You can add more words here.

02:56.550 --> 02:58.310
So now we have keyword.

02:58.350 --> 03:01.670
I am going to use a for loop to search inside keyword.

03:01.990 --> 03:06.770
So let's use for We have keyword okay.

03:08.010 --> 03:08.730
Keyword.

03:13.810 --> 03:14.290
In.

03:18.010 --> 03:18.570
In.

03:18.570 --> 03:19.650
Keywords.

03:19.690 --> 03:19.890
Okay.

03:19.930 --> 03:25.410
Keywords is this list that we are going to search keyword inside them okay.

03:26.010 --> 03:26.290
So.

03:28.450 --> 03:28.650
Uh.

03:28.650 --> 03:29.370
What happened?

03:30.250 --> 03:30.650
Okay.

03:32.330 --> 03:37.090
Now here we are searching for keyword in keywords.

03:37.130 --> 03:42.930
Let's check if this keyword that we are searching inside keywords is inside the load.

03:43.170 --> 03:44.130
Then let's print that.

03:44.170 --> 03:44.610
If not.

03:44.610 --> 03:48.330
So not if we have the keyword okay.

03:48.490 --> 03:54.650
If keyword um in load okay.

03:54.690 --> 03:56.730
Which has that data inside.

03:56.970 --> 04:04.570
If that is inside then let's use print method and change the load.

04:07.260 --> 04:12.020
And let's use break.

04:12.060 --> 04:17.020
Let me save this now and go back to where I was.

04:17.060 --> 04:17.220
Okay.

04:17.220 --> 04:19.100
Let me introduce Ctrl C.

04:20.260 --> 04:24.780
And here if I come back here we have the logout.

04:25.260 --> 04:32.540
Let's log out that and try to execute our program.

04:32.580 --> 04:32.900
Okay.

04:32.940 --> 04:40.980
Now we are logged out I'm going to log in I have admin and this time I'm going to add admin space admin

04:40.980 --> 04:41.940
hit login.

04:42.940 --> 04:44.220
Now I'm logged in.

04:44.420 --> 04:51.860
And right here you see our program has an error and that is print.

04:52.620 --> 04:54.140
So result.

04:56.340 --> 04:58.740
If keyword in load.

04:58.860 --> 04:59.220
Okay.

04:59.260 --> 05:00.460
What does this mean.

05:00.500 --> 05:01.860
Type error okay.

05:01.900 --> 05:05.060
Object is required not string.

05:05.100 --> 05:06.420
Oh sorry for that.

05:08.160 --> 05:11.480
If keyword in load.

05:12.400 --> 05:18.480
This load is something else and it's kind of object.

05:18.480 --> 05:21.120
And you're searching keyword okay.

05:21.160 --> 05:23.360
Which are string inside this.

05:24.000 --> 05:25.080
Let's go.

05:25.120 --> 05:26.040
Let's come here.

05:26.280 --> 05:27.640
As you see this keyword is string.

05:27.640 --> 05:34.960
I want to change this load back to something else like uh str.

05:38.200 --> 05:43.840
Let me save this again and try to execute this.

05:46.960 --> 05:48.040
Let's come back here.

05:48.120 --> 05:49.240
Hit logout.

05:54.120 --> 05:59.520
Uh, let's hit login.

06:00.920 --> 06:03.600
Add some fake data and login.

06:03.640 --> 06:04.640
Don't save it.

06:05.320 --> 06:06.240
Come right here.

06:06.320 --> 06:12.610
You see, right now we are capturing the admin and also the password username is equal to admin.

06:12.610 --> 06:14.450
Password is equal to something like this.

06:14.970 --> 06:17.490
And now let's come back here.

06:20.250 --> 06:20.850
And.

06:23.210 --> 06:28.650
Let's hit that and add something else.

06:28.650 --> 06:32.130
For example if there is any link okay.

06:32.130 --> 06:33.530
This thing anything.

06:35.050 --> 06:40.410
Now as you see we are not capturing anything more than this one.

06:40.490 --> 06:40.770
Why?

06:41.170 --> 06:45.290
Because it only has this username.

06:45.330 --> 06:45.650
Okay.

06:45.690 --> 06:50.970
That node has this username and username keyword.

06:51.010 --> 06:53.730
And right now I'm only capturing this one.

06:53.930 --> 06:55.490
Nothing else.

06:55.530 --> 06:55.970
Okay.

06:59.210 --> 07:00.410
So perfect.

07:00.610 --> 07:02.930
Now you filter this in a better way.

07:02.970 --> 07:03.610
Okay.

07:03.650 --> 07:08.570
I'm sure we can do a lot more cool stuff than this.

07:08.610 --> 07:11.330
Let's go and see if we are able or not.
