So in this video we've been seeing, I mean we actually taking our process spoken has elevated privileges
are not freshmen get the handle of the process and further process may be opening your broken hand using
this open process broken so this broken is like an identity for further process.
So it contains, uh, in CIOs.
And also this token information would use it to identify whether that particular process has privileges,
which kind of privileges, whether we have normal user privileges or administrative rule is our program
can impersonate other users as well.
So first.
Let's go and import using system that.
Diagnostics.
So in this we have this process.
We can also.
Okay.
So.
Let's import these namespaces.
And we will copying one enum for this.
So we'll be getting information based on this, you know, sort of copy this and based here.
Okay.
So first we need to get the handle to the current process so we can do that in Java using process DA.
Get current prices dirt handed.
So this will give you the handle.
The handle type is in the binder.
So that same BTR is proc handle.
So we're getting the Senate and this we will proceed to this open process, Duncan.
So the first one to declare this one and it is in I don't to to that you do not deal.
And the return type is worth.
So the first parameter is the process.
And so we have already created this open to this process and it so that is this in the pointer process
and the next one is different.
So it's a number desert axis.
So if you go to this information, if you open this axis right for axis tokens, you can see all of
these.
Access.
Right.
You need to specify which you want to use in this passes token.
So I how ordered, etc. authorities, uh, denied access.
And we have these values.
So it's actually an integer.
So we can just say.
Or we can also say you ain't.
Pay their taxes and then they'll will be broken and sold for peace.
Similar to what will be passing this.
Uh.
The reference.
So.
Now.
It would be that again.
And.
So that's going to create an empty and that is empty talk and handlers equals to interpret your dart
zero.
So currently it's an empty one.
So Auburn presents broken off and we need to find parameters but I'll handle the process and it and
the next one is the permissions and what you want to open the broken with these permissions.
So we'll be using network inquiry.
So if you want to write it, just prove it.
Yes, you can modify the existing disabled permissions to enable they can use this so for another reason
or token query.
So just participate if you want to uh, also open in uh, with the program to just put images, you
can see our.
And but this value.
So for no inquiry is enough and I would put this reference to our.
So we got this broken tender and we can pass this to this get dog information function.
So let's also import this one, which is in advance paper that you do not deal.
So that means also bull.
And the first one is the talking it.
So you and we are talking Handel.
So these names are does not need to be accurate.
And, uh.
There should be, uh.
In Jakarta.
So the next one is the token information class.
So what is this?
This is.
You know, if you go to this and here you see all of its values.
The starting number is one.
So the next will be booting for our next track Broken User Groups, previous or not, etc. Primary group.
And now we'll be using that Broken International.
So we have already defined this one.
So you can just simply copy this and remove this one and put public.
So here you can see the first one is one and the next four will be two, three, four and so on.
So these are the type of information class.
And then next to unspoken information.
So this is the output of pointer to the structure of this R token addition.
So when you're passing the token information, if you pass the token elevation, the output will be
the pointer to this structure.
If you pass this ah token user, it will be output to this program user.
So first, let's check what is the token television structure?
So television return is very simple.
It contains a single integer number and a non-zero value.
The token has a lot of bridges.
So if it is zero, the writer does not have a previous address.
It has this and other privileges.
So let's go and declare that one.
So structurally, though, they cannot see kinship.
You weren't 32 token.
You had better.
It's.
The third parameter for this function is token information.
So it is also, uh, in the.
And the next one is local information.
And so the size of this structure, we have specified a year.
So we can say in token information and and the next one is redundant.
So that is the end of this token information clash structure we have basically.
We need to pass this as a reference because this function returns the value of the structure we have
specified into this variable so we can identify what is the structure.
So these are the dynamic types.
There are some structures that work in groups.
So the groups number of groups vary again.
So you will have the array of structures.
So in that case, the size varies.
So in that in to this function, the actual length of the described structure for this existing token.
And then we need to call this function another time.
So we will be doing that.
So you, you don't get confused.
So far, I will be getting plenty of talking on the squad aviation structure.
If you can see this body, I can see normally burning bodies of the land before we can directly pass
the land to foot.
But in other sectors you cannot pass like that because they will be of the dynamic.
So first of all, getting the land to this broken structure.
They'll get information off and the first one is spoken handle and the next one is broken in formation,
glass dart, broken elevation.
So we are specifying this broken elevation structure and the next one is a pointer to this program information.
But for now, we are not, uh, we don't want any output.
We just want the length of this structure.
So we can change 2.0.
And the next one is Berlin.
So we don't know then what we're going to do is in elevated land is equal to zero.
So this is the input parameter.
You don't know that.
And that's why you are passing zero elevator length.
And upon returning, this will, uh, this function will refer to this, uh, token elevation structure,
and we'll try to output this sizing to this reference value that is elevated.
Lynn.
Now I can go and put into this a and it's also say.
Okay.
Before ending our program, I need to read across the handle that is using the cross handle function.
So it just takes this handle as an input and it will cross their handle.
Okay.
So let's start big external pros and we love endpoint data and so we can use this cross handle.
Can be love.
First we need to read the talking handle and then we need to close down our process.
And I think we are good to go.
For now, we are fighting the land of this talking television structure and it should be fought.
So let's run this.
So we are able to grow.
And so that's common to one.
And European talent is for them.
So now what they're going to do is we are going to call this function.
They're talking information.
First one is broken enter and the next one is our broken elevation structure.
And the third one is we need to pass this, uh, uh, pointer, so let's create one and the pointer.
Elevation pointer is equal to we need to create this master dot allocate head to global so it will allocate
the memory.
So how much you want to get this off of this rent?
So it is for.
Now we can buy this elevation winter.
And the next one is for information and that is for and the reference elevator, which you will also
be for.
Okay.
Now we got we got the handle for the pointer for the token return structure.
So we need to convert this pointer push structure we can use master dot pointer to.
Structure.
So the pointer is just pointing to the starting elementary structure in order to convert this to the
structure, meaning is this function.
You can also access elements using the pointer word.
All right.
This is a good method to convert to sector and we can access elements of that structure.
So the first parameter is the this pointer and the second one is our type of this structure.
We want to convert the type of.
Talking irrigation.
And this will return the chair of the organization.
So I will be creating a new object that is talking education and we need to cash in this into tokenization.
No.
I can just, uh, put into this.
The broken is the elevator.
So let's go around this.
And here you can see the value is zero because we are running as a normal user.
Your feet are broken.
Use the elevator not equal to zero.
Then bring.
Related
religious.
There is.
No elevator.
And we can also print the value of this brokenness.
Okay.
So it's redundant this and not elevated.
Now.
Let's go ahead and open this one in Florida.
That's when they see him as administrator.
Now we have this.
This.
Now, if I go and run this elevator to see another guy and see the values run and we have these images.
So the time for this, we knew how to find our process as this Buccaneer version.
Not.