mirror of
https://github.com/notscimmy/pplib
synced 2026-06-22 07:30:05 +00:00
Don't crash if ran on unsupported windows
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
static uint64_t objecttable;
|
||||
static uint64_t vadroot;
|
||||
|
||||
static void init()
|
||||
static bool init()
|
||||
{
|
||||
windows_version win_ver = get_windows_version();
|
||||
|
||||
@@ -40,16 +40,18 @@ public:
|
||||
{
|
||||
case WINDOWS7:
|
||||
init_win7();
|
||||
break;
|
||||
return true;
|
||||
case WINDOWS8:
|
||||
init_win8();
|
||||
break;
|
||||
return true;
|
||||
case WINDOWS81:
|
||||
init_win81();
|
||||
break;
|
||||
return true;
|
||||
case WINDOWS10:
|
||||
init_win10();
|
||||
break;
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -6,9 +6,11 @@ using namespace native::structs;
|
||||
|
||||
bool elevate_ppl()
|
||||
{
|
||||
if (!kernel_offsets::init()) return false;
|
||||
|
||||
if (!init_exploit()) return false;
|
||||
|
||||
kernel_offsets::init();
|
||||
|
||||
|
||||
execute_in_kernel([](MmGetSystemRoutineAddress_t _MmGetSystemRoutineAddress)
|
||||
{
|
||||
|
||||
+4
-2
@@ -3,7 +3,9 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
elevate_ppl();
|
||||
MessageBoxA(NULL, "Use ProcessHacker to check PPL status", "Paused", NULL);
|
||||
if (elevate_ppl())
|
||||
MessageBoxA(NULL, "Use ProcessHacker to check PPL status", "Paused", NULL);
|
||||
else
|
||||
MessageBoxA(NULL, "Something went wrong - probably unsuported windows version", "Error", MB_ICONERROR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user