Hi, so in this lesson we are going to see a
simple post-based matcher. But this time in
the header.
The matching condition is going to match the
specified.
Input in the header that we want to
search for to get a successful output.
As you can see on your screen. Yes a sample
template that we can see this is
a simple post-based matcher in
the header wherein we can see the method is
post. This is the path for which we
are sending the request the body contains a key value
pair.
In the matches condition, it is specified
that we want to match forward Apple but it
should be in the header as you
can see which has been specified by part header
and we are also matching a status code
200, okay.
So it is the Practical time and let's see how we can
do this practically.
So I have written a template over here as you can see which is
simple post header Dot. Yml.
It has the ID block the info
block, which says simple post-based matcher
header.
request block which contains the method as post
you can see we are adding search equals to Apple in
the body. We also supplying 3 headers
over here. Let's quickly see the matches condition.
We have said the match is condition to be and
and we are matching a word Apple in
the header and matching successfully
a status code, which is 200, okay.
So let's run this as well.
Now, let's quickly change the template.
As we are using simple post header.yml and
let's hit.
enter
once we do that you can see
Invalid field format for
ID allowed format is this okay. Let's
quickly check this.
In the ID let's not give spaces
over here.
And let's run this once more.
You can see successfully we supplied one template
and we are able to match the output as
well and we have got the output correctly over here.
Let's debug this.
and hit enter
and you can see in the output as well. If you are able to match this
apple keywordly new header.
Let's check this quickly in burp as
well.
So this is the request that we have captured.
You can see it was a post request based on the custom template
that we have written.
Search equals to Apple was supplied in the body. There were
three headers that were also supplied as can be
seen over here.
In the response we can see we got a 200, okay.
And the most important part which you can see is the new header. So
the new header contains a
value, which is Apple which was successfully matched
and we got the successful output like
this.
This means if any time if you
also want to match something in the header and if
it's a post request, you can write a similar template
that would look something like this.
So I hope you guys understood this. Thank you.