WEBVTT

00:02.120 --> 00:04.720
Okay, now let's go create our keylogger.

00:05.920 --> 00:11.040
For creating keylogger we need to use a module called our input.

00:11.920 --> 00:19.960
So this pi input if you want to learn more more than this course you can go and read its documentation

00:20.000 --> 00:20.760
okay.

00:20.800 --> 00:23.360
So first you need to install this module.

00:23.360 --> 00:25.040
Very easy okay.

00:25.040 --> 00:33.920
Come to your terminal use pip or pip three okay pip three install pi and hit enter.

00:34.480 --> 00:40.960
And if you don't have it installed so it will be installed into the system that you are using if you

00:41.000 --> 00:41.480
have it.

00:41.480 --> 00:42.720
So you have it.

00:42.760 --> 00:44.600
See that I already have this.

00:46.120 --> 00:52.160
And like every other module that we were using here, we need to import this okay.

00:53.520 --> 00:57.240
Import I input dot keyboard.

00:58.800 --> 01:02.800
And here we need to create a keyboard listener.

01:03.440 --> 01:08.520
So let's name it keyboard underscore listener.

01:10.840 --> 01:20.380
So this is equal to pi input dot keyboard dot listener because we are creating a keyboard listener.

01:20.700 --> 01:24.660
So it's going to be input that keyboard dot listener.

01:25.100 --> 01:31.060
Here we need to call a callback function that we are going to create.

01:31.700 --> 01:34.660
So here we use Onpress.

01:35.980 --> 01:39.900
And here you can name any function you want.

01:39.900 --> 01:44.180
But for me it is going to be passes key.

01:46.220 --> 01:46.620
Please.

01:47.940 --> 01:50.060
Okay I will create this function.

01:51.780 --> 01:52.980
Let's create it here.

01:54.300 --> 01:56.700
Div prices.

01:58.940 --> 01:59.580
Are.

02:01.700 --> 02:02.820
The price.

02:04.780 --> 02:07.540
And we are going to give the key as argument.

02:07.620 --> 02:12.660
And right now I'm just going to print key.

02:14.940 --> 02:19.300
And down here we are going to use width.

02:20.500 --> 02:22.340
We have the keyboard listener okay.

02:23.100 --> 02:24.300
Keyboard listener.

02:25.500 --> 02:32.570
Down here I need to use something called keyboard And listener dot.

02:33.370 --> 02:33.930
Join.

02:34.850 --> 02:37.530
Join is a method that you can use to start this.

02:37.530 --> 02:37.930
Okay.

02:38.650 --> 02:39.130
Now.

02:39.130 --> 02:45.610
Right now we are just printing any key that is going to be executed.

02:45.650 --> 02:48.210
Okay so let's come here.

02:48.850 --> 02:50.290
I'm going to clear this.

02:53.090 --> 02:53.690
Okay.

02:53.690 --> 02:56.410
Let's use Python key logger.py.

02:56.930 --> 03:00.450
So you see right now it is executing and it's doing nothing.

03:00.890 --> 03:04.770
So here let's in this terminal write something anything.

03:04.810 --> 03:05.090
Okay.

03:05.130 --> 03:06.610
For example hello.

03:07.690 --> 03:15.050
You see right now that I am typing anything here, you see that we are receiving it in this terminal.

03:17.570 --> 03:21.050
See I am pressing backspace.

03:21.050 --> 03:23.530
It is giving me that you're pressing backspace.

03:24.410 --> 03:27.530
I'm pressing one two capslock.

03:27.570 --> 03:33.650
Anything that I'm pressing that is giving me that right here.

03:33.930 --> 03:43.010
So this program you learned very simple thing and that is how to capture that on press okay and print

03:43.010 --> 03:44.530
that on the terminal.

03:45.250 --> 03:46.730
So thanks for watching.
