Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- // Concise Wordlist Generator
- // Alex Ponebshek is the pwnage
- int main(char *argc, char** argv)
- {
- char *ALPH="1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
- int ALEN=strlen(ALPH);
- int MIN=2;
- int MAX=4;
- int len;
- for (len=MIN; len<=MAX; len++)
- {
- int *count=malloc(len*sizeof(int));
- memset(count, 0, len);
- char *str=malloc(len*sizeof(char));
- memset(str, ALPH[0], len);
- int pt=0;
- while (pt>=0)
- {
- fprintf(stdout, "%s\n", str);
- pt=len-1;
- do
- {
- count[pt]=(count[pt]+1)%ALEN;
- str[pt]=ALPH[count[pt]];
- } while (count[pt]==0 && --pt>=0);
- }
- free(count);
- free(str);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement