Okay, friends.
Welcome back.
Now, you see, we are printing here the action.
Now, the main goal is to not to print only the action.
I want to get the full path for this.
Okay.
Like this.
So to do that, we need to pass this action with the URL, the target URL.
Okay.
To do that we are going to use a URL path here that we already used this in one of the script okay.
So I'm going to just import this here and then use it here after the action.
So here I'm going to create a let's name it post URL.
Post URL.
It is going to be equal to just.
We are going to use the method we imported URL join.
And that is here we are uh use we use that too.
So we have Earl join.
And in here, the first thing we are going to give is that target URL.
And the second one that we want to parse with this is the action.
Good.
Now instead of printing just the action, I want to print that post URL.
Now if I.
Execute this once again.
Now you see that we have the full path here.
Okay.
And also we have the post.
We have the target.
Everything ready here.
Okay.
That was for that.
And also into this for loop that we have in the second for loop I want to get more details like name.
We have the name here I want to type I want the type, I want the value and all and everything.
Okay.
So the next one that I want to get is input type.
So that is equal to input dot get.
And here I'm going to just access that type.
The next one is going to be the value.
Okay.
The value is equal to input dot get.
And here we are going to access the value.
So now we have these three things.
And also let me show you something here.
I am going to check.
Okay.
I'm going to check if the type of this input is text.
Then I'm going to change its value to something else.
Okay.
For example we are going to add anything like text or something.
And then we are going to add that.
And then hitting enter we will have a result.
Right now we have no result here, but when we have our own script to exploit, we will be having a
result here.
Now you see, we have a text here.
Result for a test.
Okay.
Now I'm going to check if the type of this input is text.
Then I need to change its value.
What is the value?
Value is something that you enter here.
Okay.
You write here.
That is the value.
It gets that value.
And then send it to the server.
So we are going to handle that.
Let's check using an if statement I am going to use.
If input at type is text then I am going to.
I'm going to change the value.
So you see here we get the value okay.
Input value is going to be.
Equal to whatever we want.
Okay.
The script.
Anything.
Okay.
So right now I just searched or I just tested the test.
So right now it is going to be just the test.
Okay.
The next thing is that we need to send them to the server.
So while we're trying to send them to the server, we need to put them into a dictionary.
So here
um let's create a dictionary I'm going to name this post dictionary or post data dictionary.
It is going to be equal to an empty dictionary.
Right now it is an empty dictionary okay.
The next thing that I want to do is to add a key and a value.
So the key is going to be the input name.
And the value is going to be input value.
So this is the input name.
It is going to be equal to the value that we have here.
Okay.
Very easy.
So now we have the post data.
And then the post data.
The key for this is going to be input name.
We already provided this and it is going to be equal to input value okay.
Perfect.
Now we have this.
And the next thing is to use the post method to send them to somewhere we want okay.
And also we need to put this into this for loop okay.
And now in here I need to use the post method.
So let's use request requests dot post.
We have get and also we had post in here I'm going to give the post URL, which is the template URL,
and also the data is going to be the dictionary that we just created.
It is post data.
Perfect.
Now I want to print this.
Okay.
The content of this.
So for that we need to save this into a variable.
It's going to be result.
Result is equal to this.
And here I need to print the result dot content.
Let me save this and let's go here.
And right now I am searching for something like this.
Okay.
When we write test we have result for test.
Let's see if we could find this result for test.
That means that this the text injected to this successfully.
This test injected okay.
If not.
So we will.
We are not able to do that.
Uh, we have the template URL.
We have the post that the second one that is, uh, something.
Uh, okay.
This part is not, I think, completed because it is.
Okay.
It is it looks like it is completed.
And we have a lot of thing here.
Let me see.
I need to re-execute.
This looks like it is.
Done.
Okay.
It is injected the test keyword.
So here I need to find that thing.
Let's see if I am okay.
We have the result.
We have the result dot content.
And in here we have the post URL.
Earl.
And in here we have the input value.
That is good.
Everything looks good here.
Perfect.
Everything good?
Okay, here.
Let's search for something that was.
Okay.
We have a lot of things here, but the thing I want is something.
Uh, okay, I'll find it and I will show it to you.
I created a file here that need this thing.
Okay, I want to find that text, because here, if I look, I will not be able to find that.
So I want to search for it.
Okay.
Let me copy the whole thing.
Okay.
I will start selecting this from here.
Up to.
You here.
Okay, I will just copy that.
And I created this file.
Now I'm going to paste it here.
So it's all in one line.
And let's search for result.
Result.
Looks like we find one.
One of one.
That means it is found.
Okay.
It is exactly what we are looking for.
Results for test.
And that is here results for test.
It has an S at the end.
Let's see if it is.
If it has okay.
That is the same thing.
So now you see that it happened successfully okay.
Result for test.
If I change that to something else like instead of test if I search for.
Name at and hit.
Uh, execution now for a while.
After a while, you will be able to see this kind of information.
Let's see.
Now, what are we going to find for this?
Now you see that result for name it.
And also here if I just copy this and.
Copy selection and then come right in here this control A and then use control V and then use control
F here search for name.
And you see that we have result for name.
That is the same thing okay.
That means our code has been executed successfully.
So thanks for watching and I'll see you in the next lecture.