1 00:00:04,930 --> 00:00:09,280 HTP Heathers, hello, everyone. 2 00:00:09,640 --> 00:00:11,280 Welcome back to the course. 3 00:00:11,290 --> 00:00:17,860 Today, we're going to talk about HTP Kidder's and what HTP killers, if you remember, who actually 4 00:00:18,580 --> 00:00:20,230 did some calling regarding them. 5 00:00:20,890 --> 00:00:29,980 HTP killers are basically the information that HTP file contains, which is located on the top of the 6 00:00:29,980 --> 00:00:31,480 HTP message. 7 00:00:32,200 --> 00:00:39,630 In the for example, you can see in front of you how actually the HTP killer looks like. 8 00:00:39,880 --> 00:00:45,880 So you have hear what is being accepted, what is the sentence coding. 9 00:00:46,090 --> 00:00:47,790 What is the sentence language. 10 00:00:48,310 --> 00:00:49,600 What is the connection. 11 00:00:50,750 --> 00:00:58,580 What is the cost and also the browser that we enter from quite simple. 12 00:00:59,030 --> 00:01:05,500 So usually the HTP request contains two main parts disserve the header in the body. 13 00:01:06,590 --> 00:01:14,090 So usually in the header you can see information about the specific data that is inside the HTP protocol, 14 00:01:14,630 --> 00:01:18,740 and it will basically do how you can interpret the data. 15 00:01:19,280 --> 00:01:26,180 For example, here, if you have the asset language to us English, we know that the rest of the code, 16 00:01:26,180 --> 00:01:31,130 it's probably going to be in the US English or the whole website actually. 17 00:01:31,760 --> 00:01:38,930 For example, quite important part of the header is the host header because many of the websites out 18 00:01:38,930 --> 00:01:45,770 there or the Web server section out there allows you to host more than one website at the same time 19 00:01:46,220 --> 00:01:48,180 using the same IP address. 20 00:01:48,560 --> 00:01:57,300 So, for example, if we're using the DNS protocol, you can have various to website domains, but of 21 00:01:57,300 --> 00:01:59,180 course it from the same IP address. 22 00:01:59,450 --> 00:02:03,050 So let's write one code that is actually going to show this. 23 00:02:03,420 --> 00:02:11,810 So let's write the script that will actually obtain a header over a website using the response object 24 00:02:11,810 --> 00:02:14,880 in response to libraries that we already know. 25 00:02:15,770 --> 00:02:21,190 So here in this project that you already created here by opening the exceptional UI. 26 00:02:21,470 --> 00:02:29,270 So here, if a person you file and I select Python file, let's name it here, there's. 27 00:02:31,260 --> 00:02:37,620 Kidders, OK, so now we're taking the kids file and this file, as you can see. 28 00:02:37,650 --> 00:02:42,550 Once we created it, it is automatically created inside our resource folder. 29 00:02:42,780 --> 00:02:47,910 So now we have here the heroes will be white and we can actually write code inside it. 30 00:02:48,360 --> 00:02:58,470 So let's write let's write the hashtag and then the user slash bin slash E and the V. 31 00:03:00,490 --> 00:03:01,400 Python three. 32 00:03:01,780 --> 00:03:13,630 OK, so this is the environmental files and then this right import, you are L Library DOT request. 33 00:03:15,120 --> 00:03:22,680 And then and that's right, Eurail is going to be the name of what we're creating input's. 34 00:03:24,590 --> 00:03:27,110 And then in third. 35 00:03:29,530 --> 00:03:40,380 D you rl same column, and here we're going to ask the user to actually enter the euro now. 36 00:03:40,450 --> 00:03:42,220 That's right, HTP. 37 00:03:44,650 --> 00:03:54,190 Response, you quote to Eurorail library dot request dot Eurail. 38 00:03:56,520 --> 00:04:02,370 Open ended right here, your you are out. 39 00:04:04,510 --> 00:04:12,460 OK, so we will take the euro that the user has imported with the input command and then we're going 40 00:04:12,460 --> 00:04:16,990 to do an open of this IP address or this. 41 00:04:19,370 --> 00:04:27,890 You are actually so let's write them HTP, actually, all right, if HTP. 42 00:04:30,220 --> 00:04:31,150 Underscore. 43 00:04:32,980 --> 00:04:33,910 Response. 44 00:04:36,180 --> 00:04:45,540 Actually misspelled this, OK, stupidness corresponds to the DOT code is equal to 200, so this means 45 00:04:45,540 --> 00:04:55,440 that our request has been accepted and then we would like to print HTP response DOT. 46 00:04:57,650 --> 00:04:58,460 Cather's. 47 00:05:01,390 --> 00:05:03,250 OK, and then for. 48 00:05:05,020 --> 00:05:13,170 Key Coahoma value in HTP response. 49 00:05:13,840 --> 00:05:17,020 Don't get Kidder's. 50 00:05:18,150 --> 00:05:20,080 OK, here I misspelled for. 51 00:05:21,520 --> 00:05:29,770 Let's see, OK, this is from Wolf now, so for Keun value in getthere, there's old age to tip your 52 00:05:29,770 --> 00:05:35,440 response, let's print key and vital. 53 00:05:35,560 --> 00:05:40,930 OK, so we're going to print both of those elements inside our get headers. 54 00:05:41,800 --> 00:05:44,110 So let's actually save that. 55 00:05:44,110 --> 00:05:47,020 And they say that and let's go to our terminal. 56 00:05:47,050 --> 00:05:49,020 I hope you understand what's happening here. 57 00:05:49,320 --> 00:05:55,420 We're simply going to output the header and print some additional information about it. 58 00:05:55,660 --> 00:05:57,730 But let's from the code and see what happens. 59 00:05:59,140 --> 00:06:07,460 So if it was here, you can see that now we have two files and I will do Python exceptional. 60 00:06:07,460 --> 00:06:08,200 Not quite. 61 00:06:08,650 --> 00:06:09,700 Let's run the code. 62 00:06:10,570 --> 00:06:11,650 Oops, sorry. 63 00:06:11,650 --> 00:06:13,390 We had to run actually the headers. 64 00:06:13,960 --> 00:06:25,360 So let's from here there will be way and it asks you to write your so I write htp YouTube dot com. 65 00:06:27,610 --> 00:06:29,230 And let's see what happens here. 66 00:06:29,800 --> 00:06:39,640 So as you can see, guys, the call to went through YouTube dot com, where did I write it here? 67 00:06:40,480 --> 00:06:47,350 And then we started getting all the content of the YouTube dot com so we can see the date. 68 00:06:47,500 --> 00:06:50,290 We can see some security guidelines. 69 00:06:50,470 --> 00:06:53,030 You can see the server name itself. 70 00:06:53,050 --> 00:06:55,330 This is also the server of YouTube. 71 00:06:55,900 --> 00:07:00,190 We can see the set cookies mechanism and so on. 72 00:07:00,310 --> 00:07:05,230 You we will get information for the search for multiple servers. 73 00:07:05,740 --> 00:07:11,710 So this is how basically the header looks like and this is how you are basically getting the header, 74 00:07:12,100 --> 00:07:14,870 the key and the value of the header as well. 75 00:07:15,640 --> 00:07:16,870 So that's it. 76 00:07:16,900 --> 00:07:18,610 Guys, thanks very much for watching. 77 00:07:18,640 --> 00:07:27,250 I hope the HTP shares are careful now and how we can basically extract this information from Internet. 78 00:07:27,850 --> 00:07:32,800 Please bear with me in the next video where we're going to cover the other agents. 79 00:07:34,020 --> 00:07:35,010 Thanks for watching.