1
00:00:00,240 --> 00:00:04,120
Hello everyone and welcome to the first bonus lecture of this project.

2
00:00:04,200 --> 00:00:11,940
And in this video I want to show you a quick and easy way to make your backdoor connect every 20 seconds.

3
00:00:11,940 --> 00:00:13,470
So what do you mean by that.

4
00:00:13,470 --> 00:00:19,240
Well let's say for example the target executes your backdoor before you get to run your server.

5
00:00:19,260 --> 00:00:20,220
What happens then.

6
00:00:20,430 --> 00:00:26,130
Well you didn't manage to connect the target for close its connection and its backdoor and you didn't

7
00:00:26,130 --> 00:00:27,540
successfully hack them.

8
00:00:27,540 --> 00:00:30,010
So we wouldn't want that to happen right.

9
00:00:30,030 --> 00:00:37,920
Well then we can add an option to our backdoor which will try to connect to the server every 20 seconds.

10
00:00:37,920 --> 00:00:39,390
So how can we do that.

11
00:00:39,390 --> 00:00:44,910
Well go to your backdoor program and scroll all the way down first that we will do is we are going to

12
00:00:44,910 --> 00:00:48,860
delete these two lines which is the escort connect and the shell function.

13
00:00:48,870 --> 00:00:50,840
We're not going to call them there.

14
00:00:50,880 --> 00:00:58,800
We're going to call a different function that we're going to code right now which we can call connection.

15
00:00:58,950 --> 00:01:00,540
Simple as that.

16
00:01:00,540 --> 00:01:03,830
Now let's crawl all the way up and create that function.

17
00:01:04,000 --> 00:01:08,910
It right here above the shell function defined connection

18
00:01:12,590 --> 00:01:18,210
and what we're going to do right now is we're going to enter the infinite while True loop.

19
00:01:18,510 --> 00:01:22,330
We will sleep for 20 seconds before we do anything.

20
00:01:22,390 --> 00:01:27,940
And for this function to work we need to import the time library so let's go all the way up and import

21
00:01:27,970 --> 00:01:31,750
time library import time.

22
00:01:31,870 --> 00:01:37,210
And the reason why we are entering the infinite while True loop is because we're going to try to connect

23
00:01:37,360 --> 00:01:39,220
forever until it works.

24
00:01:39,220 --> 00:01:46,930
So we're going to try as Dot connect make sure you specified the correct IP address in my case when

25
00:01:46,930 --> 00:01:56,660
I do that 168 that funded for Port 5 5 5 5 and if we manage to connect only then we enter the shell

26
00:01:56,660 --> 00:02:04,080
function after that we can close the socket object since it will be closing after the shell function

27
00:02:04,620 --> 00:02:10,650
which means we specified quit command and broke out of this loop then we'll close the socket object

28
00:02:10,890 --> 00:02:16,980
and then we can break out of this while True loop the reason why we're using this break statement is

29
00:02:16,980 --> 00:02:21,410
because we have our while True loop inside of a while True loop.

30
00:02:21,480 --> 00:02:27,420
And once we specify quit right here we only break out of this while loop that we proceed to the next

31
00:02:27,420 --> 00:02:32,640
step which is closing the socket object and then we can use the break statement to break out of this

32
00:02:32,640 --> 00:02:33,770
while loop.

33
00:02:34,020 --> 00:02:39,200
And with that we would close the program in case this doesn't work.

34
00:02:39,510 --> 00:02:43,330
What we want to do is we want to call the connection function again.

35
00:02:43,380 --> 00:02:45,890
So we're going to call it from itself.

36
00:02:45,930 --> 00:02:48,690
Therefore every time it doesn't manage to connect.

37
00:02:48,780 --> 00:02:54,690
That means the target still didn't run our backdoor and it will go to the beginning of the to loop every

38
00:02:54,690 --> 00:03:00,210
time it will sleep for 20 seconds and then it will try to connect if it doesn't manage to connect.

39
00:03:00,210 --> 00:03:03,300
That means that the user of the server didn't run the server yet.

40
00:03:03,330 --> 00:03:08,010
Therefore it will go to the beginning of the world to loop and it will sleep for 20 seconds and try

41
00:03:08,010 --> 00:03:14,760
to connect once again and it will repeat this until we run the server and then it will successfully

42
00:03:14,760 --> 00:03:16,000
connect to us.

43
00:03:16,090 --> 00:03:16,470
Okay.

44
00:03:16,920 --> 00:03:21,440
So this is the first bonus lecture where I show you this function if you want you can implement it.

45
00:03:21,450 --> 00:03:22,710
It is really useful.

46
00:03:22,740 --> 00:03:27,870
So I would advise you to implement it and in the next video I'll show you how you can make your backdoor

47
00:03:27,960 --> 00:03:28,890
look like an image.

48
00:03:29,220 --> 00:03:29,560
OK.

49
00:03:30,240 --> 00:03:32,850
Thank you for watching and see you in the next lecture by.
