From f55147b0b37d7bce5e8453b3bc5b18612aa5f057 Mon Sep 17 00:00:00 2001 From: Kevin Ludwig Date: Thu, 8 Feb 2024 19:02:58 +0100 Subject: [PATCH] Passwortgenerator Sonderzeichen --- src/passwortgenerator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passwortgenerator.c b/src/passwortgenerator.c index 60d7d5e..d822ca0 100644 --- a/src/passwortgenerator.c +++ b/src/passwortgenerator.c @@ -5,14 +5,14 @@ int run_passwortGenerator(){ printf("\nPasswort Generator\n\n"); - char zeichen[] = "abcdefghijklmnopqrstuvwxyz0123456789"; + char zeichen[] = "abcdefghijklmnopqrstuvwxyz0123456789!%&/()=?*#"; int tmp = 0; int GroSSklein = 0; printf("\nIhr Passwort: "); srand(time(0)); for(int i = 0; i < 10; i++) { - tmp = rand()%36; + tmp = rand()%46; GroSSklein = rand()%2; printf("%c", (tmp<26?(GroSSklein==0?toupper(zeichen[tmp]):zeichen[tmp]):zeichen[tmp])); }