|
@ -6,8 +6,14 @@ |
|
|
int run_passwortGenerator(){ |
|
|
int run_passwortGenerator(){ |
|
|
printf("\nPasswort Generator\n\n"); |
|
|
printf("\nPasswort Generator\n\n"); |
|
|
char zeichen[] = "abcdefghijklmnopqrstuvwxyz0123456789!%&/()=?*#"; |
|
|
char zeichen[] = "abcdefghijklmnopqrstuvwxyz0123456789!%&/()=?*#"; |
|
|
|
|
|
while(1){ |
|
|
|
|
|
int eing = 0; |
|
|
|
|
|
printf("Tippen Sie '1' ein, um ein neues Passwort zu generieren: "); |
|
|
|
|
|
scanf("%d", &eing); |
|
|
int tmp = 0; |
|
|
int tmp = 0; |
|
|
int GroSSklein = 0; |
|
|
int GroSSklein = 0; |
|
|
|
|
|
if(eing == 1) |
|
|
|
|
|
{ |
|
|
printf("\nIhr Passwort: "); |
|
|
printf("\nIhr Passwort: "); |
|
|
srand(time(0)); |
|
|
srand(time(0)); |
|
|
for(int i = 0; i < 10; i++) |
|
|
for(int i = 0; i < 10; i++) |
|
@ -16,6 +22,9 @@ int run_passwortGenerator(){ |
|
|
GroSSklein = rand()%2; |
|
|
GroSSklein = rand()%2; |
|
|
printf("%c", (tmp<26?(GroSSklein==0?toupper(zeichen[tmp]):zeichen[tmp]):zeichen[tmp])); |
|
|
printf("%c", (tmp<26?(GroSSklein==0?toupper(zeichen[tmp]):zeichen[tmp]):zeichen[tmp])); |
|
|
} |
|
|
} |
|
|
printf("\n"); |
|
|
|
|
|
|
|
|
printf("\n");} |
|
|
|
|
|
else |
|
|
|
|
|
return 0; |
|
|
|
|
|
} |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |