1
00:00:00,540 --> 00:00:09,180
So this video, we're going to start some Python programs to write some DOS and to get some information

2
00:00:09,660 --> 00:00:15,450
for Stroner going to release Balaklava, this banner will be sent by the server when we connect to the

3
00:00:15,450 --> 00:00:15,880
server.

4
00:00:16,320 --> 00:00:22,850
So I have already run this map, scan on the matter, spreadable to using this version scanning.

5
00:00:22,860 --> 00:00:27,500
And we got the version numbers, which you can see on television.

6
00:00:27,510 --> 00:00:32,920
But this is version of we really want this open version and so on.

7
00:00:33,360 --> 00:00:40,170
So now we are going to write some Python script and we are going to connect the server whenever we can

8
00:00:40,170 --> 00:00:40,920
to the server.

9
00:00:41,010 --> 00:00:42,800
Nazarro sends us the banner.

10
00:00:43,080 --> 00:00:50,580
There is the message of its version that, uh, that is the server, uh, service.

11
00:00:50,580 --> 00:00:52,060
That is the service running on the port.

12
00:00:52,320 --> 00:00:55,010
So first we need to import a module called socket.

13
00:00:56,700 --> 00:00:59,980
So this is a by default module.

14
00:00:59,980 --> 00:01:06,650
And not only to start this hour with using the default by, uh, Python installation.

15
00:01:07,020 --> 00:01:14,640
So we have that this sucker might know this socket is the combination of an IP address and a port.

16
00:01:14,670 --> 00:01:18,920
No, this is how it works on the transporter here.

17
00:01:19,020 --> 00:01:22,590
And then it will use it to establish the communication.

18
00:01:23,220 --> 00:01:23,700
Right.

19
00:01:23,700 --> 00:01:25,660
Communication between the sender and receiver.

20
00:01:26,310 --> 00:01:33,030
So we need to create the socket object first, whether it is IP version for our IP options in the TCP

21
00:01:33,030 --> 00:01:37,620
socket or UDP socket, we are already seen these protocols, the networking fundamentals.

22
00:01:38,070 --> 00:01:40,590
So that socket object is equal to.

23
00:01:40,830 --> 00:01:49,170
I'm defining as this as this close to socket dot and inside the socket marju the socket function to

24
00:01:49,170 --> 00:01:50,400
describe the socket.

25
00:01:52,170 --> 00:01:52,910
So off.

26
00:01:53,250 --> 00:02:02,330
We need to do put parameters that is important for our and six and PXP or Redzepi, so that's a socket,

27
00:02:02,820 --> 00:02:05,740
not if underscore it.

28
00:02:06,840 --> 00:02:12,280
So this is address family Internet and this represents the IP version four.

29
00:02:12,420 --> 00:02:16,440
So if you type on the screen, it will show you is telling me.

30
00:02:16,440 --> 00:02:23,790
I have on the screen at 60 also, which is sort of IP version six since you are going to use our IP

31
00:02:23,790 --> 00:02:24,260
address.

32
00:02:25,080 --> 00:02:31,220
So there is a for us, you can use the safe on the screen and socket.

33
00:02:31,380 --> 00:02:32,980
Not so Sarcone.

34
00:02:35,100 --> 00:02:42,180
So I can you can see here Sargon, which is a streaming packet that is sticky and you can see if I can

35
00:02:42,180 --> 00:02:49,250
describe it, is Raupach and Sakurako, which is you know, we are going to use this on this question.

36
00:02:50,280 --> 00:02:56,160
So I have described describe the socket object and the socket of these properties.

37
00:02:56,340 --> 00:02:58,530
Define it, which is IP version four.

38
00:02:58,650 --> 00:03:07,620
And so now what we're going to do is we are going to connect to this IP address and the number will

39
00:03:07,740 --> 00:03:10,830
say, yes, that there is a correct function.

40
00:03:12,490 --> 00:03:17,400
And what you want to do is to pass the couple of the IP address and the number.

41
00:03:17,970 --> 00:03:20,520
So that is defined by normal open.

42
00:03:20,850 --> 00:03:21,090
Right.

43
00:03:21,630 --> 00:03:27,690
And this IP addresses of 100, 160 zero on not one.

44
00:03:30,340 --> 00:03:42,520
And to put the, uh, quotations on and to do that 168 zero one one zero one and use this comma and

45
00:03:42,520 --> 00:03:48,160
you need to specify the number, since this is our first program, we just, uh, give the phone number

46
00:03:48,160 --> 00:03:56,800
directly in the next program to the port, and then we will just automatically, uh, receive the banner

47
00:03:57,670 --> 00:03:58,690
if the port is open.

48
00:03:58,840 --> 00:04:02,020
So 21 is open and we are going to give the Canadian port.

49
00:04:04,910 --> 00:04:13,670
So now, after this trip, my connection has been established with this server and the service associated

50
00:04:13,670 --> 00:04:15,620
are running on the border, No.

51
00:04:15,920 --> 00:04:16,160
One.

52
00:04:20,520 --> 00:04:27,600
So many stories like FTB servers and the IRS of observers will send the banner Fuster to you and your

53
00:04:27,600 --> 00:04:28,090
character.

54
00:04:28,410 --> 00:04:31,020
So we need to see that message.

55
00:04:31,980 --> 00:04:39,450
To send a message is equal to a solid object pursuit we need to receive from the target of the two Seawolf

56
00:04:39,750 --> 00:04:41,280
number of bytes you want to receive.

57
00:04:41,490 --> 00:04:47,250
So each character represents one by Alphabet represents one, but B represents one.

58
00:04:47,290 --> 00:04:53,340
But so the maximum as it could be two zero four two zero four bytes.

59
00:04:53,640 --> 00:04:58,040
And you need to decode because it will be in Robert's format.

60
00:04:58,320 --> 00:05:02,600
So it will be like B, a current or rasping, etc..

61
00:05:02,880 --> 00:05:07,500
So in order to decode this one, you need to use this that decode.

62
00:05:07,500 --> 00:05:10,290
So our message record and will be supporting this message.

63
00:05:11,190 --> 00:05:14,550
Now all you need to do is you need to print this message.

64
00:05:16,020 --> 00:05:20,430
And I think we can just simply close the connection, which we are open.

65
00:05:21,390 --> 00:05:24,540
So this is a simple banner grammar program.

66
00:05:25,320 --> 00:05:31,290
We are putting the socket module and we are creating the socket using the socket function with the IP

67
00:05:31,290 --> 00:05:33,050
version for another piece of it.

68
00:05:33,900 --> 00:05:39,600
And we are connecting to this IP address and phone number and we are receiving the message from the

69
00:05:39,930 --> 00:05:47,610
server and we are receiving it, uh, close to zero for it and we are decoding it now.

70
00:05:47,610 --> 00:05:51,150
It will be in human history and we are going to print this.

71
00:05:51,300 --> 00:05:53,200
And again, we are closing the connection.

72
00:05:53,760 --> 00:05:54,990
So let me run this group.

73
00:05:57,270 --> 00:06:05,580
And as you can see, it is gurantee that is the TV number and you can see in brackets SFP two point

74
00:06:05,580 --> 00:06:06,220
three point four.

75
00:06:06,720 --> 00:06:13,230
So let's go ahead and you can see this is the same version number we have got from the unmap also.

76
00:06:13,470 --> 00:06:16,260
Now, let's try for point number twenty two.

77
00:06:20,120 --> 00:06:27,380
So as you can see, we got the necessity to open an extra set of tools or training for another one.

78
00:06:28,980 --> 00:06:35,040
Let's try to find 139, maybe we get out, we do not get.

79
00:06:45,930 --> 00:06:52,410
We're not getting from that, so let's try another service that said this on profligately two on one.

80
00:06:58,170 --> 00:07:06,540
So this map will have some script to get this number like Bernard Grabber and some other unique techniques

81
00:07:06,540 --> 00:07:07,480
for these spots.

82
00:07:07,530 --> 00:07:13,800
So this is General, a basic Bernard Weber from the Python code.

83
00:07:14,850 --> 00:07:18,490
You can see the property preserver and the version one point three point one.

84
00:07:19,920 --> 00:07:21,180
So that's all for this video.

85
00:07:21,210 --> 00:07:23,070
I hope you have understood the burning rubber.

86
00:07:23,340 --> 00:07:30,000
This soccer programming is very important and you will need this in the for us also.

87
00:07:30,120 --> 00:07:38,700
So just practicing it is very easy in Python syntax in C, it is very tough even for basic brogrammer.

88
00:07:38,730 --> 00:07:40,620
You need to get a lot of a lot of code.

89
00:07:40,890 --> 00:07:42,460
And in Python it's very easy.

90
00:07:42,480 --> 00:07:45,420
That's why a lot of people use this python.

91
00:07:45,870 --> 00:07:52,140
And in my college there is a C programming networking YRC and it's very, very tough.

92
00:07:52,140 --> 00:07:58,250
So that's why this is very easy, because it does not even contain software.

93
00:07:58,380 --> 00:08:03,630
So that's why I recommend you to practice until you get some clarification.

94
00:08:03,630 --> 00:08:04,800
All the soccer programming.

