Okay.
In the previous lecture, we covered this excesses test on a farm.
Now let's create another method for testing excesses on a link.
And it is very easy here.
You see we have this equality and this script exists here.
So very easy.
We are going to check if the code, if the link has something like this the equality, then we are going
to replace this equality with another equality and then concatenate the script with this equality.
So we will be able to use our script on a link.
Very easy very simple.
So in here I'm going to create that method.
This time I'm going to test name this test access in link okay.
And we are going to give just the URL this time because we don't need the form okay.
And we need access script.
So let's copy that and then paste it here.
Now we have this script here.
The next thing is to replace this.
Okay.
And very easy.
And we have the URL.
So the URL is going to be equal to the URL dot replace.
So in replace function we can use this like this.
We have a plus.
And then I want to replace this with another with another equality sign.
And then I want this to be itself.
And then I want to concatenate that with a script.
That is X is is test script.
Uh, it is script actually.
In here the same thing.
Uh oh my God.
Script, Script.
Okay.
So now it will replace that.
And then we need to create a response.
So let's use a response.
This response is going to be equal to self dot session.
This time we are going to use get because it is not a form okay.
And then we are going to give the URL.
And finally we can check this okay.
If this x is this script is in response dot content.
Then we could return true or we have another another thing the same thing here okay.
Or we can immediately directly we can return this because in here we are checking if you return this
if it is equal or if it is if this script exists then it will return true.
If not, it will return false so that the same thing goes here.
Okay, now, if I just return that and remove this, it will work better, I think.
And the same thing here.
Instead of if I can return X test script encode.
So.
This one the same thing because it is a string.
We cannot check that with that thing that we need to change the type.
Okay.
And now it is done.
From here it is time to move for something else.
It looks like I have some kind of error or what?
Okay, that is here.
This Ctrl s to save it.
And now let's come back here.
And in here, you see, we, uh.
I used hist Inform that this time I want to use it on link.
Okay.
And in link we don't need to give a form here at all.
So I remove this and then we could print the result.
And if I save this.
But I'm not going to check that with this link.
Okay.
I'm going to change the link to this one.
Okay.
I'm going to copy that and then came back here.
There's that link in here.
You see we have an equality here in this link.
Okay.
So I use control s here and then move back here.
Let's see if it is going to return true or not.
And you see we have return.
It has returned.
True.
But in here if I don't print the form so it gives me the result immediately.
So now you see that we only have the true keyword here.
And what if I check that in another form like this one?
Or if I use control z.
Z.
Okay.
It gives me this link back.
Now if I check that with this link, you see that we don't have any.
Get there.
So it returns false for me and it gives me the form.
Looks like we also.
Okay I'm printing that form back.
So now you learn how you can use this okay.
Very easy on a link.
If the link is a vulnerable then it returns true.
If not, it returns false.
The same thing goes with the forms.
So let's go and improve this.
And that is going to be the next the last lecture in this.
In the next lecture I will improve this and I will finish this up.