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/envdump.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/envdump.c (limited to 'tools/envdump.c') diff --git a/tools/envdump.c b/tools/envdump.c new file mode 100644 index 0000000..4536d00 --- /dev/null +++ b/tools/envdump.c @@ -0,0 +1,17 @@ +#include +#include + +int main(int argc, char* argv[], char* envp[]) { + char** environ_ = envp; + + FILE* fp = fopen("/tmp/envdump.txt", "w"); + + while (*environ_) { + fprintf(fp, "%s\n", *environ_); + environ_++; + } + + fclose(fp); + + return 0; +} \ No newline at end of file -- cgit v1.2.3