WEBVTT - This file was automatically generated by VIMEO

0
00:00:05.200 --> 00:00:08.500
Hi, so in this lesson we are going to see a

1
00:00:08.500 --> 00:00:11.500
 simple post-based matcher. But this time in

2
00:00:11.500 --> 00:00:12.200
 the header.

3
00:00:12.900 --> 00:00:15.800
The matching condition is going to match the

4
00:00:15.800 --> 00:00:16.600
 specified.

5
00:00:17.300 --> 00:00:20.100
Input in the header that we want to

6
00:00:20.100 --> 00:00:23.000
 search for to get a successful output.

7
00:00:23.700 --> 00:00:26.900
As you can see on your screen. Yes a sample

8
00:00:26.900 --> 00:00:29.800
 template that we can see this is

9
00:00:29.800 --> 00:00:32.300
 a simple post-based matcher in

10
00:00:32.300 --> 00:00:35.600
 the header wherein we can see the method is

11
00:00:35.600 --> 00:00:38.100
 post. This is the path for which we

12
00:00:38.100 --> 00:00:41.200
 are sending the request the body contains a key value

13
00:00:41.200 --> 00:00:41.700
 pair.

14
00:00:42.900 --> 00:00:45.400
In the matches condition, it is specified

15
00:00:45.400 --> 00:00:49.000
 that we want to match forward Apple but it

16
00:00:48.300 --> 00:00:51.800
 should be in the header as you

17
00:00:51.800 --> 00:00:55.200
 can see which has been specified by part header

18
00:00:54.200 --> 00:00:57.600
 and we are also matching a status code

19
00:00:57.600 --> 00:00:59.000
 200, okay.

20
00:01:00.300 --> 00:01:03.300
So it is the Practical time and let's see how we can

21
00:01:03.300 --> 00:01:04.300
 do this practically.

22
00:01:06.200 --> 00:01:09.000
So I have written a template over here as you can see which is

23
00:01:09.500 --> 00:01:11.700
 simple post header Dot. Yml.

24
00:01:12.800 --> 00:01:15.800
It has the ID block the info

25
00:01:15.800 --> 00:01:19.000
 block, which says simple post-based matcher

26
00:01:18.000 --> 00:01:19.500
 header.

27
00:01:20.300 --> 00:01:23.200
request block which contains the method as post

28
00:01:24.200 --> 00:01:27.300
you can see we are adding search equals to Apple in

29
00:01:27.300 --> 00:01:30.900
 the body. We also supplying 3 headers

30
00:01:30.900 --> 00:01:33.600
 over here. Let's quickly see the matches condition.

31
00:01:33.600 --> 00:01:36.500
 We have said the match is condition to be and

32
00:01:36.500 --> 00:01:40.200
 and we are matching a word Apple in

33
00:01:39.200 --> 00:01:42.900
 the header and matching successfully

34
00:01:42.900 --> 00:01:45.600
 a status code, which is 200, okay.

35
00:01:46.700 --> 00:01:48.200
So let's run this as well.

36
00:01:50.700 --> 00:01:53.400
Now, let's quickly change the template.

37
00:01:58.100 --> 00:02:01.700
As we are using simple post header.yml and

38
00:02:01.700 --> 00:02:02.500
 let's hit.

39
00:02:03.300 --> 00:02:03.600
enter

40
00:02:05.100 --> 00:02:06.800
once we do that you can see

41
00:02:09.900 --> 00:02:12.400
Invalid field format for

42
00:02:12.400 --> 00:02:15.300
 ID allowed format is this okay. Let's

43
00:02:15.300 --> 00:02:16.100
 quickly check this.

44
00:02:18.200 --> 00:02:22.100
In the ID let's not give spaces

45
00:02:21.100 --> 00:02:22.600
 over here.

46
00:02:24.900 --> 00:02:26.800
And let's run this once more.

47
00:02:29.400 --> 00:02:32.700
You can see successfully we supplied one template

48
00:02:32.700 --> 00:02:35.600
 and we are able to match the output as

49
00:02:35.600 --> 00:02:38.300
 well and we have got the output correctly over here.

50
00:02:39.700 --> 00:02:40.700
Let's debug this.

51
00:02:42.500 --> 00:02:43.300
and hit enter

52
00:02:44.300 --> 00:02:47.400
and you can see in the output as well. If you are able to match this

53
00:02:47.400 --> 00:02:51.300
 apple keywordly new header.

54
00:02:51.900 --> 00:02:54.800
Let's check this quickly in burp as

55
00:02:54.800 --> 00:02:54.900
 well.

56
00:02:56.500 --> 00:02:58.600
So this is the request that we have captured.

57
00:02:59.400 --> 00:03:03.300
You can see it was a post request based on the custom template

58
00:03:02.300 --> 00:03:04.200
 that we have written.

59
00:03:07.200 --> 00:03:10.700
Search equals to Apple was supplied in the body. There were

60
00:03:10.700 --> 00:03:13.200
 three headers that were also supplied as can be

61
00:03:13.200 --> 00:03:13.900
 seen over here.

62
00:03:15.200 --> 00:03:18.500
In the response we can see we got a 200, okay.

63
00:03:19.400 --> 00:03:23.100
And the most important part which you can see is the new header. So

64
00:03:22.100 --> 00:03:25.900
 the new header contains a

65
00:03:25.900 --> 00:03:28.700
 value, which is Apple which was successfully matched

66
00:03:28.700 --> 00:03:31.300
 and we got the successful output like

67
00:03:31.300 --> 00:03:31.600
 this.

68
00:03:32.900 --> 00:03:35.400
This means if any time if you

69
00:03:35.400 --> 00:03:38.300
 also want to match something in the header and if

70
00:03:38.300 --> 00:03:41.500
 it's a post request, you can write a similar template

71
00:03:41.500 --> 00:03:43.400
 that would look something like this.

72
00:03:44.700 --> 00:03:46.900
So I hope you guys understood this. Thank you.
