From 7caa231e0b0fa607080586725fbbc9628a1cc031 Mon Sep 17 00:00:00 2001 From: spv Date: Wed, 20 Apr 2022 14:10:27 -0400 Subject: hello and welcome back to hell --- tools/envrun.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tools/envrun.c (limited to 'tools/envrun.c') diff --git a/tools/envrun.c b/tools/envrun.c new file mode 100644 index 0000000..bc5dd08 --- /dev/null +++ b/tools/envrun.c @@ -0,0 +1,25 @@ +#include +#include + +int main(int argc, char* argv[]) { + char* argv_[] = { + "/bin/sh", + NULL + }; + + char* envp_[] = { + "SHELL=/bin/sh", + "USER=mobile", + "HOME=/var/mobile", + "XPC_FLAGS=0x0", + "XPC_SERVICE_NAME=0", + "LOGNAME=mobile", + "PATH=/usr/bin:/bin:/usr/sbin:/sbin", + "__CF_USER_TEXT_ENCODING=0x1F5:0:0", + NULL + }; + + execle("/bin/sh", "/bin/sh", NULL, envp_); + + return 0; +} \ No newline at end of file -- cgit v1.2.3