From 904f9d9ddb3e54605a34e419860d8f8ed4e83a6f Mon Sep 17 00:00:00 2001 From: hexplor Date: Sun, 26 Apr 2026 02:45:06 +0200 Subject: [PATCH] update --- .gitignore | 2 ++ exploit.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6d5808 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +exploit +exploit.o diff --git a/exploit.c b/exploit.c index 72f3540..83d7ff1 100644 --- a/exploit.c +++ b/exploit.c @@ -55,16 +55,26 @@ int main(int argc, char** argv){ text[len - 1] = 0; } int index = 0; + char uid[400]; while (text[index]){ if (text[index] == 'U'){ - if (strncmp(text + index, "UID=", 4)){ + if (strncmp(text + index, "UID=", 4) == 0){ printf("pattern found\n"); + index += 4; + int j = 0 ; + while(text[index] && text[index] != ';' && text[index] != '\r' && text[index] != '\n'){ + uid[j] = text[index]; + j++; + index++; + } + uid[j + 1] = 0; break; } } index++; } + printf("uid=%s\n", uid); fclose(fichier_out); free(file_buffer); return 0;