I was working today on adding in special characters, but excluding some special characters which can cause issues like SQL injection… like ` ’ ? < > ;
I also wanted to insure that I had at least one upper, one lower, one number and one special.
Generating the 4 character classes (and the 5th class which is the combination of any of the classes)
q: (item 0 of it, item 1 of it, item 2 of it, item 3 of it, item 0 of it & item 1 of it & item 2 of it & item 3 of it) of (concatenation of characters (integers in (48,57)), concatenation of characters (integers in (65,90)), concatenation of characters (integers in (97,122)), concatenation of characters (33;35;36;38;40;41;42;43;45;47;58;61;64;91;92;93;94;95;123;125))
A: 0123456789, ABCDEFGHIJKLMNOPQRSTUVWXYZ, abcdefghijklmnopqrstuvwxyz, !#$&()*+-/:=@[\]^_{}, 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
<<EDIT - I have an edge case - solving >>
Putting the classes together into 10 slots. This does have the weakness in a pattern of Number, Any, Upper,Lower,Any,Special. but the character positions will slide left or right in a subsequent step.
q: (item 4 of it;item 4 of it;item 0 of it;item 4 of it;item 1 of it; item 2 of it; item 4 of it; item 3 of it; item 4 of it;item 4 of it) of (item 0 of it, item 1 of it, item 2 of it, item 3 of it, item 0 of it & item 1 of it & item 2 of it & item 3 of it) of (concatenation of characters (integers in (48,57)), concatenation of characters (integers in (65,90)), concatenation of characters (integers in (97,122)), concatenation of characters (33;35;36;38;40;41;42;43;45;47;58;61;64;91;92;93;94;95;123;125))
A: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
A: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
A: 0123456789
A: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
A: ABCDEFGHIJKLMNOPQRSTUVWXYZ
A: abcdefghijklmnopqrstuvwxyz
A: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
A: !#$&()*+-/:=@[\]^_{}
A: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
A: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$&()*+-/:=@[\]^_{}
We then choose one of each class (in order) and concatenate them into one string and trim to the first 8
q: first 8 of following text of position (random integer of 2) of concatenation of (first 1 of following text of position (random integer of (length of it - 1)) of it) of (item 4 of it;item 4 of it;item 0 of it;item 4 of it;item 1 of it; item 2 of it; item 4 of it; item 3 of it; item 4 of it;item 4 of it) of (item 0 of it, item 1 of it, item 2 of it, item 3 of it, item 0 of it & item 1 of it & item 2 of it & item 3 of it) of (concatenation of characters (integers in (48,57)), concatenation of characters (integers in (65,90)), concatenation of characters (integers in (97,122)), concatenation of characters (33;35;36;38;40;41;42;43;45;47;58;61;64;91;92;93;94;95;123;125))
A: k5ERdc@3
If you run that one a bunch of times, you will see that pattern shifts left and right. If you wanted to change that pattern, you could shift around this portion, (item 4 of it;item 4 of it;item 0 of it;item 4 of it;item 1 of it; item 2 of it; item 4 of it; item 3 of it; item 4 of it;item 4 of it)
, but always leave the item 4 (any) in positions 1, 2, 9 and 10, because those are the slots that get randomly trimmed.
Then you can just stack these up several times and trim the result to your desired password length:
q: first (16) of (concatenation of (first 8 of following text of position (random integer of 2) of concatenation of (first 1 of following text of position (random integer of (length of it - 1)) of it) of (item 4 of it;item 4 of it;item 0 of it;item 4 of it;item 1 of it; item 2 of it; item 4 of it; item 3 of it; item 4 of it;item 4 of it) of (item 0 of it, item 1 of it, item 2 of it, item 3 of it, item 0 of it & item 1 of it & item 2 of it & item 3 of it) of (concatenation of characters (integers in (48,57)), concatenation of characters (integers in (65,90)), concatenation of characters (integers in (97,122)), concatenation of characters (33;35;36;38;40;41;42;43;45;47;58;61;64;91;92;93;94;95;123;125))) of integers to 5)
A: #h44Ppx:-j2\Dd)*