diff options
| author | spv <aquaticvegetable@gmail.com> | 2022-04-20 14:10:27 -0400 |
|---|---|---|
| committer | spv <aquaticvegetable@gmail.com> | 2022-04-20 14:10:27 -0400 |
| commit | 7caa231e0b0fa607080586725fbbc9628a1cc031 (patch) | |
| tree | e22a643aefbc73c703b90f2454c0f75374696399 /tools/envrun.c | |
hello and welcome back to hell
Diffstat (limited to 'tools/envrun.c')
| -rw-r--r-- | tools/envrun.c | 25 |
1 files changed, 25 insertions, 0 deletions
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 <unistd.h>
+#include <stdio.h>
+
+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 |
