Skip to content

Commit

Permalink
200 IQ
Browse files Browse the repository at this point in the history
  • Loading branch information
can1357 committed May 3, 2018
1 parent 8b3584b commit 9034e6d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions PerfectInjector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ BOOL ExposeKernelMemoryToProcess( MemoryController& Mc, PVOID Memory, SIZE_T Siz
{
Mc.AttachTo( EProcess );

BOOL Fail = FALSE;
BOOL Success = FALSE;

Mc.IterPhysRegion( Memory, Size, [ & ] ( PVOID Va, uint64_t Pa, SIZE_T Sz )
{
Expand All @@ -38,19 +38,18 @@ BOOL ExposeKernelMemoryToProcess( MemoryController& Mc, PVOID Memory, SIZE_T Siz

if ( !Info.Pde || ( Info.Pte && ( !Info.Pte->present ) ) )
{
Fail = TRUE;
Success = FALSE;
}
else
{
if ( Info.Pte )
Info.Pte->user = TRUE;
Fail = FALSE;
}
} );

Mc.Detach();

return !Fail;
return Success;
}

PUCHAR FindKernelPadSinglePage( PUCHAR Start, SIZE_T Size )
Expand Down

0 comments on commit 9034e6d

Please sign in to comment.