From 30afbf0852b8821d023eb84d2c69979e2b6733e3 Mon Sep 17 00:00:00 2001 From: jerome Date: Fri, 4 Oct 2024 18:00:49 +0200 Subject: =?UTF-8?q?repertoire=20cach=C3=A9=20source=20bufferflow.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- elf/.cache/bufferflow.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 elf/.cache/bufferflow.c (limited to 'elf') diff --git a/elf/.cache/bufferflow.c b/elf/.cache/bufferflow.c new file mode 100644 index 0000000..a0054c1 --- /dev/null +++ b/elf/.cache/bufferflow.c @@ -0,0 +1,28 @@ +#include +#include + +int main(void) +{ + int pass=0; + char buff[10]; + + printf("\nDonne le mot de passe pour avoir le flag : \n"); + scanf("%s",buff); + + if(!strcmp(buff,"s3cr3t")) + { + pass = 1; + } + + if(pass) + { + printf ("\nBien joué !\nVoilà ton flag\n"); + } + else + { + printf("\nMauvais mot de passe.\nBye\n"); + } + + return 0; +} + -- cgit v1.2.3