diff options
author | Aaron Ball <nullspoon@oper.io> | 2019-03-06 21:06:25 -0700 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2019-03-06 21:10:03 -0700 |
commit | 93a26f6394546f53b9531cead1713311de0dda78 (patch) | |
tree | 8d1b742274df73cf347c3501d924263571e0dec6 /src | |
parent | 6878a1fc964d4ef0ddba15461801caf972f91185 (diff) | |
download | upwgen-93a26f6394546f53b9531cead1713311de0dda78.tar.gz upwgen-93a26f6394546f53b9531cead1713311de0dda78.tar.xz |
main: Add default char set
Previously the user was required to specify a custom char set, or the
upwgen exited with an error. Now it assumes ascii 33 - 126, which
include all english lower case, upper case, numbers, and some symbols by
default (which is sane since this is what most password fields accept).
Also updated README to document this default.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -169,11 +169,10 @@ int main(int argc, char* argv[]) { i++; } - // Ensure at least one character set was specified - if(chars[0] == '\0') { - printf("Must specify at least one character set\n"); - return 0; - } + // If no charset was specified, use standard ascii 33 - 126 chars, which + // includes english lower case, upper case, numbers, and some symbols. + if(chars[0] == '\0') + count += intrcat(chars, 33, 126); // Get the random data seed clock_gettime(CLOCK_REALTIME, &ts); |